Skip to content

Commit

Permalink
Extended AccountRemovalDialog
Browse files Browse the repository at this point in the history
- list item is now clickable as a whole
- commented out includeBuild in settings.gradle

Signed-off-by: ZetaTom <[email protected]>
  • Loading branch information
ZetaTom committed Oct 12, 2023
1 parent 550f487 commit 2f353f5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ class AccountRemovalDialog : DialogFragment(), AvatarGenerationListener, Injecta
.setPositiveButton(R.string.delete_account) { _, _ -> removeAccount() }

// allow selection by clicking on list element
binding.localRemoveText.setOnClickListener {
binding.localRemove.setOnClickListener {
binding.radioLocalRemove.performClick()
}
binding.requestDeletionText.setOnClickListener {
binding.requestDeletion.setOnClickListener {
binding.radioRequestDeletion.performClick()
}

Expand Down
17 changes: 12 additions & 5 deletions app/src/main/res/layout/account_removal_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingHorizontal="24dp">
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="12dp">
android:padding="12dp"
android:paddingHorizontal="24dp">

<ImageView
android:id="@+id/user_icon"
Expand Down Expand Up @@ -71,10 +71,15 @@
android:layout_height="wrap_content" />

<LinearLayout
android:id="@+id/local_remove"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="24dp"
android:paddingVertical="8dp">

<androidx.appcompat.widget.AppCompatRadioButton
Expand All @@ -84,7 +89,6 @@
tools:checked="true" />

<LinearLayout
android:id="@+id/local_remove_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
Expand All @@ -108,8 +112,12 @@
android:id="@+id/request_deletion"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="24dp"
android:paddingVertical="8dp"
android:visibility="gone"
tools:visibility="visible">
Expand All @@ -120,7 +128,6 @@
android:layout_height="wrap_content" />

<LinearLayout
android:id="@+id/request_deletion_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
Expand Down
10 changes: 5 additions & 5 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ include ':appscan'
// }
//}

includeBuild('../android-library') {
dependencySubstitution {
substitute module('com.github.nextcloud:android-library') using project(':library')
}
}
//includeBuild('../android-library') {
// dependencySubstitution {
// substitute module('com.github.nextcloud:android-library') using project(':library')
// }
//}

0 comments on commit 2f353f5

Please sign in to comment.