1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-25 22:01:16 +00:00

Simplify welcome wizard layouts (fixes #1626, fixes #1723) (#1727)

This commit is contained in:
ziem 2021-11-18 20:17:31 +01:00 committed by GitHub
parent 9b4eb57732
commit 7639babd14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 82 additions and 100 deletions

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_screen1">
android:background="@color/bg_screen1"
android:fillViewport="true"
android:paddingBottom="@dimen/dots_full_height">
<LinearLayout
android:background="@color/bg_screen1"
android:gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/welcome_title"
android:layout_margin="30dp"
android:gravity="center"
android:text="@string/welcome_title"
android:textColor="@android:color/white"
android:textSize="30sp"
android:layout_margin="30dp" />
android:textSize="30sp" />
<ImageView
android:layout_width="@dimen/img_width_height"
@ -36,24 +36,19 @@
android:textSize="@dimen/slide_title"
android:textStyle="bold" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/desc_marginTop"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingBottom="@dimen/desc_paddingBottom"
android:text="@string/welcome_text"
android:textAlignment="center"
android:layout_gravity="center_horizontal"
android:textColor="@android:color/white"
android:textSize="@dimen/slide_desc" />
</ScrollView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/desc_marginTop"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingBottom="@dimen/desc_paddingBottom"
android:text="@string/welcome_text"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="@dimen/slide_desc" />
</LinearLayout>
</RelativeLayout>
</ScrollView>

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_screen2">
android:background="@color/bg_screen2"
android:fillViewport="true"
android:paddingBottom="@dimen/dots_full_height">
<LinearLayout
android:background="@color/bg_screen2"
android:gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/welcome_title"
android:layout_margin="30dp"
android:gravity="center"
android:text="@string/welcome_title"
android:textColor="@android:color/white"
android:textSize="30sp"
android:layout_margin="30dp" />
android:textSize="30sp" />
<ImageView
android:layout_width="@dimen/img_width_height"
@ -33,14 +33,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:paddingEnd="40dp"
android:paddingLeft="40dp"
android:paddingRight="40dp"
android:paddingStart="40dp"
android:text="@string/grant_permission"
android:contentDescription="@string/grant_permission"
android:drawableLeft="@android:drawable/ic_menu_save"
android:drawableStart="@android:drawable/ic_menu_save"
android:drawableLeft="@android:drawable/ic_menu_save"
android:paddingStart="40dp"
android:paddingLeft="40dp"
android:paddingEnd="40dp"
android:paddingRight="40dp"
android:text="@string/grant_permission"
android:textSize="12sp" />
<TextView
@ -51,26 +51,19 @@
android:textSize="@dimen/slide_title"
android:textStyle="bold" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/desc_marginTop"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingBottom="@dimen/desc_paddingBottom"
android:text="@string/storage_permission_desc"
android:textAlignment="center"
android:layout_gravity="center_horizontal"
android:textColor="@android:color/white"
android:textSize="@dimen/slide_desc" />
</ScrollView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/desc_marginTop"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingBottom="@dimen/desc_paddingBottom"
android:text="@string/storage_permission_desc"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="@dimen/slide_desc" />
</LinearLayout>
</RelativeLayout>
</ScrollView>

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_screen3">
android:background="@color/bg_screen3"
android:fillViewport="true"
android:paddingBottom="@dimen/dots_full_height">
<LinearLayout
android:background="@color/bg_screen3"
android:gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/welcome_title"
android:layout_margin="30dp"
android:gravity="center"
android:text="@string/welcome_title"
android:textColor="@android:color/white"
android:textSize="30sp"
android:layout_margin="30dp" />
android:textSize="30sp" />
<ImageView
android:layout_width="@dimen/img_width_height"
@ -33,14 +33,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:paddingEnd="40dp"
android:paddingLeft="40dp"
android:paddingRight="40dp"
android:paddingStart="40dp"
android:text="@string/grant_permission"
android:contentDescription="@string/grant_permission"
android:drawableLeft="@android:drawable/ic_menu_mylocation"
android:drawableStart="@android:drawable/ic_menu_mylocation"
android:drawableLeft="@android:drawable/ic_menu_mylocation"
android:paddingStart="40dp"
android:paddingLeft="40dp"
android:paddingEnd="40dp"
android:paddingRight="40dp"
android:text="@string/grant_permission"
android:textSize="12sp" />
<TextView
@ -48,31 +48,24 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/location_permission_title"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="@dimen/slide_title"
android:textStyle="bold"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/desc_marginTop"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingBottom="@dimen/desc_paddingBottom"
android:text="@string/location_permission_desc"
android:textAlignment="center"
/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/desc_marginTop"
android:paddingLeft="@dimen/desc_padding"
android:paddingRight="@dimen/desc_padding"
android:paddingBottom="@dimen/desc_paddingBottom"
android:text="@string/location_permission_desc"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="@dimen/slide_desc" />
</ScrollView>
android:textColor="@android:color/white"
android:textSize="@dimen/slide_desc" />
</LinearLayout>
</RelativeLayout>
</ScrollView>

View file

@ -6,6 +6,7 @@
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="dots_height">30dp</dimen>
<dimen name="dots_margin_bottom">20dp</dimen>
<dimen name="dots_full_height">50dp</dimen>
<dimen name="img_width_height">120dp</dimen>
<dimen name="slide_title">30sp</dimen>
<dimen name="slide_desc">16sp</dimen>