Browse Source

Explicitly set navigation bar color for PostViewV2Fragment. Fixes https://github.com/austinhuang0131/barinsta/issues/326

renovate/org.robolectric-robolectric-4.x
Ammar Githam 4 years ago
parent
commit
28dab3cf0f
  1. 2
      app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java
  2. 8
      app/src/main/res/values/styles.xml

2
app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java

@ -220,7 +220,7 @@ public class PostViewV2Fragment extends SharedElementTransitionDialogFragment {
@Override @Override
public void onCreate(@Nullable final Bundle savedInstanceState) { public void onCreate(@Nullable final Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setStyle(DialogFragment.STYLE_NO_FRAME, android.R.style.Theme_Translucent);
setStyle(DialogFragment.STYLE_NO_FRAME, R.style.PostViewV2Style);
fragmentActivity = (MainActivity) getActivity(); fragmentActivity = (MainActivity) getActivity();
mediaService = MediaService.getInstance(); mediaService = MediaService.getInstance();
final Bundle arguments = getArguments(); final Bundle arguments = getArguments();

8
app/src/main/res/values/styles.xml

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.AppCompat.Translucent" parent="Theme.AppCompat.NoActionBar"> <style name="Theme.AppCompat.Translucent" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowNoTitle">true</item> <item name="android:windowNoTitle">true</item>
@ -183,4 +183,10 @@
<item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Tooltip.Exoplayer</item> <item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Tooltip.Exoplayer</item>
</style> </style>
<style name="PostViewV2Style" parent="android:Theme.Translucent">
<item name="android:windowIsFloating">false</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
<item name="android:navigationBarColor">@color/black</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
</style>
</resources> </resources>
Loading…
Cancel
Save