add colors
This commit is contained in:
parent
431c2aee23
commit
292a9e182c
5 changed files with 20 additions and 11 deletions
|
@ -69,10 +69,10 @@
|
|||
<attr name="wikivoyage_card_bg_color" format="reference"/>
|
||||
<attr name="wikivoyage_card_divider_color" format="reference"/>
|
||||
<attr name="wikivoyage_app_bar_color" format="reference"/>
|
||||
<attr name="wikivoyage_bottom_bar_color" format="reference"/>
|
||||
<attr name="wikivoyage_bottom_bar_divider_color" format="reference"/>
|
||||
<attr name="wikivoyage_app_bar_text_color" format="reference"/>
|
||||
<attr name="wikivoyage_active_color" format="reference"/>
|
||||
<attr name="wikivoyage_bottom_bar_color" format="reference"/>
|
||||
<attr name="wikivoyage_bottom_bar_divider_color" format="reference"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="PagerSlidingTabStrip">
|
||||
|
|
|
@ -146,7 +146,8 @@
|
|||
<color name="status_bar_wikivoyage_dark">#101112</color>
|
||||
<color name="status_bar_wikivoyage_article_light">#f2f2f2</color>
|
||||
<color name="status_bar_wikivoyage_article_dark">#222526</color>
|
||||
<color name="bottom_bar_wikivoyage_light">#f5f5f5</color>
|
||||
<color name="bottom_bar_wikivoyage_bg_light">#f5f5f5</color>
|
||||
<color name="bottom_bar_wikivoyage_bg_dark">#222526</color>
|
||||
|
||||
|
||||
<color name="color_transparent">#0000</color>
|
||||
|
@ -394,14 +395,16 @@
|
|||
<color name="wikivoyage_card_bg_light">#ffffff</color>
|
||||
<color name="wikivoyage_card_bg_dark">#222526</color>
|
||||
<color name="wikivoyage_card_divider_light">#f0f0f0</color>
|
||||
<color name="wikivoyage_bottom_bar_divider_light">#e3e3e3</color>
|
||||
<color name="wikivoyage_card_divider_dark">#2d3133</color>
|
||||
<color name="wikivoyage_bottom_bar_divider_dark">#2d3133</color>
|
||||
<color name="wikivoyage_active_light">#237bff</color>
|
||||
<color name="wikivoyage_active_dark">#d28521</color>
|
||||
<color name="wikivoyage_app_bar_light">#f2f2f2</color>
|
||||
<color name="wikivoyage_app_bar_dark">#222526</color>
|
||||
<color name="wikivoyage_app_bar_text_light">#454545</color>
|
||||
<color name="wikivoyage_app_bar_text_dark">#ababab</color>
|
||||
<color name="wikivoyage_contents_icon_dark">#d28521</color>
|
||||
<color name="wikivoyage_contents_icon_light">#536dfe</color>
|
||||
<color name="wikivoyage_bottom_bar_divider_light">#e3e3e3</color>
|
||||
<color name="wikivoyage_bottom_bar_divider_dark">#2d3133</color>
|
||||
|
||||
</resources>
|
|
@ -201,10 +201,10 @@
|
|||
<item name="wikivoyage_card_bg_color">@color/wikivoyage_card_bg_light</item>
|
||||
<item name="wikivoyage_card_divider_color">@color/wikivoyage_card_divider_light</item>
|
||||
<item name="wikivoyage_app_bar_color">@color/wikivoyage_app_bar_light</item>
|
||||
<item name="wikivoyage_bottom_bar_color">@color/bottom_bar_wikivoyage_light</item>
|
||||
<item name="wikivoyage_bottom_bar_divider_color">@color/wikivoyage_bottom_bar_divider_light</item>
|
||||
<item name="wikivoyage_app_bar_text_color">@color/wikivoyage_app_bar_text_light</item>
|
||||
<item name="wikivoyage_active_color">@color/wikivoyage_active_light</item>
|
||||
<item name="wikivoyage_bottom_bar_color">@color/bottom_bar_wikivoyage_bg_light</item>
|
||||
<item name="wikivoyage_bottom_bar_divider_color">@color/wikivoyage_bottom_bar_divider_light</item>
|
||||
</style>
|
||||
|
||||
<style name="OverflowMenuButton" parent="@style/Widget.AppCompat.ActionButton.Overflow">
|
||||
|
@ -394,10 +394,10 @@
|
|||
<item name="wikivoyage_card_bg_color">@color/wikivoyage_card_bg_dark</item>
|
||||
<item name="wikivoyage_card_divider_color">@color/wikivoyage_card_divider_dark</item>
|
||||
<item name="wikivoyage_app_bar_color">@color/wikivoyage_app_bar_dark</item>
|
||||
<item name="wikivoyage_bottom_bar_color">@color/status_bar_wikivoyage_article_dark</item>
|
||||
<item name="wikivoyage_bottom_bar_divider_color">@color/wikivoyage_bottom_bar_divider_dark</item>
|
||||
<item name="wikivoyage_app_bar_text_color">@color/wikivoyage_app_bar_text_dark</item>
|
||||
<item name="wikivoyage_active_color">@color/wikivoyage_active_dark</item>
|
||||
<item name="wikivoyage_bottom_bar_color">@color/bottom_bar_wikivoyage_bg_dark</item>
|
||||
<item name="wikivoyage_bottom_bar_divider_color">@color/wikivoyage_bottom_bar_divider_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="FreeVersionBanner" parent="OsmandDarkTheme">
|
||||
|
|
|
@ -158,7 +158,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag
|
|||
}
|
||||
TextView txtListChild = (TextView) convertView.findViewById(R.id.item_label);
|
||||
txtListChild.setText(childText);
|
||||
txtListChild.setTextColor(getResolvedColor(isNightMode() ? R.color.wikivoyage_active_dark : R.color.wikivoyage_active_light));
|
||||
txtListChild.setTextColor(getResolvedColor(isNightMode() ? R.color.wikivoyage_contents_icon_dark : R.color.wikivoyage_contents_icon_light));
|
||||
txtListChild.setCompoundDrawablesWithIntrinsicBounds(itemChildIcon, null, null, null);
|
||||
|
||||
return convertView;
|
||||
|
@ -199,7 +199,7 @@ public class WikivoyageArticleContentsFragment extends MenuBottomSheetDialogFrag
|
|||
}
|
||||
TextView lblListHeader = (TextView) convertView.findViewById(R.id.item_label);
|
||||
lblListHeader.setText(headerTitle);
|
||||
lblListHeader.setTextColor(getResolvedColor(isNightMode() ? R.color.wikivoyage_active_dark : R.color.wikivoyage_active_light));
|
||||
lblListHeader.setTextColor(getResolvedColor(isNightMode() ? R.color.wikivoyage_contents_icon_dark : R.color.wikivoyage_contents_icon_light));
|
||||
lblListHeader.setCompoundDrawablesWithIntrinsicBounds(itemGroupIcon, null, null, null);
|
||||
|
||||
return convertView;
|
||||
|
|
|
@ -164,6 +164,12 @@ public class AndroidUtils {
|
|||
return dm.heightPixels;
|
||||
}
|
||||
|
||||
public static int getScreenWidth(Activity activity) {
|
||||
DisplayMetrics dm = new DisplayMetrics();
|
||||
activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
|
||||
return dm.widthPixels;
|
||||
}
|
||||
|
||||
public static boolean isValidEmail(CharSequence target) {
|
||||
return !TextUtils.isEmpty(target) && android.util.Patterns.EMAIL_ADDRESS.matcher(target).matches();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue