First part of BQP UI improvements.

Includes parallel improvements to Bluetooth key exchange UI.
This commit is contained in:
str4d
2016-04-01 03:24:24 +00:00
committed by akwizgran
parent 5f5ceedc29
commit b81a567468
22 changed files with 443 additions and 134 deletions

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
@@ -12,14 +12,15 @@
android:layout_width="@dimen/dropdown_picture_size"
android:layout_height="@dimen/dropdown_picture_size"
android:layout_margin="@dimen/margin_small"
app:civ_border_width="@dimen/avatar_border_width"
app:civ_border_color="@color/briar_text_primary"/>
app:civ_border_color="@color/briar_text_primary"
app:civ_border_width="@dimen/avatar_border_width"/>
<TextView
android:id="@+id/nameView"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_small"
android:layout_weight="1"
android:ellipsize="end"
android:singleLine="true"
android:textSize="@dimen/text_size_medium"

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<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">
<TextView
android:id="@+id/yourNicknameView"
style="@style/BriarTextBody"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/your_nickname"/>
<Spinner
android:id="@+id/spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_medium"
android:background="@drawable/spinner_border"
android:spinnerMode="dropdown"/>
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_xlarge"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/qr_code_intro"/>
<TextView
android:id="@+id/faceToFaceView"
style="@style/BriarTextBody"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_xlarge"
android:text="@string/face_to_face"/>
<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>

View File

@@ -1,32 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/qr_layout"
<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"
android:orientation="vertical"
android:weightSum="2">
android:layout_height="match_parent">
<FrameLayout
<org.briarproject.android.util.CameraView
android:id="@+id/camera_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@android:color/black"
android:gravity="center">
android:layout_height="match_parent"/>
<RelativeLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/background_light">
android:layout_height="0dp"
android:layout_weight="1">
<LinearLayout
android:id="@+id/status_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_height="match_parent"
android:background="@android:color/background_light"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/margin_medium">
android:padding="@dimen/margin_medium"
android:visibility="invisible">
<ProgressBar
android:layout_width="wrap_content"
@@ -41,19 +43,25 @@
android:paddingTop="@dimen/margin_large"
tools:text="Connection failed"/>
</LinearLayout>
</RelativeLayout>
</FrameLayout>
<org.briarproject.android.util.CameraView
android:id="@+id/camera_view"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</FrameLayout>
android:layout_height="0dp"
android:layout_weight="1"
android:background="@android:color/white">
<ImageView
android:id="@+id/qr_code"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:scaleType="fitCenter"/>
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:paddingTop="@dimen/margin_large"/>
</LinearLayout>
<ImageView
android:id="@+id/qr_code"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitCenter"/>
</RelativeLayout>
</LinearLayout>
</FrameLayout>

View File

@@ -18,18 +18,6 @@
android:paddingLeft="@dimen/margin_activity_horizontal"
android:paddingTop="@dimen/margin_activity_vertical">
<TextView
android:id="@+id/stepView"
style="@style/BriarTextBody"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:padding="@dimen/margin_medium"
tools:text="Step 3/3"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
<TextView
android:id="@+id/connectedView"
style="@style/BriarTextTitle"
@@ -38,7 +26,6 @@
android:layout_height="wrap_content"
android:text="@string/connected_to_contact"
android:padding="@dimen/margin_medium"
android:layout_below="@+id/stepView"
android:layout_centerHorizontal="true"
android:drawableLeft="@drawable/navigation_accept"
android:drawableStart="@drawable/navigation_accept"

View File

@@ -18,18 +18,6 @@
android:paddingLeft="@dimen/margin_activity_horizontal"
android:paddingTop="@dimen/margin_activity_vertical">
<TextView
android:id="@+id/stepView"
style="@style/BriarTextBody"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="@dimen/margin_medium"
tools:text="Step 2/3"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
<TextView
android:id="@+id/yourCodeView"
style="@style/BriarTextBody"
@@ -37,7 +25,6 @@
android:layout_height="wrap_content"
android:text="@string/your_invitation_code"
android:layout_marginTop="@dimen/margin_medium"
android:layout_below="@+id/stepView"
android:layout_centerHorizontal="true"/>
<TextView

View File

@@ -1,69 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
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">
<LinearLayout
android:orientation="vertical"
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:paddingLeft="@dimen/margin_activity_horizontal"
android:paddingTop="@dimen/margin_activity_vertical">
<TextView
android:id="@+id/stepView"
style="@style/BriarTextBody"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
tools:text="Step 1/3"/>
<TextView
android:id="@+id/yourNicknameView"
style="@style/BriarTextBody"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/your_nickname"
android:layout_marginTop="@dimen/margin_medium"/>
android:text="@string/your_nickname"/>
<Spinner
android:id="@+id/spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/spinner"
android:spinnerMode="dropdown"
android:layout_marginTop="@dimen/margin_medium"/>
android:background="@drawable/spinner_border"
android:layout_marginTop="@dimen/margin_medium"
android:spinnerMode="dropdown"/>
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/imageView"
android:src="@drawable/bluetooth"
android:scaleType="fitCenter"
android:layout_marginTop="@dimen/margin_xlarge"
android:adjustViewBounds="true"
android:layout_marginTop="@dimen/margin_medium"/>
android:scaleType="fitCenter"
android:src="@drawable/bluetooth"/>
<TextView
android:id="@+id/faceToFaceView"
style="@style/BriarTextBody"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/face_to_face"
android:layout_marginTop="@dimen/margin_medium"/>
android:layout_marginTop="@dimen/margin_xlarge"
android:text="@string/face_to_face"/>
<Button
android:id="@+id/continueButton"
style="@style/BriarButton.Default"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/continue_button"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/margin_medium"/>
android:layout_marginTop="@dimen/margin_medium"
android:text="@string/continue_button"/>
</LinearLayout>
</ScrollView>