Merge pull request #7348 from osmandapp/RefactorColors
Colors Refactoring
This commit is contained in:
commit
0758ce3d4d
14 changed files with 40 additions and 14 deletions
17
OsmAnd/res/drawable/btn_round_dark.xml
Normal file
17
OsmAnd/res/drawable/btn_round_dark.xml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<item android:state_pressed="true"><shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/active_buttons_and_links_bg_pressed_dark" />
|
||||||
|
<corners android:radius="@dimen/map_button_rect_rad" />
|
||||||
|
</shape></item>
|
||||||
|
<item android:state_enabled="false"><shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/inactive_buttons_and_links_bg_dark" />
|
||||||
|
<corners android:radius="@dimen/map_button_rect_rad" />
|
||||||
|
</shape></item>
|
||||||
|
<item><shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/active_color_primary_dark" />
|
||||||
|
<corners android:radius="@dimen/map_button_rect_rad" />
|
||||||
|
</shape></item>
|
||||||
|
|
||||||
|
</selector>
|
|
@ -203,7 +203,7 @@
|
||||||
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
||||||
android:background="@drawable/btn_round_blue"
|
android:background="?attr/btn_round"
|
||||||
android:drawableLeft="@drawable/ic_action_plus"
|
android:drawableLeft="@drawable/ic_action_plus"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:minHeight="@dimen/measurement_tool_button_height"
|
android:minHeight="@dimen/measurement_tool_button_height"
|
||||||
|
@ -233,7 +233,7 @@
|
||||||
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
||||||
android:background="@drawable/btn_round_blue"
|
android:background="?attr/btn_round"
|
||||||
android:minHeight="@dimen/measurement_tool_button_height"
|
android:minHeight="@dimen/measurement_tool_button_height"
|
||||||
android:paddingLeft="@dimen/measurement_tool_button_padding"
|
android:paddingLeft="@dimen/measurement_tool_button_padding"
|
||||||
android:paddingRight="@dimen/measurement_tool_button_padding"
|
android:paddingRight="@dimen/measurement_tool_button_padding"
|
||||||
|
@ -308,7 +308,7 @@
|
||||||
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
||||||
android:background="@drawable/btn_round_blue"
|
android:background="?attr/btn_round"
|
||||||
android:drawableLeft="@drawable/ic_action_plus"
|
android:drawableLeft="@drawable/ic_action_plus"
|
||||||
android:minHeight="@dimen/measurement_tool_button_height"
|
android:minHeight="@dimen/measurement_tool_button_height"
|
||||||
android:paddingLeft="@dimen/measurement_tool_button_padding"
|
android:paddingLeft="@dimen/measurement_tool_button_padding"
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginBottom="@dimen/first_usage_title_margin_bottom"
|
android:layout_marginBottom="@dimen/first_usage_title_margin_bottom"
|
||||||
android:background="@drawable/btn_round_blue"
|
android:background="@drawable/btn_round_light"
|
||||||
android:padding="14dp"
|
android:padding="14dp"
|
||||||
android:text="@string/get_started"
|
android:text="@string/get_started"
|
||||||
android:textColor="@color/color_white"/>
|
android:textColor="@color/color_white"/>
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginBottom="@dimen/first_usage_title_margin_bottom"
|
android:layout_marginBottom="@dimen/first_usage_title_margin_bottom"
|
||||||
android:background="@drawable/btn_round_blue"
|
android:background="@drawable/btn_round_light"
|
||||||
android:padding="14dp"
|
android:padding="14dp"
|
||||||
android:text="@string/get_started"
|
android:text="@string/get_started"
|
||||||
android:textColor="@color/color_white"/>
|
android:textColor="@color/color_white"/>
|
||||||
|
|
|
@ -653,7 +653,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginBottom="@dimen/first_usage_title_margin_bottom"
|
android:layout_marginBottom="@dimen/first_usage_title_margin_bottom"
|
||||||
android:background="@drawable/btn_round_blue"
|
android:background="@drawable/btn_round_light"
|
||||||
android:padding="14dp"
|
android:padding="14dp"
|
||||||
android:text="@string/give_permission"
|
android:text="@string/give_permission"
|
||||||
android:textColor="@color/color_white"
|
android:textColor="@color/color_white"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_action_plus"
|
android:src="@drawable/ic_action_plus"
|
||||||
app:backgroundTint="@color/active_color_primary_light"
|
app:backgroundTint="?attr/active_color_basic"
|
||||||
app:fabSize="normal"
|
app:fabSize="normal"
|
||||||
app:useCompatPadding="true"/>
|
app:useCompatPadding="true"/>
|
||||||
|
|
||||||
|
|
|
@ -222,7 +222,7 @@
|
||||||
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
||||||
android:background="@drawable/btn_round_blue"
|
android:background="?attr/btn_round"
|
||||||
android:drawableLeft="@drawable/ic_action_plus"
|
android:drawableLeft="@drawable/ic_action_plus"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
|
@ -252,7 +252,7 @@
|
||||||
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
||||||
android:background="@drawable/btn_round_blue"
|
android:background="?attr/btn_round"
|
||||||
android:minHeight="@dimen/measurement_tool_button_height"
|
android:minHeight="@dimen/measurement_tool_button_height"
|
||||||
android:paddingLeft="@dimen/measurement_tool_button_padding"
|
android:paddingLeft="@dimen/measurement_tool_button_padding"
|
||||||
android:paddingRight="@dimen/measurement_tool_button_padding"
|
android:paddingRight="@dimen/measurement_tool_button_padding"
|
||||||
|
@ -326,7 +326,7 @@
|
||||||
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
android:layout_marginEnd="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
android:layout_marginRight="@dimen/measurement_tool_button_margin"
|
||||||
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
android:layout_marginTop="@dimen/measurement_tool_button_margin"
|
||||||
android:background="@drawable/btn_round_blue"
|
android:background="?attr/btn_round"
|
||||||
android:drawableLeft="@drawable/ic_action_plus"
|
android:drawableLeft="@drawable/ic_action_plus"
|
||||||
android:minHeight="@dimen/measurement_tool_button_height"
|
android:minHeight="@dimen/measurement_tool_button_height"
|
||||||
android:paddingLeft="@dimen/measurement_tool_button_padding"
|
android:paddingLeft="@dimen/measurement_tool_button_padding"
|
||||||
|
|
|
@ -142,6 +142,7 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_margin="@dimen/list_content_padding"
|
android:layout_margin="@dimen/list_content_padding"
|
||||||
app:primaryColor="@color/active_color_primary_dark"
|
app:primaryColor="@color/active_color_primary_dark"
|
||||||
|
app:secondaryColor="?android:textColorSecondary"
|
||||||
app:labelText="@string/profile_name_hint">
|
app:labelText="@string/profile_name_hint">
|
||||||
|
|
||||||
<studio.carbonylgroup.textfieldboxes.ExtendedEditText
|
<studio.carbonylgroup.textfieldboxes.ExtendedEditText
|
||||||
|
@ -185,6 +186,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
app:primaryColor="@color/active_color_primary_dark"
|
app:primaryColor="@color/active_color_primary_dark"
|
||||||
|
app:secondaryColor="?android:textColorSecondary"
|
||||||
app:labelText="@string/nav_type_hint">
|
app:labelText="@string/nav_type_hint">
|
||||||
|
|
||||||
<studio.carbonylgroup.textfieldboxes.ExtendedEditText
|
<studio.carbonylgroup.textfieldboxes.ExtendedEditText
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:contentDescription="@string/quick_action_new_action"
|
android:contentDescription="@string/quick_action_new_action"
|
||||||
android:src="@drawable/ic_action_plus"
|
android:src="@drawable/ic_action_plus"
|
||||||
app:backgroundTint="@color/active_color_primary_light"
|
app:backgroundTint="?attr/active_color_basic"
|
||||||
app:fabSize="normal"
|
app:fabSize="normal"
|
||||||
app:useCompatPadding="true"/>
|
app:useCompatPadding="true"/>
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="72dp"
|
android:layout_marginLeft="72dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:background="@drawable/btn_round_blue"
|
android:background="?attr/btn_round"
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp"
|
android:paddingRight="16dp"
|
||||||
android:text="@string/shared_string_save_changes"
|
android:text="@string/shared_string_save_changes"
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
<attr name="expandable_list_item_background" format="color"/>
|
<attr name="expandable_list_item_background" format="color"/>
|
||||||
<attr name="expandable_list_background" format="color"/>
|
<attr name="expandable_list_background" format="color"/>
|
||||||
<attr name="bg_color" format="reference" />
|
<attr name="bg_color" format="reference" />
|
||||||
|
<attr name="btn_round" format="reference" />
|
||||||
<attr name="btn_round_border" format="reference" />
|
<attr name="btn_round_border" format="reference" />
|
||||||
<attr name="btn_round_border_2" format="reference" />
|
<attr name="btn_round_border_2" format="reference" />
|
||||||
<attr name="bg_card" format="reference" />
|
<attr name="bg_card" format="reference" />
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
<item name="android:paddingTop">8dp</item>
|
<item name="android:paddingTop">8dp</item>
|
||||||
<item name="android:paddingBottom">8dp</item>
|
<item name="android:paddingBottom">8dp</item>
|
||||||
<item name="android:textColor">@color/color_white</item>
|
<item name="android:textColor">@color/color_white</item>
|
||||||
<item name="android:background">@drawable/btn_round_blue</item>
|
<item name="android:background">?attr/btn_round</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="DialogCancelButton">
|
<style name="DialogCancelButton">
|
||||||
|
@ -129,6 +129,7 @@
|
||||||
<item name="actionModeBackground">@color/app_bar_color_light</item>
|
<item name="actionModeBackground">@color/app_bar_color_light</item>
|
||||||
<item name="actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
<item name="actionBarStyle">@style/Widget.Styled.ActionBarLight</item>
|
||||||
<item name="bg_color">@color/list_background_color_light</item>
|
<item name="bg_color">@color/list_background_color_light</item>
|
||||||
|
<item name="btn_round">@drawable/btn_round_light</item>
|
||||||
<item name="btn_round_border">@drawable/btn_round_border_light</item>
|
<item name="btn_round_border">@drawable/btn_round_border_light</item>
|
||||||
<item name="btn_round_border_2">@drawable/btn_round_border_light_2</item>
|
<item name="btn_round_border_2">@drawable/btn_round_border_light_2</item>
|
||||||
<item name="bg_card">@drawable/bg_card_light</item>
|
<item name="bg_card">@drawable/bg_card_light</item>
|
||||||
|
@ -394,6 +395,7 @@
|
||||||
<item name="actionModeBackground">@color/app_bar_color_dark</item>
|
<item name="actionModeBackground">@color/app_bar_color_dark</item>
|
||||||
<item name="actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
<item name="actionBarStyle">@style/Widget.Styled.ActionBarDark</item>
|
||||||
<item name="bg_color">@color/list_background_color_dark</item>
|
<item name="bg_color">@color/list_background_color_dark</item>
|
||||||
|
<item name="btn_round">@drawable/btn_round_dark</item>
|
||||||
<item name="btn_round_border">@drawable/btn_round_border_dark</item>
|
<item name="btn_round_border">@drawable/btn_round_border_dark</item>
|
||||||
<item name="btn_round_border_2">@drawable/btn_round_border_dark_2</item>
|
<item name="btn_round_border_2">@drawable/btn_round_border_dark_2</item>
|
||||||
<item name="bg_card">@drawable/bg_card_dark</item>
|
<item name="bg_card">@drawable/bg_card_dark</item>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
@ -517,7 +518,10 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment implement
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (contextMenuItem.getIcon() != -1) {
|
if (contextMenuItem.getIcon() != -1) {
|
||||||
item.setIcon(contextMenuItem.getIcon());
|
int activeButtonsAndLinksTextColorResId = getMyApplication().getSettings().isLightContent() ?
|
||||||
|
R.color.active_buttons_and_links_text_light : R.color.active_buttons_and_links_text_dark;
|
||||||
|
Drawable icMenuItem = getMyApplication().getUIUtilities().getIcon(contextMenuItem.getIcon(), activeButtonsAndLinksTextColorResId);
|
||||||
|
item.setIcon(icMenuItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue