mirror of
https://gitlab.com/oeffi/oeffi.git
synced 2025-07-07 15:58:49 +00:00
Extend content under system status and navigation bars.
This commit is contained in:
parent
69f3d85be3
commit
cfb3f39924
23 changed files with 152 additions and 52 deletions
|
@ -90,7 +90,11 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:layout_margin="4dp"
|
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:baselineAligned="false"
|
android:baselineAligned="false"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,20 @@
|
||||||
android:spacing="0px"
|
android:spacing="0px"
|
||||||
android:unselectedAlpha="1" />
|
android:unselectedAlpha="1" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
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">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/trips_server_product"
|
android:id="@+id/trips_server_product"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|left"
|
android:layout_gravity="bottom|left"
|
||||||
android:layout_margin="4dp"
|
|
||||||
android:gravity="left"
|
android:gravity="left"
|
||||||
android:textSize="@dimen/font_size_disclaimer"
|
android:textSize="@dimen/font_size_disclaimer"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
@ -33,10 +41,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|right"
|
android:layout_gravity="bottom|right"
|
||||||
android:layout_margin="4dp"
|
|
||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:text="@string/disclaimer_responsibility_2line"
|
android:text="@string/disclaimer_responsibility_2line"
|
||||||
android:textSize="@dimen/font_size_disclaimer" />
|
android:textSize="@dimen/font_size_disclaimer" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/favorites_list"
|
android:id="@+id/favorites_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:clipToPadding="false" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -41,7 +41,8 @@
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@android:id/list"
|
android:id="@android:id/list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:clipToPadding="false" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -67,12 +67,20 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</de.schildbach.oeffi.plans.BubbleLayout>
|
</de.schildbach.oeffi.plans.BubbleLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
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">
|
||||||
|
|
||||||
<de.schildbach.oeffi.util.ZoomControls
|
<de.schildbach.oeffi.util.ZoomControls
|
||||||
android:id="@+id/plans_zoom"
|
android:id="@+id/plans_zoom"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|right"
|
android:layout_gravity="bottom|right"
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="invisible" />
|
android:visibility="invisible" />
|
||||||
|
|
||||||
|
@ -80,7 +88,6 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|left"
|
android:layout_gravity="bottom|left"
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:background="@drawable/disclaimer_background_dark"
|
android:background="@drawable/disclaimer_background_dark"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:shadowColor="#000"
|
android:shadowColor="#000"
|
||||||
|
@ -90,5 +97,6 @@
|
||||||
android:textSize="@dimen/font_size_disclaimer"
|
android:textSize="@dimen/font_size_disclaimer"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</ViewAnimator>
|
</ViewAnimator>
|
||||||
|
|
|
@ -74,7 +74,8 @@
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@android:id/list"
|
android:id="@android:id/list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:clipToPadding="false" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@android:id/empty"
|
android:id="@android:id/empty"
|
||||||
|
|
|
@ -120,7 +120,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:paddingBottom="48dp"
|
|
||||||
android:scrollbars="vertical" />
|
android:scrollbars="vertical" />
|
||||||
|
|
||||||
<!-- Missing capability -->
|
<!-- Missing capability -->
|
||||||
|
@ -370,7 +369,11 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:layout_margin="4dp"
|
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:baselineAligned="false"
|
android:baselineAligned="false"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:paddingBottom="48dp"
|
|
||||||
android:scrollbars="none" />
|
android:scrollbars="none" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -47,7 +46,11 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:layout_margin="4dp"
|
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:baselineAligned="false"
|
android:baselineAligned="false"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
9
oeffi/res/values-night-v29/colors.xml
Normal file
9
oeffi/res/values-night-v29/colors.xml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<!-- background -->
|
||||||
|
<color name="bg_status_bar">@android:color/transparent</color>
|
||||||
|
<color name="bg_navigation_bar">@android:color/transparent</color>
|
||||||
|
<color name="bg_navigation_bar_fullscreen">@android:color/transparent</color>
|
||||||
|
|
||||||
|
</resources>
|
|
@ -22,6 +22,7 @@
|
||||||
<color name="bg_delayed">#444444</color>
|
<color name="bg_delayed">#444444</color>
|
||||||
<color name="bg_current_time">#ffff00</color>
|
<color name="bg_current_time">#ffff00</color>
|
||||||
<color name="bg_position">#bbbbbb</color>
|
<color name="bg_position">#bbbbbb</color>
|
||||||
|
<color name="bg_status_bar">#44000000</color>
|
||||||
|
|
||||||
<item name="alpha_bright_white" format="float" type="dimen">0.7</item>
|
<item name="alpha_bright_white" format="float" type="dimen">0.7</item>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
<style name="My.Theme" parent="@android:style/Theme.Material.NoActionBar">
|
<style name="My.Theme" parent="@android:style/Theme.Material.NoActionBar">
|
||||||
<item name="android:windowBackground">@color/bg_level0</item>
|
<item name="android:windowBackground">@color/bg_level0</item>
|
||||||
<item name="android:windowTranslucentStatus">true</item>
|
<item name="android:statusBarColor">@color/bg_status_bar</item>
|
||||||
|
<item name="android:navigationBarColor">@color/bg_navigation_bar</item>
|
||||||
<item name="android:textViewStyle">@style/My.Widget.TextView</item>
|
<item name="android:textViewStyle">@style/My.Widget.TextView</item>
|
||||||
<item name="android:autoCompleteTextViewStyle">@style/My.Widget.AutoCompleteTextView</item>
|
<item name="android:autoCompleteTextViewStyle">@style/My.Widget.AutoCompleteTextView</item>
|
||||||
<item name="android:dropDownListViewStyle">@style/My.Widget.ListView.DropDown</item>
|
<item name="android:dropDownListViewStyle">@style/My.Widget.ListView.DropDown</item>
|
||||||
|
|
9
oeffi/res/values-v29/colors.xml
Normal file
9
oeffi/res/values-v29/colors.xml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<!-- background -->
|
||||||
|
<color name="bg_status_bar">@android:color/transparent</color>
|
||||||
|
<color name="bg_navigation_bar">@android:color/transparent</color>
|
||||||
|
<color name="bg_navigation_bar_fullscreen">@android:color/transparent</color>
|
||||||
|
|
||||||
|
</resources>
|
|
@ -24,6 +24,9 @@
|
||||||
<color name="bg_delayed">#cccccc</color>
|
<color name="bg_delayed">#cccccc</color>
|
||||||
<color name="bg_current_time">#eebb00</color>
|
<color name="bg_current_time">#eebb00</color>
|
||||||
<color name="bg_position">#757575</color>
|
<color name="bg_position">#757575</color>
|
||||||
|
<color name="bg_status_bar">#44000000</color>
|
||||||
|
<color name="bg_navigation_bar">@android:color/black</color>
|
||||||
|
<color name="bg_navigation_bar_fullscreen">#44000000</color>
|
||||||
|
|
||||||
<item name="alpha_bright_white" format="float" type="dimen">1</item>
|
<item name="alpha_bright_white" format="float" type="dimen">1</item>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
<style name="My.Theme" parent="@android:style/Theme.Material.Light.NoActionBar">
|
<style name="My.Theme" parent="@android:style/Theme.Material.Light.NoActionBar">
|
||||||
<item name="android:windowBackground">@color/bg_level0</item>
|
<item name="android:windowBackground">@color/bg_level0</item>
|
||||||
<item name="android:windowTranslucentStatus">true</item>
|
<item name="android:statusBarColor">@color/bg_status_bar</item>
|
||||||
|
<item name="android:navigationBarColor">@color/bg_navigation_bar</item>
|
||||||
<item name="android:textViewStyle">@style/My.Widget.TextView</item>
|
<item name="android:textViewStyle">@style/My.Widget.TextView</item>
|
||||||
<item name="android:autoCompleteTextViewStyle">@style/My.Widget.AutoCompleteTextView</item>
|
<item name="android:autoCompleteTextViewStyle">@style/My.Widget.AutoCompleteTextView</item>
|
||||||
<item name="android:dropDownListViewStyle">@style/My.Widget.ListView.DropDown</item>
|
<item name="android:dropDownListViewStyle">@style/My.Widget.ListView.DropDown</item>
|
||||||
|
@ -17,8 +18,9 @@
|
||||||
|
|
||||||
<style name="My.Theme.Fullscreen" parent="@android:style/Theme.Material.Light.NoActionBar.Fullscreen">
|
<style name="My.Theme.Fullscreen" parent="@android:style/Theme.Material.Light.NoActionBar.Fullscreen">
|
||||||
<item name="android:windowBackground">@android:color/black</item>
|
<item name="android:windowBackground">@android:color/black</item>
|
||||||
<item name="android:textViewStyle">@style/My.Widget.TextView</item>
|
|
||||||
<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="27">shortEdges</item>
|
<item name="android:windowLayoutInDisplayCutoutMode" tools:targetApi="27">shortEdges</item>
|
||||||
|
<item name="android:navigationBarColor">@color/bg_navigation_bar_fullscreen</item>
|
||||||
|
<item name="android:textViewStyle">@style/My.Widget.TextView</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="My.Theme.Preference" parent="@android:style/Theme.Material.Light.DarkActionBar">
|
<style name="My.Theme.Preference" parent="@android:style/Theme.Material.Light.DarkActionBar">
|
||||||
|
|
|
@ -256,6 +256,8 @@ public class DirectionsActivity extends OeffiMainActivity implements ActivityCom
|
||||||
backgroundHandler = new Handler(backgroundThread.getLooper());
|
backgroundHandler = new Handler(backgroundThread.getLooper());
|
||||||
|
|
||||||
setContentView(R.layout.directions_content);
|
setContentView(R.layout.directions_content);
|
||||||
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
|
||||||
final MyActionBar actionBar = getMyActionBar();
|
final MyActionBar actionBar = getMyActionBar();
|
||||||
setPrimaryColor(R.color.bg_action_bar_directions);
|
setPrimaryColor(R.color.bg_action_bar_directions);
|
||||||
actionBar.setPrimaryTitle(R.string.directions_activity_title);
|
actionBar.setPrimaryTitle(R.string.directions_activity_title);
|
||||||
|
@ -399,6 +401,12 @@ public class DirectionsActivity extends OeffiMainActivity implements ActivityCom
|
||||||
viewQueryHistoryList.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
|
viewQueryHistoryList.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
|
||||||
queryHistoryListAdapter = new QueryHistoryAdapter(this, network, this, this);
|
queryHistoryListAdapter = new QueryHistoryAdapter(this, network, this, this);
|
||||||
viewQueryHistoryList.setAdapter(queryHistoryListAdapter);
|
viewQueryHistoryList.setAdapter(queryHistoryListAdapter);
|
||||||
|
viewQueryHistoryList.setOnApplyWindowInsetsListener((v, insets) -> {
|
||||||
|
v.setPadding(v.getPaddingLeft(), v.getPaddingTop(), v.getPaddingRight(),
|
||||||
|
insets.getSystemWindowInsetBottom());
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
viewQueryHistoryEmpty = findViewById(R.id.directions_query_history_empty);
|
viewQueryHistoryEmpty = findViewById(R.id.directions_query_history_empty);
|
||||||
|
|
||||||
viewQueryMissingCapability = findViewById(R.id.directions_network_missing_capability);
|
viewQueryMissingCapability = findViewById(R.id.directions_network_missing_capability);
|
||||||
|
|
|
@ -186,6 +186,8 @@ public class TripDetailsActivity extends OeffiActivity implements LocationListen
|
||||||
scheduleTripIntent = scheduleTripIntent(trip);
|
scheduleTripIntent = scheduleTripIntent(trip);
|
||||||
|
|
||||||
setContentView(R.layout.directions_trip_details_content);
|
setContentView(R.layout.directions_trip_details_content);
|
||||||
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
|
||||||
final MyActionBar actionBar = getMyActionBar();
|
final MyActionBar actionBar = getMyActionBar();
|
||||||
setPrimaryColor(R.color.bg_action_bar_directions);
|
setPrimaryColor(R.color.bg_action_bar_directions);
|
||||||
actionBar.setPrimaryTitle(getTitle());
|
actionBar.setPrimaryTitle(getTitle());
|
||||||
|
|
|
@ -130,6 +130,8 @@ public class TripsOverviewActivity extends OeffiActivity {
|
||||||
final Uri historyUri = historyUriStr != null ? Uri.parse(historyUriStr) : null;
|
final Uri historyUri = historyUriStr != null ? Uri.parse(historyUriStr) : null;
|
||||||
|
|
||||||
setContentView(R.layout.directions_trip_overview_content);
|
setContentView(R.layout.directions_trip_overview_content);
|
||||||
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
|
||||||
final MyActionBar actionBar = getMyActionBar();
|
final MyActionBar actionBar = getMyActionBar();
|
||||||
setPrimaryColor(R.color.bg_action_bar_directions);
|
setPrimaryColor(R.color.bg_action_bar_directions);
|
||||||
actionBar.setBack(v -> finish());
|
actionBar.setBack(v -> finish());
|
||||||
|
|
|
@ -119,6 +119,8 @@ public class NetworkPickerActivity extends Activity implements ActivityCompat.On
|
||||||
backgroundHandler = new Handler(backgroundThread.getLooper());
|
backgroundHandler = new Handler(backgroundThread.getLooper());
|
||||||
|
|
||||||
setContentView(R.layout.network_picker_content);
|
setContentView(R.layout.network_picker_content);
|
||||||
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
|
||||||
actionBar = findViewById(R.id.action_bar);
|
actionBar = findViewById(R.id.action_bar);
|
||||||
setPrimaryColor(R.color.bg_action_bar);
|
setPrimaryColor(R.color.bg_action_bar);
|
||||||
actionBar.setPrimaryTitle(getTitle());
|
actionBar.setPrimaryTitle(getTitle());
|
||||||
|
@ -129,6 +131,11 @@ public class NetworkPickerActivity extends Activity implements ActivityCompat.On
|
||||||
final String network = prefsGetNetwork();
|
final String network = prefsGetNetwork();
|
||||||
listAdapter = new NetworksAdapter(this, network, this, this);
|
listAdapter = new NetworksAdapter(this, network, this, this);
|
||||||
listView.setAdapter(listAdapter);
|
listView.setAdapter(listAdapter);
|
||||||
|
listView.setOnApplyWindowInsetsListener((v, insets) -> {
|
||||||
|
v.setPadding(v.getPaddingLeft(), v.getPaddingTop(), v.getPaddingRight(),
|
||||||
|
insets.getSystemWindowInsetBottom());
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
mapView = findViewById(R.id.network_picker_map);
|
mapView = findViewById(R.id.network_picker_map);
|
||||||
((TextView) findViewById(R.id.network_picker_map_disclaimer))
|
((TextView) findViewById(R.id.network_picker_map_disclaimer))
|
||||||
|
|
|
@ -30,7 +30,6 @@ import android.os.Handler;
|
||||||
import android.os.HandlerThread;
|
import android.os.HandlerThread;
|
||||||
import android.os.Process;
|
import android.os.Process;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.animation.AnimationUtils;
|
||||||
|
@ -126,14 +125,13 @@ public class PlanActivity extends Activity {
|
||||||
backgroundThread.start();
|
backgroundThread.start();
|
||||||
backgroundHandler = new Handler(backgroundThread.getLooper());
|
backgroundHandler = new Handler(backgroundThread.getLooper());
|
||||||
|
|
||||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
|
||||||
setContentView(R.layout.plans_content);
|
setContentView(R.layout.plans_content);
|
||||||
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
|
||||||
final Animation zoomControlsAnimation = AnimationUtils.loadAnimation(this, R.anim.zoom_controls);
|
final Animation zoomControlsAnimation = AnimationUtils.loadAnimation(this, R.anim.zoom_controls);
|
||||||
zoomControlsAnimation.setFillAfter(true); // workaround: set through code because XML does not work
|
zoomControlsAnimation.setFillAfter(true); // workaround: set through code because XML does not work
|
||||||
|
|
||||||
viewAnimator = findViewById(R.id.plans_layout);
|
viewAnimator = findViewById(R.id.plans_layout);
|
||||||
viewAnimator.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
|
||||||
|
|
||||||
plan = findViewById(R.id.plans_plan);
|
plan = findViewById(R.id.plans_plan);
|
||||||
plan.setOnMoveListener(() -> {
|
plan.setOnMoveListener(() -> {
|
||||||
|
|
|
@ -105,6 +105,8 @@ public class PlansPickerActivity extends OeffiMainActivity implements ActivityCo
|
||||||
thumbCache = new Cache(cacheDir, THUMB_CACHE_SIZE);
|
thumbCache = new Cache(cacheDir, THUMB_CACHE_SIZE);
|
||||||
|
|
||||||
setContentView(R.layout.plans_picker_content);
|
setContentView(R.layout.plans_picker_content);
|
||||||
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
|
||||||
actionBar = getMyActionBar();
|
actionBar = getMyActionBar();
|
||||||
setPrimaryColor(R.color.bg_action_bar);
|
setPrimaryColor(R.color.bg_action_bar);
|
||||||
actionBar.setPrimaryTitle(R.string.plans_activity_title);
|
actionBar.setPrimaryTitle(R.string.plans_activity_title);
|
||||||
|
@ -120,6 +122,11 @@ public class PlansPickerActivity extends OeffiMainActivity implements ActivityCo
|
||||||
listView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
|
listView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
|
||||||
listAdapter = new PlansAdapter(this, cursor, thumbCache, this, this, application.okHttpClient());
|
listAdapter = new PlansAdapter(this, cursor, thumbCache, this, this, application.okHttpClient());
|
||||||
listView.setAdapter(listAdapter);
|
listView.setAdapter(listAdapter);
|
||||||
|
listView.setOnApplyWindowInsetsListener((v, insets) -> {
|
||||||
|
v.setPadding(v.getPaddingLeft(), v.getPaddingTop(), v.getPaddingRight(),
|
||||||
|
insets.getSystemWindowInsetBottom());
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
connectivityWarningView = findViewById(R.id.plans_picker_connectivity_warning_box);
|
connectivityWarningView = findViewById(R.id.plans_picker_connectivity_warning_box);
|
||||||
filterBox = findViewById(R.id.plans_picker_filter_box);
|
filterBox = findViewById(R.id.plans_picker_filter_box);
|
||||||
|
|
|
@ -22,6 +22,7 @@ import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.ViewAnimator;
|
import android.widget.ViewAnimator;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
@ -71,6 +72,8 @@ public class FavoriteStationsActivity extends OeffiActivity
|
||||||
network = (NetworkId) intent.getSerializableExtra(INTENT_EXTRA_NETWORK);
|
network = (NetworkId) intent.getSerializableExtra(INTENT_EXTRA_NETWORK);
|
||||||
|
|
||||||
setContentView(R.layout.favorites_content);
|
setContentView(R.layout.favorites_content);
|
||||||
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
|
||||||
final MyActionBar actionBar = getMyActionBar();
|
final MyActionBar actionBar = getMyActionBar();
|
||||||
setPrimaryColor(R.color.bg_action_bar_stations);
|
setPrimaryColor(R.color.bg_action_bar_stations);
|
||||||
actionBar.setPrimaryTitle(getTitle());
|
actionBar.setPrimaryTitle(getTitle());
|
||||||
|
@ -83,6 +86,11 @@ public class FavoriteStationsActivity extends OeffiActivity
|
||||||
listView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
|
listView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
|
||||||
adapter = new FavoriteStationsAdapter(this, network, this, network == null ? this : null);
|
adapter = new FavoriteStationsAdapter(this, network, this, network == null ? this : null);
|
||||||
listView.setAdapter(adapter);
|
listView.setAdapter(adapter);
|
||||||
|
listView.setOnApplyWindowInsetsListener((v, insets) -> {
|
||||||
|
v.setPadding(v.getPaddingLeft(), v.getPaddingTop(), v.getPaddingRight(),
|
||||||
|
insets.getSystemWindowInsetBottom());
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
updateGUI();
|
updateGUI();
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,6 +138,8 @@ public class StationDetailsActivity extends OeffiActivity implements StationsAwa
|
||||||
backgroundHandler = new Handler(backgroundThread.getLooper());
|
backgroundHandler = new Handler(backgroundThread.getLooper());
|
||||||
|
|
||||||
setContentView(R.layout.stations_station_details_content);
|
setContentView(R.layout.stations_station_details_content);
|
||||||
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
|
||||||
actionBar = getMyActionBar();
|
actionBar = getMyActionBar();
|
||||||
setPrimaryColor(R.color.bg_action_bar_stations);
|
setPrimaryColor(R.color.bg_action_bar_stations);
|
||||||
actionBar.setBack(v -> finish());
|
actionBar.setBack(v -> finish());
|
||||||
|
@ -169,6 +171,11 @@ public class StationDetailsActivity extends OeffiActivity implements StationsAwa
|
||||||
listView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
|
listView.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
|
||||||
listAdapter = new DeparturesAdapter(this);
|
listAdapter = new DeparturesAdapter(this);
|
||||||
listView.setAdapter(listAdapter);
|
listView.setAdapter(listAdapter);
|
||||||
|
listView.setOnApplyWindowInsetsListener((v, insets) -> {
|
||||||
|
v.setPadding(v.getPaddingLeft(), v.getPaddingTop(), v.getPaddingRight(),
|
||||||
|
insets.getSystemWindowInsetBottom() + (int)(48 * getResources().getDisplayMetrics().density));
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
mapView = findViewById(R.id.stations_station_details_map);
|
mapView = findViewById(R.id.stations_station_details_map);
|
||||||
mapView.setStationsAware(this);
|
mapView.setStationsAware(this);
|
||||||
|
|
|
@ -178,6 +178,8 @@ public class StationsActivity extends OeffiMainActivity implements StationsAware
|
||||||
res = getResources();
|
res = getResources();
|
||||||
|
|
||||||
setContentView(R.layout.stations_content);
|
setContentView(R.layout.stations_content);
|
||||||
|
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
|
||||||
actionBar = getMyActionBar();
|
actionBar = getMyActionBar();
|
||||||
setPrimaryColor(R.color.bg_action_bar_stations);
|
setPrimaryColor(R.color.bg_action_bar_stations);
|
||||||
actionBar.setPrimaryTitle(R.string.stations_activity_title);
|
actionBar.setPrimaryTitle(R.string.stations_activity_title);
|
||||||
|
@ -392,6 +394,11 @@ public class StationsActivity extends OeffiMainActivity implements StationsAware
|
||||||
stationList.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
|
stationList.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL_LIST));
|
||||||
stationListAdapter = new StationsAdapter(this, maxDeparturesPerStation, products, this, this);
|
stationListAdapter = new StationsAdapter(this, maxDeparturesPerStation, products, this, this);
|
||||||
stationList.setAdapter(stationListAdapter);
|
stationList.setAdapter(stationListAdapter);
|
||||||
|
stationList.setOnApplyWindowInsetsListener((v, insets) -> {
|
||||||
|
v.setPadding(v.getPaddingLeft(), v.getPaddingTop(), v.getPaddingRight(),
|
||||||
|
insets.getSystemWindowInsetBottom() + (int)(48 * res.getDisplayMetrics().density));
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
stationList.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
stationList.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
|
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue