diff options
Diffstat (limited to 'input/autofill/AutofillFramework/Application/src/main/res/layout')
3 files changed, 201 insertions, 0 deletions
diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/activity_main.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/activity_main.xml index b85f6c58..f441a2ce 100644 --- a/input/autofill/AutofillFramework/Application/src/main/res/layout/activity_main.xml +++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/activity_main.xml @@ -71,6 +71,14 @@ app:labelText="@string/navigation_button_email_compose_label" app:itemLogo="@drawable/ic_email_black_24dp" app:imageColor="@android:color/holo_purple"/> + <com.example.android.autofillframework.app.NavigationItem + android:id="@+id/creditCardCompoundViewButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:infoText="@string/compound_view_credit_card_info" + app:labelText="@string/navigation_button_compound_view_credit_card_label" + app:imageColor="@android:color/holo_blue_light" + app:itemLogo="@drawable/ic_view_module_black_24dp" /> </LinearLayout> </ScrollView>
\ No newline at end of file diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/cc_exp_date.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/cc_exp_date.xml new file mode 100644 index 00000000..aebe9f83 --- /dev/null +++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/cc_exp_date.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<merge xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + <android.support.constraint.ConstraintLayout + android:id="@+id/navigation_item_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <Spinner + android:id="@+id/ccExpMonth" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + android:contentDescription="@string/cc_exp_month_description" + app:layout_constraintBottom_toBottomOf="@+id/monthYearDelimiter" + app:layout_constraintEnd_toStartOf="@+id/monthYearDelimiter" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="@+id/monthYearDelimiter" /> + + <TextView + android:id="@+id/monthYearDelimiter" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/slash" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/ccExpYear" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/ccExpMonth" + app:layout_constraintTop_toTopOf="parent" /> + + <Spinner + android:id="@+id/ccExpYear" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:contentDescription="@string/cc_exp_year_description" + app:layout_constraintBottom_toBottomOf="@+id/monthYearDelimiter" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/monthYearDelimiter" + app:layout_constraintTop_toTopOf="@+id/monthYearDelimiter" /> + </android.support.constraint.ConstraintLayout> +</merge>
\ No newline at end of file diff --git a/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_compound_view_activity.xml b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_compound_view_activity.xml new file mode 100644 index 00000000..e95d0527 --- /dev/null +++ b/input/autofill/AutofillFramework/Application/src/main/res/layout/credit_card_compound_view_activity.xml @@ -0,0 +1,135 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/authLayout" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:paddingBottom="@dimen/activity_vertical_margin" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin"> + + <TextView + android:id="@+id/standard_login_header" + style="@style/TextAppearance.AppCompat.Large" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:gravity="center" + android:text="@string/navigation_button_compound_view_credit_card_label" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintEnd_toStartOf="@+id/imageButton" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintHorizontal_chainStyle="spread" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <com.example.android.autofillframework.app.InfoButton + android:id="@+id/imageButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/spacing_normal" + android:background="@drawable/ic_info_black_24dp" + app:dialogText="@string/compound_view_credit_card_info" + app:layout_constraintBottom_toBottomOf="@+id/standard_login_header" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toEndOf="@+id/standard_login_header" + app:layout_constraintTop_toTopOf="@+id/standard_login_header" /> + + <TextView + android:id="@+id/creditCardNumberLabel" + style="@style/TextAppearance.AppCompat.Body1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="@dimen/spacing_normal" + android:layout_marginStart="@dimen/spacing_normal" + android:layout_marginTop="@dimen/spacing_large" + android:labelFor="@+id/creditCardNumberField" + android:text="@string/credit_card_number_label" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/standard_login_header" /> + + <EditText + android:id="@+id/creditCardNumberField" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/spacing_normal" + android:layout_marginTop="@dimen/spacing_normal" + android:autofillHints="creditCardNumber" + android:ems="12" + android:inputType="number" + android:paddingHorizontal="@dimen/spacing_micro" + app:layout_constraintBottom_toBottomOf="@+id/creditCardNumberLabel" + app:layout_constraintStart_toEndOf="@+id/creditCardNumberLabel" + app:layout_constraintTop_toTopOf="@+id/creditCardNumberLabel" /> + + <TextView + android:id="@+id/creditCardExpirationLabel" + style="@style/TextAppearance.AppCompat.Body1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/spacing_large" + android:labelFor="@+id/creditCardExpirationView" + android:text="@string/credit_card_expiration_label" + app:layout_constraintStart_toStartOf="@id/creditCardNumberLabel" + app:layout_constraintTop_toBottomOf="@+id/creditCardNumberLabel" /> + + <com.example.android.autofillframework.app.CreditCardExpirationDateView + android:id="@+id/creditCardExpirationView" + android:layout_width="250dp" + android:layout_height="wrap_content" + android:layout_marginEnd="8dp" + android:layout_marginStart="@dimen/spacing_normal" + android:layout_marginTop="@dimen/spacing_normal" + android:autofillHints="creditCardExpirationDate" + app:layout_constraintBottom_toBottomOf="@+id/creditCardExpirationLabel" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/creditCardExpirationLabel" + app:layout_constraintTop_toTopOf="@+id/creditCardExpirationLabel" /> + + <TextView + android:id="@+id/clearButton" + style="@style/Widget.AppCompat.Button.Borderless" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/spacing_normal" + android:layout_marginTop="@dimen/spacing_normal" + android:text="@string/clear_label" + android:textColor="@android:color/holo_blue_dark" + app:layout_constraintEnd_toStartOf="@+id/submitButton" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintHorizontal_chainStyle="packed" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/creditCardExpirationView" /> + + <TextView + android:id="@+id/submitButton" + 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/clearButton" + app:layout_constraintTop_toTopOf="@+id/clearButton" /> + +</android.support.constraint.ConstraintLayout>
\ No newline at end of file |