mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 05:39:53 +01:00
Use ConstraintLayout for intro fragment.
This commit is contained in:
@@ -1,63 +1,77 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<ScrollView
|
<ScrollView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/scrollView"
|
android:id="@+id/scrollView"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<android.support.constraint.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="@dimen/margin_large">
|
android:padding="@dimen/margin_large">
|
||||||
|
|
||||||
<LinearLayout
|
<ImageView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/diagram"
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:layout_weight="1"
|
||||||
android:padding="@dimen/margin_medium">
|
android:adjustViewBounds="true"
|
||||||
|
android:padding="@dimen/margin_medium"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/qr_code_intro"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/explanationText"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/explanationText"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/explanationImage"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_gravity="center_vertical"
|
android:adjustViewBounds="true"
|
||||||
android:adjustViewBounds="true"
|
android:paddingTop="@dimen/margin_large"
|
||||||
android:padding="@dimen/margin_medium"
|
android:paddingLeft="@dimen/margin_large"
|
||||||
android:scaleType="fitCenter"
|
android:paddingRight="@dimen/margin_large"
|
||||||
android:src="@drawable/qr_code_intro"/>
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/qr_code_explanation"
|
||||||
|
tools:ignore="ContentDescription"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/diagram"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/explanationText"/>
|
||||||
|
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:id="@+id/explanationText"
|
||||||
android:layout_height="wrap_content"
|
style="@style/BriarTextBody"
|
||||||
android:layout_weight="1"
|
android:layout_width="0dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/border_explanation"
|
android:layout_weight="1"
|
||||||
android:orientation="vertical"
|
android:padding="@dimen/margin_large"
|
||||||
android:padding="@dimen/margin_large">
|
android:text="@string/face_to_face"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/explanationImage"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/diagram"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"/>
|
||||||
|
|
||||||
<ImageView
|
<View
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/explanationBorder"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:adjustViewBounds="true"
|
android:layout_height="0dp"
|
||||||
android:padding="@dimen/margin_medium"
|
android:background="@drawable/border_explanation"
|
||||||
android:scaleType="fitCenter"
|
app:layout_constraintTop_toTopOf="@id/explanationImage"
|
||||||
android:src="@drawable/qr_code_explanation"
|
app:layout_constraintStart_toStartOf="@id/explanationImage"
|
||||||
tools:ignore="ContentDescription"/>
|
app:layout_constraintEnd_toEndOf="@id/explanationImage"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/explanationText"/>
|
||||||
|
|
||||||
<TextView
|
<android.support.constraint.Barrier
|
||||||
style="@style/BriarTextBody"
|
android:id="@+id/barrier"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/margin_medium"
|
app:barrierDirection="bottom"
|
||||||
android:text="@string/face_to_face"/>
|
app:constraint_referenced_ids="diagram,explanationBorder"/>
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/continueButton"
|
android:id="@+id/continueButton"
|
||||||
@@ -66,8 +80,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="@dimen/margin_medium"
|
android:layout_marginTop="@dimen/margin_medium"
|
||||||
android:text="@string/continue_button"/>
|
android:text="@string/continue_button"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/barrier"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
@@ -2,56 +2,62 @@
|
|||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/scrollView"
|
android:id="@+id/scrollView"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<android.support.constraint.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:padding="@dimen/margin_large">
|
||||||
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">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/diagram"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
|
android:paddingBottom="@dimen/margin_large"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/qr_code_intro"
|
android:src="@drawable/qr_code_intro"
|
||||||
tools:ignore="ContentDescription"/>
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/explanationImage"/>
|
||||||
|
|
||||||
<LinearLayout
|
<ImageView
|
||||||
|
android:id="@+id/explanationImage"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:paddingTop="@dimen/margin_large"
|
||||||
|
android:paddingLeft="@dimen/margin_large"
|
||||||
|
android:paddingRight="@dimen/margin_large"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/qr_code_explanation"
|
||||||
|
tools:ignore="ContentDescription"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/diagram"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/explanationText"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/explanationText"
|
||||||
|
style="@style/BriarTextBody"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/margin_small"
|
android:padding="@dimen/margin_large"
|
||||||
android:layout_marginRight="@dimen/margin_small"
|
android:text="@string/face_to_face"
|
||||||
android:layout_marginTop="@dimen/margin_xlarge"
|
app:layout_constraintTop_toBottomOf="@id/explanationImage"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/continueButton"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/explanationBorder"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
android:background="@drawable/border_explanation"
|
android:background="@drawable/border_explanation"
|
||||||
android:orientation="vertical"
|
app:layout_constraintTop_toTopOf="@id/explanationImage"
|
||||||
android:padding="@dimen/margin_large">
|
app:layout_constraintStart_toStartOf="@id/explanationImage"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/explanationImage"
|
||||||
<ImageView
|
app:layout_constraintBottom_toBottomOf="@id/explanationText"/>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:padding="@dimen/margin_medium"
|
|
||||||
android:src="@drawable/qr_code_explanation"
|
|
||||||
android:contentDescription="@string/face_to_face"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/BriarTextBody"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/margin_medium"
|
|
||||||
android:text="@string/face_to_face"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/continueButton"
|
android:id="@+id/continueButton"
|
||||||
@@ -60,8 +66,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="@dimen/margin_medium"
|
android:layout_marginTop="@dimen/margin_medium"
|
||||||
android:text="@string/continue_button"/>
|
android:text="@string/continue_button"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/explanationText"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
Reference in New Issue
Block a user