0
0
Fork 0
mirror of https://github.com/YTVanced/VancedMicroG synced 2024-12-05 01:07:27 +00:00

EN: Add scrolling to confirmation dialog

Useful for small screen + large font devices
This commit is contained in:
Marvin W 2020-12-08 20:22:37 +01:00
parent bce7541693
commit d9d3325cc5
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A

View file

@ -23,65 +23,77 @@
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
tools:text="@string/exposure_confirm_start_title" /> tools:text="@string/exposure_confirm_start_title" />
<TextView <ScrollView
android:id="@android:id/summary"
style="@style/TextAppearance.AppCompat.Small"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:padding="16dp"
tools:text="Your phone needs to use Bluetooth to securely collect and share IDs with other phones that are nearby.\n\nCorona Warn can notify you if you were exposed to someone who reported to be diagnosed positive.\n\nThe date, duration, and signal strength associated with an exposure will be shared with the app." />
<LinearLayout <LinearLayout
android:id="@+id/grant_permission_view" android:layout_width="match_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:background="?attr/colorAccent"
android:clipToPadding="false"
android:padding="16dp"
android:visibility="gone"
tools:visibility="visible">
<TextView
android:id="@+id/grant_permission_summary"
style="@style/TextAppearance.AppCompat.Small.Inverse"
android:layout_width="0dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:animateLayoutChanges="true"
android:text="@string/exposure_confirm_permission_description" /> android:orientation="vertical">
<Button <TextView
android:id="@+id/grant_permission_button" android:id="@android:id/summary"
style="@style/Widget.AppCompat.Button.Borderless" style="@style/TextAppearance.AppCompat.Small"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:padding="16dp"
android:layout_marginRight="-8dp" tools:text="Your phonre needs to use Bluetooth to securely collect and share IDs with other phones that are nearby.\n\nCorona Warn can notify you if you were exposed to someone who reported to be diagnosed positive.\n\nThe date, duration, and signal strength associated with an exposure will be shared with the app." />
android:text="@string/exposure_confirm_permission_button"
android:textColor="?android:attr/textColorPrimaryInverse" />
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:id="@+id/grant_permission_view"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:gravity="end" android:layout_height="wrap_content"
android:paddingLeft="8dp" android:layout_marginBottom="8dp"
android:paddingTop="0dp" android:background="?attr/colorAccent"
android:paddingRight="8dp" android:clipToPadding="false"
android:paddingBottom="8dp"> android:visibility="gone"
tools:visibility="visible">
<Button <TextView
android:id="@android:id/button2" android:id="@+id/grant_permission_summary"
style="@style/Widget.AppCompat.Button.Borderless.Colored" style="@style/TextAppearance.AppCompat.Small.Inverse"
android:layout_width="wrap_content" android:layout_width="0dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@android:string/cancel" /> android:layout_weight="1"
android:padding="16dp"
android:text="@string/exposure_confirm_permission_description" />
<Button <Button
android:id="@android:id/button1" android:id="@+id/grant_permission_button"
style="@style/Widget.AppCompat.Button.Borderless.Colored" style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@android:string/ok" /> android:layout_gravity="center_vertical"
</LinearLayout> android:padding="16dp"
android:text="@string/exposure_confirm_permission_button"
android:textColor="?android:attr/textColorPrimaryInverse" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end"
android:paddingLeft="8dp"
android:paddingTop="0dp"
android:paddingRight="8dp"
android:paddingBottom="8dp">
<Button
android:id="@android:id/button2"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@android:string/cancel" />
<Button
android:id="@android:id/button1"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@android:string/ok" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout> </LinearLayout>