Merge branch 'dark-ui-fixes'
Closes !571 (Manually resolved merge conflicts by rebasing locally first).
This commit is contained in:
commit
3a79a9b07f
@ -95,7 +95,7 @@ public class MainActivity extends AppCompatActivity implements BottomNavigationB
|
|||||||
|
|
||||||
bottomNavigation = (BottomNavigationBar) findViewById(R.id.bottom_navigation);
|
bottomNavigation = (BottomNavigationBar) findViewById(R.id.bottom_navigation);
|
||||||
bottomNavigation.setTabSelectedListener(this)
|
bottomNavigation.setTabSelectedListener(this)
|
||||||
.setBarBackgroundColor(R.color.fdroid_blue)
|
.setBarBackgroundColor(getBottomNavigationBackgroundColorResId())
|
||||||
.setInActiveColor(R.color.bottom_nav_items)
|
.setInActiveColor(R.color.bottom_nav_items)
|
||||||
.setActiveColor(android.R.color.white)
|
.setActiveColor(android.R.color.white)
|
||||||
.setMode(BottomNavigationBar.MODE_FIXED)
|
.setMode(BottomNavigationBar.MODE_FIXED)
|
||||||
@ -336,6 +336,15 @@ public class MainActivity extends AppCompatActivity implements BottomNavigationB
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getBottomNavigationBackgroundColorResId() {
|
||||||
|
switch (FDroidApp.getCurThemeResId()) {
|
||||||
|
case R.style.AppThemeNight:
|
||||||
|
return R.color.fdroid_night;
|
||||||
|
default:
|
||||||
|
return R.color.fdroid_blue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static class NonScrollingHorizontalLayoutManager extends LinearLayoutManager {
|
private static class NonScrollingHorizontalLayoutManager extends LinearLayoutManager {
|
||||||
NonScrollingHorizontalLayoutManager(Context context) {
|
NonScrollingHorizontalLayoutManager(Context context) {
|
||||||
super(context, LinearLayoutManager.HORIZONTAL, false);
|
super(context, LinearLayoutManager.HORIZONTAL, false);
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
-->
|
-->
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<size android:width="1dp" android:height="1dp" />
|
<size android:width="1dp" android:height="1dp" />
|
||||||
<solid android:color="#ffe3e3e3" />
|
<solid android:color="#50999999" />
|
||||||
</shape>
|
</shape>
|
@ -2,5 +2,5 @@
|
|||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<corners android:radius="3dp" />
|
<corners android:radius="3dp" />
|
||||||
<solid android:color="#303030" />
|
<solid android:color="#3c3c3e" />
|
||||||
</shape>
|
</shape>
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="3dp" />
|
||||||
|
<solid android:color="#262627" />
|
||||||
|
</shape>
|
@ -4,8 +4,6 @@
|
|||||||
<style name="AppThemeDark" parent="AppBaseThemeDark">
|
<style name="AppThemeDark" parent="AppBaseThemeDark">
|
||||||
<!-- customizations that are not API-level specific go here. -->
|
<!-- customizations that are not API-level specific go here. -->
|
||||||
<item name="android:alertDialogTheme">@style/AlertDialogThemeDark</item>
|
<item name="android:alertDialogTheme">@style/AlertDialogThemeDark</item>
|
||||||
<item name="android:colorControlActivated">@color/fdroid_green</item>
|
|
||||||
<item name="android:colorControlHighlight">@color/fdroid_green</item>
|
|
||||||
<item name="android:actionOverflowButtonStyle">@style/ActionButtonOverflow</item>
|
<item name="android:actionOverflowButtonStyle">@style/ActionButtonOverflow</item>
|
||||||
<item name="android:windowSharedElementEnterTransition">@transition/shared_elements</item>
|
<item name="android:windowSharedElementEnterTransition">@transition/shared_elements</item>
|
||||||
<item name="android:windowSharedElementExitTransition">@transition/shared_elements</item>
|
<item name="android:windowSharedElementExitTransition">@transition/shared_elements</item>
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
|
<style name="AppThemeNight" parent="AppBaseThemeNight">
|
||||||
|
<!-- set all card views a bit darker than default dark theme -->
|
||||||
|
<item name="android:colorBackgroundFloating">@color/fdroid_night</item>
|
||||||
|
<item name="appDetailsCardBackground">@color/fdroid_night</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!-- see http://stackoverflow.com/questions/32169303/activity-did-not-call-finish-api-23 -->
|
<!-- see http://stackoverflow.com/questions/32169303/activity-did-not-call-finish-api-23 -->
|
||||||
<style name="AppThemeTransparent" parent="@android:style/Theme.Translucent.NoTitleBar" />
|
<style name="AppThemeTransparent" parent="@android:style/Theme.Translucent.NoTitleBar" />
|
||||||
|
|
||||||
|
@ -12,11 +12,11 @@
|
|||||||
<item name="android:textViewStyle">@style/TextViewStyle</item>
|
<item name="android:textViewStyle">@style/TextViewStyle</item>
|
||||||
<item name="actionBarTheme">@style/AppThemeLight.Toolbar</item>
|
<item name="actionBarTheme">@style/AppThemeLight.Toolbar</item>
|
||||||
<item name="actionBarPopupTheme">@style/AppThemeLight.Toolbar</item>
|
<item name="actionBarPopupTheme">@style/AppThemeLight.Toolbar</item>
|
||||||
<item name="appDetailsBackground">#0c0c0c</item>
|
<item name="appDetailsBackground">?android:windowBackground</item>
|
||||||
<item name="appDetailsCardBackground">#000000</item>
|
<item name="appDetailsCardBackground">#424242</item>
|
||||||
<item name="categoryPreviewAppCardBackground">@drawable/category_preview_app_card_background_dark</item>
|
<item name="categoryPreviewAppCardBackground">@drawable/category_preview_app_card_background_dark</item>
|
||||||
<item name="mainTabSwapBackground">#0a0a0a</item>
|
<item name="mainTabSwapBackground">?android:windowBackground</item>
|
||||||
<item name="mainTabSwapSplashTint">#050505</item>
|
<item name="mainTabSwapSplashTint">#2c2c2c</item>
|
||||||
<item name="categoryName">#ffffff</item>
|
<item name="categoryName">#ffffff</item>
|
||||||
<item name="installedApps">#ffffff</item>
|
<item name="installedApps">#ffffff</item>
|
||||||
<item name="detailPanel">@drawable/details_panel_donate_background_dark</item>
|
<item name="detailPanel">@drawable/details_panel_donate_background_dark</item>
|
||||||
@ -49,19 +49,30 @@
|
|||||||
<item name="antiFeaturesWarning">@drawable/ic_warning_black_24dp</item>
|
<item name="antiFeaturesWarning">@drawable/ic_warning_black_24dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="AppBaseThemeNight" parent="AppThemeDark">
|
||||||
|
<!-- backward-compatibility theme options go here -->
|
||||||
|
|
||||||
|
<item name="colorPrimary">@color/fdroid_night</item>
|
||||||
|
<item name="colorPrimaryDark">@color/fdroid_night_dark</item>
|
||||||
|
<item name="alertDialogTheme">@style/AlertDialogThemeNight</item>
|
||||||
|
<item name="android:windowBackground">@android:color/black</item>
|
||||||
|
<item name="detailPanel">@drawable/details_panel_donate_background_night</item>
|
||||||
|
<item name="mainTabSwapSplashTint">#111111</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- dark app theme with accent colors following roughly android design guidelines -->
|
||||||
<style name="AppThemeDark" parent="AppBaseThemeDark">
|
<style name="AppThemeDark" parent="AppBaseThemeDark">
|
||||||
<!-- customizations that are not API-level specific go here. -->
|
<!-- customizations that are not API-level specific go here. -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- light app theme with accent colors following roughly android design guidelines -->
|
||||||
<style name="AppThemeLight" parent="AppBaseThemeLight">
|
<style name="AppThemeLight" parent="AppBaseThemeLight">
|
||||||
<!-- customizations that are not API-level specific go here. -->
|
<!-- customizations that are not API-level specific go here. -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppThemeNight" parent="AppThemeDark">
|
<!-- mostly deep black theme specialized for OLED screens -->
|
||||||
|
<style name="AppThemeNight" parent="AppBaseThemeNight">
|
||||||
<!-- customizations that are not API-level specific go here. -->
|
<!-- customizations that are not API-level specific go here. -->
|
||||||
|
|
||||||
<item name="colorPrimary">@color/fdroid_night</item>
|
|
||||||
<item name="colorPrimaryDark">@color/fdroid_night_dark</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AlertDialogBaseThemeDark" parent="Theme.AppCompat.Dialog.Alert" />
|
<style name="AlertDialogBaseThemeDark" parent="Theme.AppCompat.Dialog.Alert" />
|
||||||
@ -74,6 +85,11 @@
|
|||||||
<item name="colorAccent">@color/fdroid_green</item>
|
<item name="colorAccent">@color/fdroid_green</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="AlertDialogBaseThemeNight" parent="AlertDialogThemeDark" />
|
||||||
|
<style name="AlertDialogThemeNight" parent="AlertDialogBaseThemeNight">
|
||||||
|
<item name="android:windowBackground">@color/fdroid_night</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="MinWithDialogBaseThemeDark" parent="Theme.AppCompat.Dialog.MinWidth">
|
<style name="MinWithDialogBaseThemeDark" parent="Theme.AppCompat.Dialog.MinWidth">
|
||||||
<item name="colorAccent">@color/fdroid_green</item>
|
<item name="colorAccent">@color/fdroid_green</item>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user