mirror of
https://gitlab.com/oeffi/oeffi.git
synced 2025-07-07 04:58:46 +00:00
For insetting the content, use window insets listeners rather than the fitsSystemWindows XML attribute.
This commit is contained in:
parent
37a398ecb8
commit
2c33349988
8 changed files with 22 additions and 5 deletions
|
@ -87,6 +87,7 @@
|
|||
</ScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/directions_trip_details_disclaimer_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
|
@ -94,7 +95,6 @@
|
|||
android:layout_marginRight="@dimen/list_entry_padding_horizontal_verylax"
|
||||
android:layout_marginTop="@dimen/list_entry_padding_vertical_lax"
|
||||
android:layout_marginBottom="@dimen/list_entry_padding_vertical_lax"
|
||||
android:fitsSystemWindows="true"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
android:unselectedAlpha="1" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/directions_trip_overview_disclaimer_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/list_entry_padding_horizontal_verylax"
|
||||
android:layout_marginRight="@dimen/list_entry_padding_horizontal_verylax"
|
||||
android:layout_marginTop="@dimen/list_entry_padding_vertical_lax"
|
||||
android:layout_marginBottom="@dimen/list_entry_padding_vertical_lax"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_marginBottom="@dimen/list_entry_padding_vertical_lax">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/trips_server_product"
|
||||
|
|
|
@ -366,6 +366,7 @@
|
|||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/stations_disclaimer_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
|
@ -373,7 +374,6 @@
|
|||
android:layout_marginRight="@dimen/list_entry_padding_horizontal_verylax"
|
||||
android:layout_marginTop="@dimen/list_entry_padding_vertical_lax"
|
||||
android:layout_marginBottom="@dimen/list_entry_padding_vertical_lax"
|
||||
android:fitsSystemWindows="true"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
</ViewAnimator>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/stations_station_details_disclaimer_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
|
@ -50,7 +51,6 @@
|
|||
android:layout_marginRight="@dimen/list_entry_padding_horizontal_verylax"
|
||||
android:layout_marginTop="@dimen/list_entry_padding_vertical_lax"
|
||||
android:layout_marginBottom="@dimen/list_entry_padding_vertical_lax"
|
||||
android:fitsSystemWindows="true"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
|
|
@ -274,6 +274,10 @@ public class TripDetailsActivity extends OeffiActivity implements LocationListen
|
|||
((TextView) findViewById(R.id.directions_trip_details_footer))
|
||||
.setText(Html.fromHtml(getString(R.string.directions_trip_details_realtime)));
|
||||
|
||||
findViewById(R.id.directions_trip_details_disclaimer_group).setOnApplyWindowInsetsListener((v, insets) -> {
|
||||
v.setPadding(0, 0, 0, insets.getSystemWindowInsetBottom());
|
||||
return insets;
|
||||
});
|
||||
final TextView disclaimerSourceView = findViewById(R.id.directions_trip_details_disclaimer_source);
|
||||
updateDisclaimerSource(disclaimerSourceView, network.name(), null);
|
||||
|
||||
|
|
|
@ -160,6 +160,11 @@ public class TripsOverviewActivity extends OeffiActivity {
|
|||
});
|
||||
barView.setOnScrollListener(() -> handler.post(checkMoreRunnable));
|
||||
|
||||
findViewById(R.id.directions_trip_overview_disclaimer_group).setOnApplyWindowInsetsListener((v, insets) -> {
|
||||
v.setPadding(0, 0, 0, insets.getSystemWindowInsetBottom());
|
||||
return insets;
|
||||
});
|
||||
|
||||
processResult(result, dep);
|
||||
}
|
||||
|
||||
|
|
|
@ -269,6 +269,10 @@ public class StationDetailsActivity extends OeffiActivity implements StationsAwa
|
|||
favoriteButton
|
||||
.setChecked(selectedFavState != null && selectedFavState == FavoriteStationsProvider.TYPE_FAVORITE);
|
||||
|
||||
findViewById(R.id.stations_station_details_disclaimer_group).setOnApplyWindowInsetsListener((v, insets) -> {
|
||||
v.setPadding(0, 0, 0, insets.getSystemWindowInsetBottom());
|
||||
return insets;
|
||||
});
|
||||
disclaimerSourceView = findViewById(R.id.stations_station_details_disclaimer_source);
|
||||
updateDisclaimerSource(disclaimerSourceView, selectedNetwork.name(), null);
|
||||
}
|
||||
|
|
|
@ -262,6 +262,10 @@ public class StationsActivity extends OeffiMainActivity implements StationsAware
|
|||
mapView.setZoomControls(zoom);
|
||||
|
||||
connectivityWarningView = findViewById(R.id.stations_connectivity_warning_box);
|
||||
findViewById(R.id.stations_disclaimer_group).setOnApplyWindowInsetsListener((v, insets) -> {
|
||||
v.setPadding(0, 0, 0, insets.getSystemWindowInsetBottom());
|
||||
return insets;
|
||||
});
|
||||
disclaimerSourceView = findViewById(R.id.stations_disclaimer_source);
|
||||
|
||||
// initialize stations list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue