Skip to content
This repository has been archived by the owner on Jan 26, 2020. It is now read-only.

Commit

Permalink
Res for night theme
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkaW committed Mar 3, 2016
1 parent ad3057a commit 9fafabc
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode 14400
versionCode 14500
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,10 @@ public boolean onCreateOptionsMenu(Menu menu) {
*/
private void setFormTitleColor(boolean hasFocus) {
if (hasFocus) {
mFormTitle.setTextColor(ContextCompat.getColor(mActivity, R.color.colorPrimary));
//mFormTitle.setTextColor(ContextCompat.getColor(mActivity, R.color.colorPrimary));
mFormTitle.setTextColor(ContextCompat.getColor(mActivity, R.color.colorAccent));
} else {
mFormTitle.setTextColor(ContextCompat.getColor(mActivity, android.R.color.primary_text_light));
mFormTitle.setTextColor(ContextCompat.getColor(mActivity, R.color.primary_text));
}
}

Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/color-night/primary_text.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@android:color/bright_foreground_dark_disabled"/>
<item android:state_window_focused="false" android:color="@android:color/bright_foreground_dark"/>
<item android:state_pressed="true" android:color="@android:color/bright_foreground_dark_inverse"/>
<item android:state_selected="true" android:color="@android:color/bright_foreground_dark_inverse"/>
<item android:state_activated="true" android:color="@android:color/bright_foreground_dark_inverse"/>
<item android:color="@android:color/bright_foreground_dark"/> <!-- not selected -->
</selector>
9 changes: 9 additions & 0 deletions app/src/main/res/color/primary_text.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@android:color/bright_foreground_light_disabled"/>
<item android:state_window_focused="false" android:color="@android:color/bright_foreground_light"/>
<item android:state_pressed="true" android:color="@android:color/bright_foreground_light"/>
<item android:state_selected="true" android:color="@android:color/bright_foreground_light"/>
<item android:state_activated="true" android:color="@android:color/bright_foreground_light"/>
<item android:color="@android:color/bright_foreground_light"/> <!-- not selected -->
</selector>
2 changes: 2 additions & 0 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
<color name="backgourd">@color/material_grey_850</color>
<color name="dividerSearchEngineList">#20ffffff</color>
<color name="contextMenuTitle">#FFF</color>
<color name="colorAccent">#FF80AB</color>


</resources>
5 changes: 3 additions & 2 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
</style>

<style name="AppTheme.UseColorControlActivated" parent="AppTheme.NoActionBar">
<item name="colorControlActivated">@color/colorPrimary</item>
<!--<item name="colorControlActivated">@color/colorPrimary</item>-->
<item name="colorControlActivated">@color/colorAccent</item>
</style>

<style name="AppTheme.NoActionBar" parent="AppTheme">
Expand Down Expand Up @@ -60,6 +61,6 @@
</style>

<style name="EditInfoEditText" parent="AppTheme">
<item name="colorAccent">@color/colorPrimary</item>
<!--<item name="colorAccent">@color/colorPrimary</item>-->
</style>
</resources>

0 comments on commit 9fafabc

Please sign in to comment.