diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-06-02 20:40:52 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-06-03 16:26:08 +0000 |
| commit | 8361386fc2a99ee4d7496c8ccddc24a472cd9690 (patch) | |
| tree | 538377a99562cc919f9825c7ecc590b8cd71c289 /android/src/main | |
| parent | a2a7edff41eedbb710ac2f2c1f7dffd5deea78ab (diff) | |
| download | mullvadvpn-8361386fc2a99ee4d7496c8ccddc24a472cd9690.tar.xz mullvadvpn-8361386fc2a99ee4d7496c8ccddc24a472cd9690.zip | |
Add a scroll view to the Connect screen
Diffstat (limited to 'android/src/main')
| -rw-r--r-- | android/src/main/res/layout/connect.xml | 248 |
1 files changed, 129 insertions, 119 deletions
diff --git a/android/src/main/res/layout/connect.xml b/android/src/main/res/layout/connect.xml index f7615d5929..4d113f1d3d 100644 --- a/android/src/main/res/layout/connect.xml +++ b/android/src/main/res/layout/connect.xml @@ -1,12 +1,11 @@ -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/main_fragment" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/main_fragment" + android:layout_width="match_parent" + android:layout_height="match_parent"> <LinearLayout android:id="@+id/header_bar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="0" + android:layout_alignParentTop="true" android:orientation="horizontal" android:gravity="center_vertical" android:background="@color/red" @@ -38,9 +37,11 @@ <FrameLayout android:id="@+id/notification_banner" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_below="@id/header_bar" android:background="@color/darkBlue" android:visibility="invisible" - android:clickable="false"> + android:clickable="false" + android:elevation="0.25dp"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingVertical="8dp" @@ -91,125 +92,134 @@ android:visibility="gone" /> </RelativeLayout> </FrameLayout> - <Space android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" /> - <ProgressBar android:id="@+id/connecting_spinner" - android:layout_width="60dp" - android:layout_height="60dp" - android:layout_gravity="center" - android:layout_marginBottom="14dp" - android:indeterminate="true" - android:indeterminateOnly="true" - android:indeterminateDuration="600" - android:indeterminateDrawable="@drawable/icon_spinner" - android:visibility="invisible" /> - <LinearLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight="0" - android:orientation="vertical" - android:gravity="start"> - <TextView android:id="@+id/connection_status" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginBottom="4dp" - android:layout_marginHorizontal="24dp" - android:textColor="@color/red" - android:textSize="16sp" - android:textStyle="bold" - android:text="@string/unsecured_connection" - android:textAllCaps="true" /> - <TextView android:id="@+id/city" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginHorizontal="24dp" - android:textColor="@color/white" - android:textSize="34sp" - android:textStyle="bold" - android:text="" /> - <TextView android:id="@+id/country" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginHorizontal="24dp" - android:textColor="@color/white" - android:textSize="34sp" - android:textStyle="bold" - android:text="" /> - <LinearLayout android:id="@+id/tunnel_info" + <ScrollView android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/header_bar" + android:layout_alignParentBottom="true" + android:fillViewport="true"> + <LinearLayout android:id="@+id/body" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight="0" + android:layout_height="match_parent" android:orientation="vertical" - android:paddingHorizontal="24dp" - android:gravity="start" - android:clickable="true" - android:background="?android:attr/selectableItemBackground"> - <LinearLayout android:layout_width="wrap_content" + android:gravity="bottom"> + <ProgressBar android:id="@+id/connecting_spinner" + android:layout_width="60dp" + android:layout_height="60dp" + android:layout_gravity="center" + android:layout_marginBottom="14dp" + android:indeterminate="true" + android:indeterminateOnly="true" + android:indeterminateDuration="600" + android:indeterminateDrawable="@drawable/icon_spinner" + android:visibility="invisible" /> + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal"> - <TextView android:id="@+id/hostname" + android:layout_weight="0" + android:orientation="vertical" + android:gravity="start"> + <TextView android:id="@+id/connection_status" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/white" + android:layout_marginBottom="4dp" + android:layout_marginHorizontal="24dp" + android:textColor="@color/red" android:textSize="16sp" android:textStyle="bold" + android:text="@string/unsecured_connection" + android:textAllCaps="true" /> + <TextView android:id="@+id/city" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginHorizontal="24dp" + android:textColor="@color/white" + android:textSize="34sp" + android:textStyle="bold" android:text="" /> - <ImageView android:id="@+id/chevron" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginHorizontal="5dp" - android:alpha="0.4" - android:src="@drawable/icon_chevron_expand" /> + <TextView android:id="@+id/country" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginHorizontal="24dp" + android:textColor="@color/white" + android:textSize="34sp" + android:textStyle="bold" + android:text="" /> + <LinearLayout android:id="@+id/tunnel_info" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="0" + android:orientation="vertical" + android:paddingHorizontal="24dp" + android:gravity="start" + android:clickable="true" + android:background="?android:attr/selectableItemBackground"> + <LinearLayout android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal"> + <TextView android:id="@+id/hostname" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/white" + android:textSize="16sp" + android:textStyle="bold" + android:text="" /> + <ImageView android:id="@+id/chevron" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginHorizontal="5dp" + android:alpha="0.4" + android:src="@drawable/icon_chevron_expand" /> + </LinearLayout> + <TextView android:id="@+id/tunnel_protocol" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="4dp" + android:textColor="@color/white" + android:textSize="13sp" + android:text="" /> + <TextView android:id="@+id/in_address" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/white" + android:textSize="13sp" + android:text="" /> + <TextView android:id="@+id/out_address" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/white" + android:textSize="13sp" + android:text="" /> + </LinearLayout> + </LinearLayout> + <LinearLayout android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="0" + android:orientation="vertical" + android:padding="24dp"> + <Button android:id="@+id/switch_location" + android:layout_marginTop="20dp" + android:layout_marginBottom="16dp" + android:paddingHorizontal="8dp" + android:text="@string/switch_location" + android:drawableRight="@drawable/icon_chevron" + style="@style/White20Button" /> + <LinearLayout android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + <Button android:id="@+id/action_button" + android:layout_weight="1" + android:text="@string/connect" + style="@style/GreenButton" /> + <ImageButton android:id="@+id/reconnect_button" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_weight="0" + android:layout_marginLeft="1dp" + android:paddingHorizontal="10dp" + android:background="@drawable/transparent_red_right_half_button_background" + android:visibility="gone" + android:src="@drawable/icon_reload" /> + </LinearLayout> </LinearLayout> - <TextView android:id="@+id/tunnel_protocol" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="4dp" - android:textColor="@color/white" - android:textSize="13sp" - android:text="" /> - <TextView android:id="@+id/in_address" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/white" - android:textSize="13sp" - android:text="" /> - <TextView android:id="@+id/out_address" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/white" - android:textSize="13sp" - android:text="" /> - </LinearLayout> - </LinearLayout> - <LinearLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight="0" - android:orientation="vertical" - android:padding="24dp"> - <Button android:id="@+id/switch_location" - android:layout_marginTop="20dp" - android:layout_marginBottom="16dp" - android:paddingHorizontal="8dp" - android:text="@string/switch_location" - android:drawableRight="@drawable/icon_chevron" - style="@style/White20Button" /> - <LinearLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal"> - <Button android:id="@+id/action_button" - android:layout_weight="1" - android:text="@string/connect" - style="@style/GreenButton" /> - <ImageButton android:id="@+id/reconnect_button" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_weight="0" - android:layout_marginLeft="1dp" - android:paddingHorizontal="10dp" - android:background="@drawable/transparent_red_right_half_button_background" - android:visibility="gone" - android:src="@drawable/icon_reload" /> </LinearLayout> - </LinearLayout> -</LinearLayout> + </ScrollView> +</RelativeLayout> |
