Browse Source

Theme fix for API>=21

Minor drawer tweak
pull/24/head
Ezerous 8 years ago
parent
commit
5198c6f8f9
  1. 4
      app/src/main/java/gr/thmmy/mthmmy/activities/BaseActivity.java
  2. 16
      app/src/main/res/values-v21/styles.xml

4
app/src/main/java/gr/thmmy/mthmmy/activities/BaseActivity.java

@ -73,7 +73,7 @@ public class BaseActivity extends AppCompatActivity
@Override @Override
protected void onPause() { protected void onPause() {
super.onPause(); super.onPause();
if(drawer!=null) //temporary solution to solve drawer animation closing after returning to activity if(drawer!=null) //close drawer animation after returning to activity
drawer.closeDrawer(); drawer.closeDrawer();
} }
@ -177,7 +177,7 @@ public class BaseActivity extends AppCompatActivity
} }
} }
else
drawer.closeDrawer(); drawer.closeDrawer();
return true; return true;
} }

16
app/src/main/res/values-v21/styles.xml

@ -1,5 +1,21 @@
<resources> <resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
<item name="android:textColorPrimary">@color/primary_text</item>
<item name="android:textColorSecondary">@color/secondary_text</item>
<item name="android:windowBackground">@color/primary</item>
<item name="cardBackgroundColor">@color/card_background</item>
<item name="colorControlNormal">@color/iron</item>
<item name="colorControlActivated">@color/white</item>
<item name="colorControlHighlight">@color/white</item>
<item name="android:textColorHint">@color/iron</item>
<item name="colorButtonNormal">@color/primary</item>
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyle</item>
<item name="android:windowContentTransitions">true</item> <item name="android:windowContentTransitions">true</item>
</style> </style>

Loading…
Cancel
Save