Edit POI design fix.

This commit is contained in:
GaidamakUA 2015-09-23 18:24:28 +03:00
parent a06e1a158f
commit 939779bfa9
5 changed files with 20 additions and 18 deletions

View file

@ -117,7 +117,7 @@
android:id="@+id/buttonDivider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/dashboard_divider"/>
android:background="?attr/divider_color"/>
<LinearLayout
android:layout_width="fill_parent"

View file

@ -14,7 +14,7 @@
<attr name="bg_map_context_menu" format="reference" />
<attr name="ctx_menu_info_view_bg" format="reference" />
<attr name="dashboard_divider" format="reference" />
<attr name="dashboard_divider" format="reference" />
<attr name="dashboard_button" format="reference" />
@ -39,6 +39,8 @@
<attr name="appbar_layout_theme" format="reference"/>
<attr name="toolbar_theme" format="reference"/>
<attr name="new_app_theme" format="reference"/>
<attr name="divider_color" format="reference" />
</declare-styleable>
<declare-styleable name="PagerSlidingTabStrip">

View file

@ -68,6 +68,7 @@
<item name="bg_card">@drawable/bg_card_light</item>
<item name="bg_map_context_menu">@drawable/bg_map_context_menu_light</item>
<item name="dashboard_divider">@color/dashboard_divider_light</item>
<item name="divider_color">@color/divider_color</item>
<item name="dashboard_button">@drawable/dashboard_button_light</item>
<item name="ctx_menu_info_view_bg">@color/ctx_menu_info_view_bg_light</item>
<item name="search_background">@color/search_background_dark</item>
@ -110,6 +111,7 @@
<item name="appbar_layout_theme">@style/OsmandLightTheme.DarkActionbar</item>
<item name="toolbar_theme">@style/OsmandLightTheme.Toolbar</item>
<item name="new_app_theme">@style/OsmandLightTheme.NewAppTheme</item>
<item name="android:textColorSecondary">@color/icon_color</item>
</style>
<style name="OsmandLightTheme.DarkActionbar">
@ -128,21 +130,10 @@
<style name="OsmandLightTheme.NewAppTheme">
<item name="colorAccent">@color/osmand_orange</item>
<item name="android:textColorSecondary">@color/divider_color</item>
</style>
<style name="OsmandDarkTheme.DarkActionbar">
<item name="colorAccent">@color/color_white</item>
<item name="android:textColorSecondary">@color/dash_search_icon_dark</item>
</style>
<style name="OsmandDarkTheme.Toolbar">
<item name="android:textColorSecondary">@color/dash_search_icon_dark</item>
</style>
<style name="OsmandDarkTheme.NewAppTheme">
<item name="android:textColorSecondary">@color/dash_search_icon_dark</item>
<item name="colorAccent">@color/osmand_orange</item>
</style>
<style name="OsmandDarkTheme" parent="Theme.AppCompat">
@ -161,6 +152,7 @@
<item name="bg_card">@drawable/bg_card_dark</item>
<item name="bg_map_context_menu">@drawable/bg_map_context_menu_dark</item>
<item name="dashboard_divider">@color/dashboard_divider_dark</item>
<item name="divider_color">@color/dashboard_divider_dark</item>
<item name="dashboard_button">@drawable/dashboard_button_dark</item>
<item name="ctx_menu_info_view_bg">@color/ctx_menu_info_view_bg_dark</item>
<item name="search_background">@color/color_white</item>
@ -190,8 +182,9 @@
<item name="dialog_inactive_text_color">@color/dialog_inactive_text_color_dark</item>
<item name="appbar_layout_theme">@style/OsmandDarkTheme.DarkActionbar</item>
<item name="toolbar_theme">@style/OsmandDarkTheme.Toolbar</item>
<item name="new_app_theme">@style/OsmandDarkTheme.NewAppTheme</item>
<item name="toolbar_theme">@style/OsmandDarkTheme</item>
<item name="new_app_theme">@style/OsmandDarkTheme</item>
<item name="android:textColorSecondary">@color/dash_search_icon_dark</item>
</style>
@ -272,6 +265,7 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:textColorHint">?android:textColorSecondary</item>
</style>
<style name="edit_poi_imageview_style">

View file

@ -1,5 +1,6 @@
package net.osmand.plus.osmedit;
import android.content.res.Resources;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
@ -8,6 +9,7 @@ import android.support.v4.app.Fragment;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.TypedValue;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.View;
@ -62,8 +64,12 @@ public class BasicDataFragment extends Fragment {
int height = size.y;
view.findViewById(R.id.screenFiller).setMinimumHeight(height);
TypedValue typedValue = new TypedValue();
Resources.Theme theme = getActivity().getTheme();
theme.resolveAttribute(android.R.attr.textColorSecondary, typedValue, true);
int iconColor = typedValue.data;
IconsCache iconsCache = getMyApplication().getIconsCache();
int iconColor = getResources().getColor(R.color.dash_search_icon_dark);
ImageView streetImageView = (ImageView) view.findViewById(R.id.streetImageView);
streetImageView.setImageDrawable(

View file

@ -204,8 +204,8 @@ public class EditPoiFragment extends DialogFragment {
getMyApplication().getIconsCache()
.getPaintedContentIcon(R.drawable.ic_action_help,
getResources().getColor(
isLightTheme ? R.color.dash_search_icon_dark
: R.color.inactive_item_orange)));
isLightTheme ? R.color.inactive_item_orange
: R.color.dash_search_icon_dark)));
final ImageButton poiTypeButton = (ImageButton) view.findViewById(R.id.poiTypeButton);
poiTypeButton.setOnClickListener(new View.OnClickListener() {
@Override