fix bottom button and change layout again to fit better

This commit is contained in:
osodebailar 2020-09-30 20:15:07 +02:00
parent 8d93ab6e79
commit 42e37710f2
3 changed files with 12 additions and 8 deletions

View file

@ -66,7 +66,7 @@ object PrefImportSummaryDialog {
rowLayout.setOnClickListener { rowLayout.setOnClickListener {
val msg = "[${context.getString(metaKey.label)}] ${metaEntry.info}" val msg = "[${context.getString(metaKey.label)}] ${metaEntry.info}"
when (metaEntry.status) { when (metaEntry.status) {
PrefsStatus.WARN -> ToastUtils.Long.warnToast(context, msg) PrefsStatus.WARN -> ToastUtils.Long.warnToast(context, msg)
PrefsStatus.ERROR -> ToastUtils.Long.errorToast(context, msg) PrefsStatus.ERROR -> ToastUtils.Long.errorToast(context, msg)
else -> ToastUtils.Long.infoToast(context, msg) else -> ToastUtils.Long.infoToast(context, msg)
} }
@ -132,6 +132,9 @@ object PrefImportSummaryDialog {
} }
val dialog = builder.show() val dialog = builder.show()
val textView = dialog.findViewById<View>(android.R.id.message) as TextView?
textView!!.textSize = 12f
textView!!.setPadding(10,0,0,0)
dialog.setCanceledOnTouchOutside(false) dialog.setCanceledOnTouchOutside(false)
} }

View file

@ -2,15 +2,15 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="wrap_content">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/scroll_content_frame" android:id="@+id/scroll_content_frame"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="150dp" android:layout_height="210dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
d
<RelativeLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
@ -29,7 +29,8 @@
style="?android:attr/buttonStyle" style="?android:attr/buttonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="bottom|center_horizontal"
android:gravity="bottom"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
@ -38,7 +39,7 @@
android:textColor="@color/colorTreatmentButton" android:textColor="@color/colorTreatmentButton"
android:visibility="gone" /> android:visibility="gone" />
</RelativeLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>

View file

@ -28,7 +28,7 @@
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginStart="2dp" android:layout_marginStart="2dp"
android:layout_marginEnd="50dp" android:layout_marginEnd="40dp"
android:layout_toEndOf="@id/alertdialog_icon" android:layout_toEndOf="@id/alertdialog_icon"
android:ellipsize="marquee" android:ellipsize="marquee"
android:focusable="true" android:focusable="true"