Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2018-03-30 11:23:57 +02:00
commit cdc29f3e85
3 changed files with 6 additions and 12 deletions

View file

@ -541,6 +541,10 @@
<item name="android:textSize">@dimen/default_desc_text_size</item> <item name="android:textSize">@dimen/default_desc_text_size</item>
</style> </style>
<style name="OsmandLightTheme.LightStatusBar" parent="OsmandLightTheme">
<item name="android:windowLightStatusBar">true</item>
</style>
<style name="XmasDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert"> <style name="XmasDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:background">@color/xmas_blue</item> <item name="android:background">@color/xmas_blue</item>
</style> </style>

View file

@ -270,14 +270,6 @@ public class AndroidUtils {
} }
} }
public static void setLightStatusBarFlag(View view) {
if (Build.VERSION.SDK_INT >= 23) {
int flags = view.getSystemUiVisibility();
flags |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
view.setSystemUiVisibility(flags);
}
}
public static int getNavBarHeight(Context ctx) { public static int getNavBarHeight(Context ctx) {
if (!hasNavBar(ctx)) { if (!hasNavBar(ctx)) {
return 0; return 0;

View file

@ -40,16 +40,14 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen
@NonNull @NonNull
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
Dialog dialog = super.onCreateDialog(savedInstanceState); int themeId = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme_LightStatusBar;
Dialog dialog = new Dialog(getContext(), themeId);
if (Build.VERSION.SDK_INT >= 21) { if (Build.VERSION.SDK_INT >= 21) {
Window window = dialog.getWindow(); Window window = dialog.getWindow();
if (window != null) { if (window != null) {
window.setStatusBarColor(getResolvedColor(nightMode window.setStatusBarColor(getResolvedColor(nightMode
? R.color.status_bar_wikivoyage_dark ? R.color.status_bar_wikivoyage_dark
: R.color.status_bar_wikivoyage_light)); : R.color.status_bar_wikivoyage_light));
if (!nightMode) {
AndroidUtils.setLightStatusBarFlag(window.getDecorView());
}
} }
} }
return dialog; return dialog;