diff --git a/briar-android/src/main/res/layout-land/fragment_keyagreement_id.xml b/briar-android/src/main/res/layout-land/fragment_keyagreement_id.xml index 155721bb4aa1f0fc0e73f47c13f3fb948c176abd..8a348a8cd3f918c96f9158f1e6e1c3bd2e79b308 100644 --- a/briar-android/src/main/res/layout-land/fragment_keyagreement_id.xml +++ b/briar-android/src/main/res/layout-land/fragment_keyagreement_id.xml @@ -1,47 +1,40 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/scrollView" android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="horizontal"> + android:layout_height="wrap_content" + android:orientation="vertical"> - <ImageView - android:id="@+id/imageView" - android:layout_width="0dp" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_weight="1" - android:adjustViewBounds="true" - android:paddingBottom="@dimen/margin_activity_vertical" - android:paddingEnd="@dimen/margin_activity_horizontal" - android:paddingLeft="@dimen/margin_activity_horizontal" - android:paddingRight="@dimen/margin_activity_horizontal" - android:paddingStart="@dimen/margin_activity_horizontal" - android:paddingTop="@dimen/margin_activity_vertical" - android:scaleType="fitCenter" - android:src="@drawable/qr_code_intro"/> - - <ScrollView - android:id="@+id/scrollView" - android:layout_width="0dp" - android:layout_height="match_parent" - android:layout_weight="1"> + android:orientation="vertical" + android:padding="@dimen/margin_large"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingBottom="@dimen/margin_activity_vertical" - android:paddingEnd="@dimen/margin_activity_horizontal" - android:paddingLeft="@dimen/margin_activity_horizontal" - android:paddingRight="@dimen/margin_activity_horizontal" - android:paddingStart="@dimen/margin_activity_horizontal" - android:paddingTop="@dimen/margin_activity_vertical"> + android:orientation="horizontal" + android:padding="@dimen/margin_medium"> + + <ImageView + android:id="@+id/imageView" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_gravity="center_vertical" + android:adjustViewBounds="true" + android:padding="@dimen/margin_medium" + android:scaleType="fitCenter" + android:src="@drawable/qr_code_intro"/> <LinearLayout - android:layout_width="match_parent" + android:layout_width="0dp" android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_gravity="center_vertical" android:background="@drawable/border_explanation" android:orientation="vertical" android:padding="@dimen/margin_large"> @@ -51,6 +44,7 @@ android:layout_height="wrap_content" android:adjustViewBounds="true" android:padding="@dimen/margin_medium" + android:scaleType="fitCenter" android:src="@drawable/qr_code_explanation" tools:ignore="ContentDescription"/> @@ -63,17 +57,17 @@ </LinearLayout> - <Button - android:id="@+id/continueButton" - style="@style/BriarButton.Default" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginTop="@dimen/margin_medium" - android:text="@string/continue_button"/> - </LinearLayout> - </ScrollView> + <Button + android:id="@+id/continueButton" + style="@style/BriarButton.Default" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginTop="@dimen/margin_medium" + android:text="@string/continue_button"/> + + </LinearLayout> -</LinearLayout> \ No newline at end of file +</ScrollView> \ No newline at end of file diff --git a/briar-android/src/main/res/layout-land/fragment_keyagreement_qr.xml b/briar-android/src/main/res/layout-land/fragment_keyagreement_qr.xml new file mode 100644 index 0000000000000000000000000000000000000000..e9a174c77812fdc41074268acede649e1c3a08e8 --- /dev/null +++ b/briar-android/src/main/res/layout-land/fragment_keyagreement_qr.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <org.briarproject.briar.android.keyagreement.CameraView + android:id="@+id/camera_view" + android:layout_width="match_parent" + android:layout_height="match_parent"/> + + <LinearLayout + android:id="@+id/camera_overlay" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal" + android:weightSum="2"> + + <FrameLayout + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1"> + + <LinearLayout + android:id="@+id/status_container" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@android:color/background_light" + android:gravity="center" + android:orientation="vertical" + android:padding="@dimen/margin_medium" + android:visibility="invisible"> + + <ProgressBar + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + <TextView + android:id="@+id/connect_status" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center" + android:paddingTop="@dimen/margin_large" + tools:text="Connection failed"/> + </LinearLayout> + </FrameLayout> + + <FrameLayout + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1" + android:background="@android:color/white"> + + <ProgressBar + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center"/> + + <ImageView + android:id="@+id/qr_code" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:scaleType="fitCenter" + android:layout_gravity="center"/> + </FrameLayout> + </LinearLayout> + + <RelativeLayout + android:id="@+id/container_progress" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@android:color/white" + android:visibility="invisible"> + + <ProgressBar + android:id="@+id/progress_bar" + style="?android:attr/progressBarStyleLarge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_above="@+id/title_progress_bar" + android:layout_centerHorizontal="true"/> + + <TextView + android:id="@+id/title_progress_bar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_centerInParent="true" + android:gravity="center" + android:paddingTop="@dimen/margin_large" + tools:text="@string/waiting_for_contact_to_scan"/> + </RelativeLayout> + +</FrameLayout>