Switch back to non-transparent navigation bar (#6111)
This commit is contained in:
parent
3973f450be
commit
6c4c51994d
|
@ -18,6 +18,7 @@ import android.widget.EditText;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
@ -114,6 +115,12 @@ public class MainActivity extends CastEnabledActivity {
|
|||
navDrawer = findViewById(R.id.navDrawerFragment);
|
||||
setNavDrawerSize();
|
||||
|
||||
// Consume navigation bar insets - we apply them in setPlayerVisible()
|
||||
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main_view), (v, insets) ->
|
||||
new WindowInsetsCompat.Builder(insets)
|
||||
.setInsets(WindowInsetsCompat.Type.navigationBars(), Insets.NONE)
|
||||
.build());
|
||||
|
||||
final FragmentManager fm = getSupportFragmentManager();
|
||||
if (fm.findFragmentByTag(MAIN_FRAGMENT_TAG) == null) {
|
||||
if (!UserPreferences.DEFAULT_PAGE_REMEMBER.equals(UserPreferences.getDefaultPage())) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import de.danoeh.antennapod.core.util.FeedItemUtil;
|
|||
import de.danoeh.antennapod.menuhandler.FeedItemMenuHandler;
|
||||
import de.danoeh.antennapod.view.EmptyViewHandler;
|
||||
import de.danoeh.antennapod.view.EpisodeItemListRecyclerView;
|
||||
import de.danoeh.antennapod.view.LiftOnScrollListener;
|
||||
import de.danoeh.antennapod.view.viewholder.EpisodeItemViewHolder;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
|
@ -139,6 +140,7 @@ public class SearchFragment extends Fragment {
|
|||
}
|
||||
};
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.addOnScrollListener(new LiftOnScrollListener(layout.findViewById(R.id.appbar)));
|
||||
|
||||
RecyclerView recyclerViewFeeds = layout.findViewById(R.id.recyclerViewFeeds);
|
||||
LinearLayoutManager layoutManagerFeeds = new LinearLayoutManager(getActivity());
|
||||
|
|
|
@ -4,17 +4,25 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="?attr/actionBarTheme"
|
||||
app:title="@string/add_feed_label"
|
||||
app:navigationIcon="?homeAsUpIndicator" />
|
||||
android:fitsSystemWindows="true"
|
||||
android:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="?attr/actionBarTheme"
|
||||
app:title="@string/add_feed_label"
|
||||
app:navigationIcon="?homeAsUpIndicator" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -4,25 +4,32 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:orientation="horizontal"
|
||||
android:theme="?attr/actionBarTheme"
|
||||
app:navigationIcon="?homeAsUpIndicator"
|
||||
app:title="@string/discover" />
|
||||
android:fitsSystemWindows="true"
|
||||
android:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="?attr/actionBarTheme"
|
||||
app:title="@string/discover"
|
||||
app:navigationIcon="?homeAsUpIndicator" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<GridView
|
||||
android:id="@+id/gridView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_below="@id/appbar"
|
||||
android:clipToPadding="false"
|
||||
android:columnWidth="400dp"
|
||||
android:gravity="center"
|
||||
|
|
|
@ -3,23 +3,31 @@
|
|||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="?attr/actionBarTheme"
|
||||
app:navigationIcon="?homeAsUpIndicator"
|
||||
app:title="@string/search_label" />
|
||||
android:fitsSystemWindows="true"
|
||||
android:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="?attr/actionBarTheme"
|
||||
app:title="@string/search_label"
|
||||
app:navigationIcon="?homeAsUpIndicator" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/feed_title_chip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_below="@id/appbar"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:visibility="gone"
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<style name="Theme.AntennaPod.Light" parent="Theme.Base.AntennaPod.Light">
|
||||
<!-- To make icons visible -->
|
||||
<item name="android:statusBarColor">@color/grey600</item>
|
||||
<item name="android:navigationBarColor">@color/grey600</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<style name="Theme.AntennaPod.Light" parent="Theme.Base.AntennaPod.Light">
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<!-- To make icons visible -->
|
||||
<item name="android:navigationBarColor">@color/grey600</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<style name="Theme.AntennaPod.Light" parent="Theme.Base.AntennaPod.Light">
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:navigationBarColor">@color/background_light</item>
|
||||
<item name="android:navigationBarDividerColor">@color/navigation_bar_divider_light</item>
|
||||
<item name="android:windowLightNavigationBar">true</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -25,6 +25,7 @@
|
|||
<color name="non_square_icon_background">#22777777</color>
|
||||
<color name="seek_background_light">#90000000</color>
|
||||
<color name="seek_background_dark">#905B5B5B</color>
|
||||
<color name="navigation_bar_divider_light">#1F000000</color>
|
||||
|
||||
<color name="accent_light">#0078C2</color>
|
||||
<color name="accent_light_alpha">#250078C2</color>
|
||||
|
|
|
@ -36,10 +36,6 @@
|
|||
<item name="icon_gray">#25365A</item>
|
||||
<item name="android:splitMotionEvents">false</item>
|
||||
<item name="android:fitsSystemWindows">false</item>
|
||||
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
|
||||
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
|
||||
<item name="android:windowContentTransitions" tools:targetApi="lollipop">true</item>
|
||||
</style>
|
||||
|
||||
|
@ -80,10 +76,9 @@
|
|||
<item name="android:splitMotionEvents">false</item>
|
||||
<item name="android:fitsSystemWindows">false</item>
|
||||
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor" tools:targetApi="lollipop">@android:color/transparent</item>
|
||||
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
|
||||
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
|
||||
<item name="android:windowContentTransitions" tools:targetApi="lollipop">true</item>
|
||||
<item name="android:navigationBarColor" tools:targetApi="lollipop">@color/background_darktheme</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AntennaPod.TrueBlack" parent="Theme.Base.AntennaPod.TrueBlack">
|
||||
|
@ -104,6 +99,7 @@
|
|||
<item name="android:actionBarStyle">@color/black</item>
|
||||
<item name="background_elevated">@color/black</item>
|
||||
<item name="android:textColorHint">@color/medium_gray</item>
|
||||
<item name="android:navigationBarColor" tools:targetApi="lollipop">@color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AntennaPod.Light.NoTitle" parent="Theme.AntennaPod.Light">
|
||||
|
|
Loading…
Reference in New Issue