aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java16
-rw-r--r--app/src/main/res/values/themes.xml1
2 files changed, 17 insertions, 0 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java
index e8e2bc4a..629585b0 100644
--- a/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java
+++ b/app/src/main/java/github/daneren2005/dsub/adapter/SectionAdapter.java
@@ -16,16 +16,21 @@
package github.daneren2005.dsub.adapter;
import android.content.Context;
+import android.content.res.Resources;
+import android.os.Build;
import android.support.v7.widget.PopupMenu;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.util.Log;
+import android.util.TypedValue;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
import java.util.ArrayList;
import java.util.Arrays;
@@ -368,6 +373,17 @@ public abstract class SectionAdapter<T> extends RecyclerView.Adapter<UpdateViewH
notifyDataSetChanged();
mode.setTitle(context.getResources().getString(R.string.select_album_n_selected, selected.size()));
+ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ TypedValue typedValue = new TypedValue();
+ Resources.Theme theme = context.getTheme();
+ theme.resolveAttribute(R.attr.colorPrimaryDark, typedValue, true);
+ int colorPrimaryDark = typedValue.data;
+
+ Window window = ((SubsonicFragmentActivity) context).getWindow();
+ window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
+ window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+ window.setStatusBarColor(colorPrimaryDark);
+ }
return true;
}
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index 76f0250c..3307f32e 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -52,6 +52,7 @@
<item name="actionbarPopupStyle">@style/ThemeOverlay.AppCompat.Light</item>
<item name="android:spinnerItemStyle">@style/DarkSpinnerItem</item>
<item name="windowActionModeOverlay">true</item>
+ <item name="actionModeBackground">?attr/colorPrimary</item>
</style>
<style name="Theme.DSub.Dark.Base" parent="@style/Theme.AppCompat">
<item name="offline_icon">@drawable/main_offline_dark</item>