248 lines
12 KiB
XML
248 lines
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout
|
|
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">
|
|
|
|
<data />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="@color/personal_info_background"
|
|
android:fitsSystemWindows="true"
|
|
android:orientation="vertical">
|
|
|
|
<include
|
|
android:id="@+id/include_title"
|
|
layout="@layout/include_activity_top_title_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="48dp"
|
|
app:title="@{@string/address_add_title}"
|
|
app:titleTextColor="@{@color/personal_info_title_text}" />
|
|
|
|
<!-- 新增与编辑共用表单;键盘弹出时可以滚动到保存按钮。 -->
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1"
|
|
android:fillViewport="true"
|
|
android:scrollbars="none">
|
|
|
|
<!-- 按窗口宽度测量,大屏内容居中,手机保持占满宽度。 -->
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<com.ckkj.griddle.custom.view.AdaptiveContentLayout
|
|
android:layout_gravity="top|center_horizontal"
|
|
app:maxContentWidth="600dp"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:paddingHorizontal="26dp"
|
|
android:paddingTop="4dp"
|
|
android:paddingBottom="32dp">
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:cardCornerRadius="16dp"
|
|
app:cardElevation="1dp"
|
|
app:cardPreventCornerOverlap="false">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:paddingHorizontal="16dp"
|
|
android:paddingVertical="6dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="63dp"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
style="@style/AddressFormLabel"
|
|
android:layout_width="104dp"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/address_recipient" />
|
|
|
|
<EditText
|
|
android:id="@+id/et_address_recipient"
|
|
style="@style/AddressFormInput"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:paddingVertical="12dp"
|
|
android:hint="@string/address_recipient_hint"
|
|
android:inputType="textPersonName"
|
|
android:maxLength="30" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:background="@color/personal_info_divider" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="63dp"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
style="@style/AddressFormLabel"
|
|
android:layout_width="104dp"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/address_mobile" />
|
|
|
|
<EditText
|
|
android:id="@+id/et_address_mobile"
|
|
style="@style/AddressFormInput"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:paddingVertical="12dp"
|
|
android:hint="@string/address_mobile_hint"
|
|
android:inputType="phone"
|
|
android:maxLength="15" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:background="@color/personal_info_divider" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/ll_address_region"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="63dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:foreground="?attr/selectableItemBackground"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal"
|
|
android:paddingVertical="8dp">
|
|
|
|
<TextView
|
|
style="@style/AddressFormLabel"
|
|
android:layout_width="104dp"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/address_region" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_address_region"
|
|
style="@style/AddressFormInput"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:hint="@string/address_region_select"
|
|
android:singleLine="false" />
|
|
|
|
<ImageView
|
|
android:layout_width="16dp"
|
|
android:layout_height="16dp"
|
|
android:layout_marginStart="8dp"
|
|
android:importantForAccessibility="no"
|
|
android:src="@drawable/ic_personal_info_chevron" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:background="@color/personal_info_divider" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="63dp"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal">
|
|
|
|
<TextView
|
|
style="@style/AddressFormLabel"
|
|
android:layout_width="104dp"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/address_detail" />
|
|
|
|
<EditText
|
|
android:id="@+id/et_address_detail"
|
|
style="@style/AddressFormInput"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:paddingVertical="12dp"
|
|
android:hint="@string/address_detail_hint"
|
|
android:inputType="textPostalAddress|textMultiLine"
|
|
android:singleLine="false"
|
|
android:maxLines="3"
|
|
android:maxLength="200" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<androidx.cardview.widget.CardView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="58dp"
|
|
android:layout_marginTop="14dp"
|
|
app:cardCornerRadius="16dp"
|
|
app:cardElevation="1dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal"
|
|
android:paddingHorizontal="16dp">
|
|
|
|
<TextView
|
|
style="@style/AddressFormLabel"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="@string/address_default_label"
|
|
android:textStyle="bold" />
|
|
|
|
<androidx.appcompat.widget.SwitchCompat
|
|
android:id="@+id/switch_address_default"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:contentDescription="@string/address_default_label"
|
|
app:thumbTint="@android:color/white"
|
|
app:trackTint="@color/address_switch_track" />
|
|
</LinearLayout>
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="59dp"
|
|
android:layout_marginTop="14dp"
|
|
android:background="@drawable/change_binding_code_bg"
|
|
android:gravity="center_vertical"
|
|
android:padding="14dp"
|
|
android:text="@string/address_shipping_hint"
|
|
android:textColor="#E65E00"
|
|
android:textSize="11sp" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_address_save"
|
|
style="@style/AddressPrimaryButton"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="50dp"
|
|
android:layout_marginTop="28dp"
|
|
android:text="@string/address_save" />
|
|
</com.ckkj.griddle.custom.view.AdaptiveContentLayout>
|
|
</FrameLayout>
|
|
</androidx.core.widget.NestedScrollView>
|
|
</LinearLayout>
|
|
</layout>
|