Redesign "Add" button

This commit is contained in:
Alexander Sytnyk 2018-02-16 12:25:52 +02:00
parent 1a2ed58b6f
commit 59435f1eb2
3 changed files with 15 additions and 15 deletions

View file

@ -29,6 +29,8 @@
android:id="@+id/add_marker_button"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_margin="@dimen/route_info_button_go_margin"
android:layout_weight="3"
android:ellipsize="end"
android:gravity="center"
@ -36,12 +38,9 @@
android:text="@string/shared_string_add"
android:textAllCaps="true"
android:textColor="@color/keyboard_item_button_text_color"
android:textSize="@dimen/default_list_text_size"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="?attr/keyboard_controls_divider"/>
android:textSize="@dimen/default_list_text_size"
android:textStyle="bold"
tools:background="@drawable/route_info_go_btn_bg_dark"/>
<ImageView
android:id="@+id/show_hide_keyboard_icon"

View file

@ -108,7 +108,7 @@
android:id="@+id/keyboard_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?attr/keyboard_controls_divider"/>
tools:background="@color/keyboard_divider_dark"/>
<LinearLayout
android:layout_width="match_parent"
@ -118,6 +118,8 @@
android:id="@+id/add_marker_button"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:layout_margin="@dimen/route_info_button_go_margin"
android:layout_weight="3"
android:ellipsize="end"
android:gravity="center"
@ -125,12 +127,9 @@
android:text="@string/shared_string_add"
android:textAllCaps="true"
android:textColor="@color/keyboard_item_button_text_color"
android:textSize="@dimen/default_list_text_size"/>
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="?attr/keyboard_controls_divider"/>
android:textSize="@dimen/default_list_text_size"
android:textStyle="bold"
tools:background="@drawable/route_info_go_btn_bg_dark"/>
<ImageView
android:id="@+id/show_hide_keyboard_icon"

View file

@ -297,7 +297,7 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
});
TextView addButton = (TextView) mainView.findViewById(R.id.add_marker_button);
addButton.setBackgroundResource(lightTheme ? R.drawable.keyboard_item_add_button_light_bg : R.drawable.keyboard_item_add_button_dark_bg);
addButton.setBackgroundResource(lightTheme ? R.drawable.route_info_go_btn_bg_light : R.drawable.route_info_go_btn_bg_dark);
addButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@ -314,7 +314,9 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
":", "0", ".", getString(R.string.shared_string_clear)
};
final GridView keyboardGrid = (GridView) mainView.findViewById(R.id.keyboard_grid_view);
setBackgroundColor(keyboardGrid, lightTheme ? R.color.keyboard_divider_light : R.color.keyboard_divider_dark);
int dividersColorResId = lightTheme ? R.color.keyboard_divider_light : R.color.keyboard_divider_dark;
setBackgroundColor(keyboardGrid, dividersColorResId);
setBackgroundColor(R.id.keyboard_divider, dividersColorResId);
final KeyboardAdapter keyboardAdapter = new KeyboardAdapter(mapActivity, keyboardItems);
keyboardGrid.setAdapter(keyboardAdapter);
keyboardGrid.setOnItemClickListener(new AdapterView.OnItemClickListener() {