Add selectable background

This commit is contained in:
Alexander Sytnyk 2017-08-09 11:08:12 +03:00
parent 87795b2e9e
commit 88fc407fa7
3 changed files with 6 additions and 4 deletions

View file

@ -20,6 +20,7 @@
android:id="@+id/up_down_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:paddingBottom="12dp"
android:paddingTop="12dp">
@ -116,7 +117,7 @@
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:background="@null"
android:background="?attr/selectableItemBackground"
android:paddingBottom="14dp"
android:paddingEnd="12dp"
android:paddingLeft="16dp"
@ -132,7 +133,7 @@
android:layout_centerVertical="true"
android:layout_toEndOf="@id/undo_point_button"
android:layout_toRightOf="@id/undo_point_button"
android:background="@null"
android:background="?attr/selectableItemBackground"
android:paddingBottom="14dp"
android:paddingEnd="16dp"
android:paddingLeft="12dp"

View file

@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="?attr/selectableItemBackground"
android:descendantFocusability="blocksDescendants">
<android.support.v7.widget.AppCompatImageView
@ -26,7 +27,7 @@
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@null"
android:background="?attr/selectableItemBackground"
android:focusableInTouchMode="true"
android:paddingBottom="12dp"
android:paddingEnd="16dp"

View file

@ -110,7 +110,7 @@ public class MeasurementToolFragment extends Fragment {
mainView.findViewById(R.id.up_down_row).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!pointsListOpened) {
if (!pointsListOpened && measurementLayer.getPointsCount() > 0) {
showPointsList(mainView, iconsCache.getThemedIcon(R.drawable.ic_action_arrow_down));
} else {
hidePointsList(mainView, iconsCache.getThemedIcon(R.drawable.ic_action_arrow_up));