mirror of
https://gitlab.com/oeffi/oeffi.git
synced 2025-07-07 21:58:48 +00:00
TripsGalleryAdapter: Move warning icon to the top.
This commit is contained in:
parent
8ddb6f7aae
commit
2d3e76f534
2 changed files with 4 additions and 3 deletions
|
@ -167,7 +167,7 @@ public class TripsGallery extends Gallery {
|
|||
|
||||
// padding
|
||||
final long timeDiff = LongMath.checkedSubtract(maxTime, minTime);
|
||||
long timePadding = timeDiff / 15;
|
||||
long timePadding = timeDiff / 12;
|
||||
if (timeDiff < DateUtils.MINUTE_IN_MILLIS * 30) // zoom limit
|
||||
timePadding = (DateUtils.MINUTE_IN_MILLIS * 30 - timeDiff) / 2;
|
||||
if (timePadding < DateUtils.MINUTE_IN_MILLIS) // minimum padding
|
||||
|
|
|
@ -322,8 +322,9 @@ public final class TripsGalleryAdapter extends BaseAdapter {
|
|||
if (!trip.isTravelable()) {
|
||||
final int warningWidth = warningIcon.getIntrinsicWidth();
|
||||
final int warningLeft = centerX - warningWidth / 2;
|
||||
warningIcon.setBounds(warningLeft, height - warningIcon.getIntrinsicHeight(),
|
||||
warningLeft + warningWidth, height);
|
||||
final int warningPaddingTop = (int) (4 * density);
|
||||
warningIcon.setBounds(warningLeft, warningPaddingTop, warningLeft + warningWidth,
|
||||
warningPaddingTop + warningIcon.getIntrinsicHeight());
|
||||
warningIcon.draw(canvas);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue