Fixed popup menu background color

This commit is contained in:
Moez Bhatti
2015-12-07 12:26:42 -05:00
parent 224fbaffa0
commit a126dcf70c
4 changed files with 21 additions and 2 deletions
@@ -358,12 +358,18 @@ public class ThemeManager {
sTextOnBackgroundPrimary = sResources.getColor(R.color.theme_light_text_primary);
sTextOnBackgroundSecondary = sResources.getColor(R.color.theme_light_text_secondary);
sRippleBackground = sResources.getDrawable(R.drawable.button_background_transparent);
if (mActivity != null) {
mActivity.getToolbar().setPopupTheme(R.style.PopupThemeLight);
}
break;
case GREY:
case BLACK:
sTextOnBackgroundPrimary = sResources.getColor(R.color.theme_dark_text_primary);
sTextOnBackgroundSecondary = sResources.getColor(R.color.theme_dark_text_secondary);
sRippleBackground = sResources.getDrawable(R.drawable.button_background_transparent_light);
if (mActivity != null) {
mActivity.getToolbar().setPopupTheme(R.style.PopupTheme);
}
break;
}
@@ -67,6 +67,7 @@ public abstract class QKActivity extends ActionBarActivity {
if (mToolbar == null) {
throw new RuntimeException("Toolbar not found in BaseActivity layout.");
} else {
mToolbar.setPopupTheme(R.style.PopupTheme);
mTitle = (QKTextView) mToolbar.findViewById(R.id.toolbar_title);
setSupportActionBar(mToolbar);
}
@@ -216,7 +217,7 @@ public abstract class QKActivity extends ActionBarActivity {
*
* @return
*/
protected Toolbar getToolbar() {
public Toolbar getToolbar() {
return mToolbar;
}
+1 -1
View File
@@ -5,8 +5,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="56dp"
android:minHeight="56dp"
android:gravity="center_vertical"
android:minHeight="56dp"
app:theme="@style/ActionBarTheme">
<com.moez.QKSMS.ui.view.QKTextView
+12
View File
@@ -53,6 +53,7 @@
<!-- BASE THEMES -->
<style name="AppBaseThemeLight" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarPopupTheme">@style/PopupTheme</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
@@ -64,6 +65,7 @@
</style>
<style name="AppBaseThemeDark" parent="Theme.AppCompat">
<item name="actionBarPopupTheme">@style/PopupTheme</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
@@ -80,4 +82,14 @@
<item name="actionMenuTextColor">@color/text_primary_dark</item>
</style>
<style name="PopupTheme" parent="ThemeOverlay.AppCompat">
<item name="android:colorBackground">@color/grey_material</item>
<item name="android:textColor">@color/text_primary_dark</item>
</style>
<style name="PopupThemeLight" parent="ThemeOverlay.AppCompat.Light">
<item name="android:colorBackground">@color/grey_light_mega_ultra</item>
<item name="android:textColor">@color/text_primary_light</item>
</style>
</resources>