Several UI tweaks

This commit is contained in:
topjohnwu 2017-05-26 18:20:53 +08:00
parent 47e62a5681
commit 738f943a68
8 changed files with 22 additions and 8 deletions

View File

@ -28,7 +28,7 @@ import butterknife.ButterKnife;
public class AboutActivity extends Activity { public class AboutActivity extends Activity {
private static final String DONATION_URL = "http://topjohnwu.github.io/donate"; private static final String DONATION_URL = "https://www.paypal.me/topjohnwu";
private static final String XDA_THREAD = "http://forum.xda-developers.com/showthread.php?t=3432382"; private static final String XDA_THREAD = "http://forum.xda-developers.com/showthread.php?t=3432382";
private static final String SOURCE_CODE_URL = "https://github.com/topjohnwu/MagiskManager"; private static final String SOURCE_CODE_URL = "https://github.com/topjohnwu/MagiskManager";
@ -44,10 +44,8 @@ public class AboutActivity extends Activity {
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
String theme = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getString("theme", "");
Logger.dev("AboutActivity: Theme is " + theme);
if (getApplicationContext().isDarkTheme) { if (getApplicationContext().isDarkTheme) {
setTheme(R.style.AppTheme_Dark); setTheme(R.style.AppTheme_Transparent_Dark);
} }
setContentView(R.layout.activity_about); setContentView(R.layout.activity_about);
ButterKnife.bind(this); ButterKnife.bind(this);

View File

@ -30,10 +30,10 @@ public class SettingsActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
if (getApplicationContext().isDarkTheme) { if (getApplicationContext().isDarkTheme) {
setTheme(R.style.AppTheme_Dark); setTheme(R.style.AppTheme_Transparent_Dark);
} }
setContentView(R.layout.activity_container); setContentView(R.layout.activity_settings);
ButterKnife.bind(this); ButterKnife.bind(this);
setSupportActionBar(toolbar); setSupportActionBar(toolbar);

View File

@ -178,7 +178,8 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_margin="15dp" android:layout_margin="15dp"
android:layout_toStartOf="@+id/safetyNet_status" android:layout_toStartOf="@+id/safetyNet_status"
android:src="@drawable/ic_refresh" /> android:src="@drawable/ic_refresh"
android:tint="?attr/imageColorTint" />
<ProgressBar <ProgressBar
android:id="@+id/safetyNet_check_progress" android:id="@+id/safetyNet_check_progress"

View File

@ -9,4 +9,12 @@
<item name="android:windowNoTitle">true</item> <item name="android:windowNoTitle">true</item>
</style> </style>
<style name="AppTheme.Transparent.Dark" parent="AppTheme.Dark">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources> </resources>

View File

@ -30,5 +30,6 @@
</declare-styleable> </declare-styleable>
<attr name="colorAccentFallback" format="reference" /> <attr name="colorAccentFallback" format="reference" />
<attr name="imageColorTint" format="reference" />
</resources> </resources>

View File

@ -10,7 +10,7 @@
<color name="red500">#F44336</color> <color name="red500">#F44336</color>
<color name="green500">#4CAF50</color> <color name="green500">#4CAF50</color>
<color name="grey500">#9E9E9E</color> <color name="grey500">#9E9E9E</color>
<color name="blue500">#2196F3</color> <color name="blue500">#2196f3</color>
<color name="yellow500">#FFC107</color> <color name="yellow500">#FFC107</color>
<color name="dark_secondary_text">#dedede</color> <color name="dark_secondary_text">#dedede</color>

View File

@ -12,6 +12,7 @@
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
<item name="android:statusBarColor">@android:color/transparent</item> <item name="android:statusBarColor">@android:color/transparent</item>
<item name="imageColorTint">@android:color/background_dark</item>
</style> </style>
<style name="AppTheme.Dark" parent="Theme.AppCompat.NoActionBar"> <style name="AppTheme.Dark" parent="Theme.AppCompat.NoActionBar">
@ -24,6 +25,7 @@
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
<item name="android:statusBarColor">@android:color/transparent</item> <item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:textColorSecondary">@color/dark_secondary_text</item> <item name="android:textColorSecondary">@color/dark_secondary_text</item>
<item name="imageColorTint">@android:color/background_light</item>
</style> </style>
<style name="CardViewStyle.Dark" parent="CardView"> <style name="CardViewStyle.Dark" parent="CardView">
@ -38,6 +40,10 @@
<item name="android:statusBarColor">?attr/colorPrimaryDark</item> <item name="android:statusBarColor">?attr/colorPrimaryDark</item>
</style> </style>
<style name="AppTheme.Transparent.Dark" parent="AppTheme.Dark">
<item name="android:statusBarColor">?attr/colorPrimaryDark</item>
</style>
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar"> <style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/ic_splash_activity</item> <item name="android:windowBackground">@drawable/ic_splash_activity</item>
<item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentStatus">true</item>