Fix status bar updates

This commit is contained in:
Chumva 2019-09-24 10:19:12 +03:00
parent 41e6b9e0b2
commit 9de8fe59a7
23 changed files with 57 additions and 80 deletions

View file

@ -5,6 +5,7 @@
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:letterSpacing="@dimen/description_letter_spacing"
android:minHeight="@dimen/bottom_sheet_list_item_height"
android:paddingLeft="@dimen/content_padding"
android:paddingTop="@dimen/bottom_sheet_image_text_margin_start"

View file

@ -24,6 +24,7 @@
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:ellipsize="end"
android:letterSpacing="@dimen/title_letter_spacing"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.ListItemTitle"
android:textColor="?attr/active_color_basic"

View file

@ -29,6 +29,7 @@
android:id="@android:id/title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:letterSpacing="@dimen/description_letter_spacing"
android:paddingTop="@dimen/list_header_settings_top_margin"
android:singleLine="true"
android:textColor="@color/preference_category_title"
@ -40,6 +41,7 @@
android:id="@android:id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:letterSpacing="@dimen/description_letter_spacing"
android:paddingBottom="@dimen/list_header_settings_top_margin"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"

View file

@ -22,6 +22,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:letterSpacing="@dimen/description_letter_spacing"
android:paddingLeft="@dimen/content_padding"
android:paddingTop="@dimen/content_padding_small"
android:paddingRight="@dimen/content_padding"

View file

@ -11,6 +11,7 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:letterSpacing="@dimen/text_button_letter_spacing"
android:paddingTop="@dimen/content_padding_small"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_sub_text_size"

View file

@ -51,6 +51,7 @@
android:id="@android:id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:letterSpacing="@dimen/description_letter_spacing"
android:maxLines="4"
android:paddingBottom="@dimen/gpx_small_text_margin"
android:textColor="?android:textColorSecondary"

View file

@ -46,6 +46,7 @@
android:id="@android:id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:letterSpacing="@dimen/description_letter_spacing"
android:maxLines="4"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"

View file

@ -26,6 +26,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:letterSpacing="@dimen/title_letter_spacing"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:textColor="?attr/text_color_tab_active"

View file

@ -48,6 +48,7 @@
android:id="@android:id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:letterSpacing="@dimen/description_letter_spacing"
android:maxLines="4"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"

View file

@ -47,6 +47,7 @@
android:id="@android:id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:letterSpacing="@dimen/description_letter_spacing"
android:maxLines="4"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"

View file

@ -31,6 +31,7 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:letterSpacing="@dimen/text_button_letter_spacing"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:textColor="?android:textColorPrimary"

View file

@ -36,6 +36,7 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_vertical"
android:letterSpacing="@dimen/text_button_letter_spacing"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding"
android:textColor="?android:textColorPrimary"
@ -83,6 +84,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:letterSpacing="@dimen/title_letter_spacing"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
@ -94,6 +96,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:letterSpacing="@dimen/description_letter_spacing"
android:maxLines="1"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"

View file

@ -338,6 +338,8 @@
<dimen name="wikilink_bottom_sheet_padding">14dp</dimen>
<dimen name="text_button_letter_spacing" format="float">0.01</dimen>
<dimen name="description_letter_spacing" format="float">0.02</dimen>
<dimen name="title_letter_spacing" format="float">0.03</dimen>
<dimen name="text_button_line_spacing_multiplier" format="float">1.2</dimen>
<dimen name="pages_item_size">4dp</dimen>

View file

@ -74,16 +74,12 @@ public class ConfigureProfileFragment extends BaseSettingsFragment {
@Override
public int getStatusBarColorId() {
boolean nightMode = isNightMode();
View view = getView();
if (view != null) {
boolean nightMode = isNightMode();
if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return -1;
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
}
@ColorRes

View file

@ -63,16 +63,12 @@ public class CoordinatesFormatFragment extends BaseSettingsFragment {
@Override
public int getStatusBarColorId() {
boolean nightMode = isNightMode();
View view = getView();
if (view != null) {
boolean nightMode = isNightMode();
if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return -1;
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
}
@Override

View file

@ -59,16 +59,12 @@ public class GeneralProfileSettingsFragment extends BaseSettingsFragment {
@Override
public int getStatusBarColorId() {
boolean nightMode = isNightMode();
View view = getView();
if (view != null) {
boolean nightMode = isNightMode();
if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return -1;
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
}
@Override

View file

@ -36,16 +36,12 @@ public class MapDuringNavigationFragment extends BaseSettingsFragment {
@Override
public int getStatusBarColorId() {
boolean nightMode = isNightMode();
View view = getView();
if (view != null) {
boolean nightMode = isNightMode();
if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return -1;
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
}
@Override

View file

@ -33,16 +33,12 @@ public class NavigationFragment extends BaseSettingsFragment {
@Override
public int getStatusBarColorId() {
boolean nightMode = isNightMode();
View view = getView();
if (view != null) {
boolean nightMode = isNightMode();
if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return -1;
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
}
@Override

View file

@ -69,16 +69,12 @@ public class RouteParametersFragment extends BaseSettingsFragment {
@Override
public int getStatusBarColorId() {
boolean nightMode = isNightMode();
View view = getView();
if (view != null) {
boolean nightMode = isNightMode();
if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return -1;
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
}
@Override

View file

@ -41,16 +41,12 @@ public class ScreenAlertsFragment extends BaseSettingsFragment {
@Override
public int getStatusBarColorId() {
boolean nightMode = isNightMode();
View view = getView();
if (view != null) {
boolean nightMode = isNightMode();
if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return -1;
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
}
@Override

View file

@ -39,16 +39,12 @@ public class TurnScreenOnFragment extends BaseSettingsFragment {
@Override
public int getStatusBarColorId() {
boolean nightMode = isNightMode();
View view = getView();
if (view != null) {
boolean nightMode = isNightMode();
if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return -1;
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
}
@Override

View file

@ -45,16 +45,12 @@ public class VehicleParametersFragment extends BaseSettingsFragment {
@Override
public int getStatusBarColorId() {
boolean nightMode = isNightMode();
View view = getView();
if (view != null) {
boolean nightMode = isNightMode();
if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return -1;
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
}
@Override

View file

@ -54,16 +54,12 @@ public class VoiceAnnouncesFragment extends BaseSettingsFragment {
@Override
public int getStatusBarColorId() {
boolean nightMode = isNightMode();
View view = getView();
if (view != null) {
boolean nightMode = isNightMode();
if (Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
if (view != null && Build.VERSION.SDK_INT >= 23 && !nightMode) {
view.setSystemUiVisibility(view.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
return -1;
return nightMode ? R.color.list_background_color_dark : R.color.list_background_color_light;
}
@Override