Skip to content

Commit

Permalink
Fix multi items dialog bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhonatan Oliveira Sabadi committed Sep 14, 2021
1 parent ac49428 commit 4895c88
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
14 changes: 13 additions & 1 deletion .idea/sonarlint/issuestore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions android-dialog/src/main/res/layout/multi_item_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:background="@android:color/transparent">

<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:layout_margin="@dimen/dimen_margin_medium"
app:cardBackgroundColor="?android:attr/colorBackground"
Expand All @@ -23,8 +23,7 @@
android:id="@+id/constraint_multi_choice"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/colorBackground"
android:orientation="vertical">
android:background="?android:attr/colorBackground">


<ImageView
Expand All @@ -43,7 +42,6 @@
android:id="@+id/nestedScrollView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_margin_min"
android:background="?android:attr/colorBackground"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -52,11 +50,16 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerViewDialog"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
android:paddingTop="@dimen/dimen_margin_min"
android:paddingBottom="300dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="5"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleDialog"
tools:itemCount="40"
tools:listitem="@layout/recycler_multi_item" />
</androidx.core.widget.NestedScrollView>

Expand Down Expand Up @@ -93,9 +96,10 @@
layout="@layout/base_dialog_actions"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/nestedScrollView3" />
tools:visibility="gone" />

</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,12 @@ class MainActivity : AppCompatActivity() {
}
}

val items = mutableListOf<String>()
for (item in 0..200) {
items.add("Item $item")
}
binding.multiItemDialogButton.setOnClickListener {
multiItemDialog(
mutableListOf(
"Item 1",
"Item 1",
"Item 1"
), R.drawable.ic_alarm
) {
multiItemDialog(items, R.drawable.ic_alarm) {
setLottieImage("moto.json")
title = "Algum titulo"
}
Expand Down

0 comments on commit 4895c88

Please sign in to comment.