aboutsummaryrefslogtreecommitdiff
path: root/input/autofill
diff options
context:
space:
mode:
authorDouglas Sigelbaum <sigelbaum@google.com>2017-09-11 11:15:09 -0700
committerDouglas Sigelbaum <sigelbaum@google.com>2017-09-18 15:23:09 -0700
commit96953940b05fbea4b0bd9d0fcf6b159e65620c5e (patch)
tree682beb334163f7b64b182a47eb470e95fc78ea82 /input/autofill
parent3df14deaf37218da7578a5aff7bea1c7b179c21b (diff)
downloadandroid-96953940b05fbea4b0bd9d0fcf6b159e65620c5e.tar.gz
Autofill sample: Fixed top margin.
Bug: 38182790 Change-Id: If78cbdc30f0c2841e7513cc64a03ed3b6a541b9c
Diffstat (limited to 'input/autofill')
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CustomVirtualView.java2
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/MultiplePartitionsActivity.java1
-rw-r--r--input/autofill/AutofillFramework/Application/src/main/res/layout/multiple_partitions_activity.xml28
3 files changed, 22 insertions, 9 deletions
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CustomVirtualView.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CustomVirtualView.java
index f95547af..6c3b3656 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CustomVirtualView.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/CustomVirtualView.java
@@ -53,7 +53,7 @@ public class CustomVirtualView extends View {
private static final String TAG = "CustomView";
private static final int TOP_MARGIN = 100;
private static final int LEFT_MARGIN = 100;
- private static final int TEXT_HEIGHT = 90;
+ private static final int TEXT_HEIGHT = 70;
private static final int VERTICAL_GAP = 10;
private static final int LINE_HEIGHT = TEXT_HEIGHT + VERTICAL_GAP;
private static final int UNFOCUSED_COLOR = Color.BLACK;
diff --git a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/MultiplePartitionsActivity.java b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/MultiplePartitionsActivity.java
index 8a892692..ed380ae5 100644
--- a/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/MultiplePartitionsActivity.java
+++ b/input/autofill/AutofillFramework/Application/src/main/java/com/example/android/autofillframework/app/MultiplePartitionsActivity.java
@@ -32,7 +32,6 @@ import com.example.android.autofillframework.R;
/*
* TODO list
*
- * - Fix top margin.
* - Use a combo box to select which partition is visible (will require changes on CustomView to
* hide a partition).
* - Use a dedicated TextView (instead of Toast) for error messages.
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/multiple_partitions_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/multiple_partitions_activity.xml
index beccc506..13a644f0 100644
--- a/input/autofill/AutofillFramework/Application/src/main/res/layout/multiple_partitions_activity.xml
+++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/multiple_partitions_activity.xml
@@ -42,12 +42,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_info_black_24dp"
- app:layout_constraintBottom_toBottomOf="@+id/custom_virtual_login_header"
+ app:layout_constraintBottom_toBottomOf="@+id/multiple_partitions_header"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
- app:layout_constraintStart_toEndOf="@+id/custom_virtual_login_header"
- app:layout_constraintTop_toTopOf="@+id/custom_virtual_login_header"
- app:dialogText="@string/custom_virtual_login_info"/>
+ app:layout_constraintStart_toEndOf="@+id/multiple_partitions_header"
+ app:layout_constraintTop_toTopOf="@+id/multiple_partitions_header"
+ app:dialogText="@string/multiple_partitions"/>
<com.example.android.autofillframework.app.ScrollableCustomVirtualView
android:id="@+id/custom_view"
@@ -57,7 +57,7 @@
android:layout_marginStart="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/custom_virtual_login_header" />
+ app:layout_constraintTop_toBottomOf="@+id/multiple_partitions_header" />
<TextView
android:id="@+id/clear"
@@ -65,13 +65,27 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_normal"
- android:layout_marginTop="@dimen/spacing_normal"
+ android:layout_marginTop="@dimen/spacing_large"
android:text="@string/clear_label"
android:textColor="@android:color/holo_blue_dark"
- app:layout_constraintEnd_toStartOf="@+id/login"
+ app:layout_constraintEnd_toStartOf="@+id/submit"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/custom_view" />
+ <TextView
+ android:id="@+id/submit"
+ style="@style/Widget.AppCompat.Button.Borderless"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/spacing_normal"
+ android:layout_marginStart="@dimen/spacing_normal"
+ android:text="@string/submit_label"
+ android:textColor="@android:color/holo_blue_dark"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="0.5"
+ app:layout_constraintStart_toEndOf="@+id/clear"
+ app:layout_constraintTop_toTopOf="@+id/clear" />
+
</android.support.constraint.ConstraintLayout>