This commit is contained in:
Alexey Kulish 2016-07-15 10:43:47 +03:00
parent f3094502d9
commit 42229821d3
4 changed files with 15 additions and 1 deletions

View file

@ -7,9 +7,11 @@
android:background="?attr/left_menu_view_bg">
<LinearLayout
android:id="@+id/background_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/ctx_menu_info_view_bg"
android:clickable="true"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
@ -168,7 +170,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:background="?attr/ctx_menu_info_view_bg"
android:orientation="horizontal">
<LinearLayout
@ -232,6 +233,7 @@
android:background="@color/divider_color"/>
<LinearLayout
android:id="@+id/buttons_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/ctx_menu_info_view_bg"

View file

@ -9,9 +9,11 @@
android:background="@android:color/transparent">
<LinearLayout
android:id="@+id/background_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/ctx_menu_info_view_bg"
android:clickable="true"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
@ -244,6 +246,7 @@
android:background="@color/divider_color"/>
<LinearLayout
android:id="@+id/buttons_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/ctx_menu_info_view_bg"

View file

@ -53,6 +53,7 @@ public class FavoritePointEditorFragment extends PointEditorFragment {
View view = super.onCreateView(inflater, container, savedInstanceState);
if (view != null && editor.isNew()) {
Button replaceButton = (Button) view.findViewById(R.id.replace_button);
replaceButton.setTextColor(getResources().getColor(!getEditor().isLight() ? R.color.osmand_orange : R.color.map_widget_blue));
replaceButton.setVisibility(View.VISIBLE);
replaceButton.setOnClickListener(new View.OnClickListener() {
@Override

View file

@ -58,6 +58,7 @@ public abstract class PointEditorFragment extends Fragment {
});
Button saveButton = (Button) view.findViewById(R.id.save_button);
saveButton.setTextColor(getResources().getColor(!getEditor().isLight() ? R.color.osmand_orange : R.color.map_widget_blue));
saveButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -66,6 +67,7 @@ public abstract class PointEditorFragment extends Fragment {
});
Button cancelButton = (Button) view.findViewById(R.id.cancel_button);
cancelButton.setTextColor(getResources().getColor(!getEditor().isLight() ? R.color.osmand_orange : R.color.map_widget_blue));
cancelButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -74,6 +76,7 @@ public abstract class PointEditorFragment extends Fragment {
});
Button deleteButton = (Button) view.findViewById(R.id.delete_button);
deleteButton.setTextColor(getResources().getColor(!getEditor().isLight() ? R.color.osmand_orange : R.color.map_widget_blue));
deleteButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -87,6 +90,11 @@ public abstract class PointEditorFragment extends Fragment {
deleteButton.setVisibility(View.VISIBLE);
}
view.findViewById(R.id.background_layout).setBackgroundResource(!getEditor().isLight() ? R.color.ctx_menu_info_view_bg_dark : R.color.ctx_menu_info_view_bg_light);
view.findViewById(R.id.buttons_layout).setBackgroundResource(!getEditor().isLight() ? R.color.ctx_menu_info_view_bg_dark : R.color.ctx_menu_info_view_bg_light);
view.findViewById(R.id.title_view).setBackgroundResource(!getEditor().isLight() ? R.color.bg_color_dark : R.color.bg_color_light);
view.findViewById(R.id.description_info_view).setBackgroundResource(!getEditor().isLight() ? R.color.ctx_menu_info_view_bg_dark : R.color.ctx_menu_info_view_bg_light);
TextView nameCaption = (TextView) view.findViewById(R.id.name_caption);
AndroidUtils.setTextSecondaryColor(view.getContext(), nameCaption, !getEditor().isLight());
nameCaption.setText(getNameCaption());