Perform some layout changes
The idea is to make it as practical as possible for the user: - I would use the long click for something else, maybe a small menu about the continent/country - The edit button at the top should enable/disable the checkboxes (but it should be aligned on the right) - Issue: When enabling a country, then the whole continent it belongs to, and then disabling the continent again, there is no undetermined state anymore, the box is unchecked
This commit is contained in:
@ -5,7 +5,48 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<com.caverock.androidsvg.SVGImageView
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
app:css="" >
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textStyle="bold"
|
||||
android:textSize="18sp"
|
||||
android:text="@string/app_name" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/edit"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:contentDescription="Edit"
|
||||
android:scaleX="0.35"
|
||||
android:scaleY="0.35"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toStartOf="@+id/textView"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="@color/design_default_color_primary"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/edit" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
<com.caverock.androidsvg.SVGImageView
|
||||
android:id="@+id/map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -15,7 +56,7 @@
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/sv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -14,14 +14,34 @@
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:contentDescription=">"
|
||||
android:scaleX="0.5"
|
||||
android:scaleY="0.5"
|
||||
android:scaleX="0.35"
|
||||
android:scaleY="0.35"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toStartOf="@+id/textView"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="@color/design_default_color_primary"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:textColor="@color/design_default_color_on_primary"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:paddingStart="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/checkBox"
|
||||
app:layout_constraintEnd_toStartOf="@+id/checkBox"
|
||||
app:layout_constraintStart_toEndOf="@+id/expand"
|
||||
app:layout_constraintTop_toTopOf="@+id/expand"
|
||||
app:layout_constraintVertical_bias="1.0" />
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/checkBox"
|
||||
android:layout_width="wrap_content"
|
||||
@ -34,23 +54,11 @@
|
||||
app:layout_constraintTop_toTopOf="@+id/textView"
|
||||
app:layout_constraintVertical_bias="0.5" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:textColor="@color/design_default_color_on_primary"
|
||||
app:layout_constraintBottom_toBottomOf="@id/checkBox"
|
||||
app:layout_constraintEnd_toStartOf="@+id/checkBox"
|
||||
app:layout_constraintStart_toEndOf="@+id/expand"
|
||||
app:layout_constraintTop_toTopOf="@+id/expand"
|
||||
app:layout_constraintVertical_bias="1.0" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/sub_item"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="32dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
Reference in New Issue
Block a user