diff --git a/awesomeDialog/src/main/java/com/example/awesomedialog/AwesomeDialog.kt b/awesomeDialog/src/main/java/com/example/awesomedialog/AwesomeDialog.kt index e69297a..090ec78 100644 --- a/awesomeDialog/src/main/java/com/example/awesomedialog/AwesomeDialog.kt +++ b/awesomeDialog/src/main/java/com/example/awesomedialog/AwesomeDialog.kt @@ -82,13 +82,13 @@ fun AlertDialog.background( fun AlertDialog.position( position: AwesomeDialog.POSITIONS = AwesomeDialog.POSITIONS.BOTTOM ): AlertDialog { - val layoutParams = mainLayout.layoutParams as RelativeLayout.LayoutParams + val layoutParams = scrollLayout.layoutParams as RelativeLayout.LayoutParams if (position == AwesomeDialog.POSITIONS.CENTER) { layoutParams.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE) } else if (position == AwesomeDialog.POSITIONS.BOTTOM) { layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE) } - mainLayout!!.layoutParams = layoutParams + scrollLayout!!.layoutParams = layoutParams return this } diff --git a/awesomeDialog/src/main/res/layout/awesome_dilaog.xml b/awesomeDialog/src/main/res/layout/awesome_dilaog.xml index 22b9a7a..c044d8a 100644 --- a/awesomeDialog/src/main/res/layout/awesome_dilaog.xml +++ b/awesomeDialog/src/main/res/layout/awesome_dilaog.xml @@ -3,98 +3,106 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@android:color/transparent" - android:paddingBottom="@dimen/single_margin"> + android:background="@android:color/transparent"> - + android:overScrollMode="never" + android:layout_alignParentBottom="true"> + - + - + - + - + + + + + + - - \ No newline at end of file