更新
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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">
|
||||
|
||||
@@ -20,8 +21,8 @@
|
||||
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"
|
||||
@@ -29,200 +30,208 @@
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
<!-- 按窗口宽度测量,大屏内容居中,手机保持占满宽度。 -->
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="26dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="32dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<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"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="26dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="32dp">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="6dp">
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardPreventCornerOverlap="false">
|
||||
|
||||
<LinearLayout
|
||||
<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="11" />
|
||||
</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_region" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_address_region"
|
||||
style="@style/AddressFormInput"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingVertical="12dp"
|
||||
android:hint="@string/address_region_hint"
|
||||
android:inputType="textPostalAddress"
|
||||
android:maxLength="80" />
|
||||
</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="63dp"
|
||||
android:minHeight="59dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:background="@drawable/change_binding_code_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:padding="14dp"
|
||||
android:text="@string/address_shipping_hint"
|
||||
android:textColor="#E65E00"
|
||||
android:textSize="11sp" />
|
||||
|
||||
<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
|
||||
<TextView
|
||||
android:id="@+id/tv_address_save"
|
||||
style="@style/AddressPrimaryButton"
|
||||
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="11" />
|
||||
</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_region" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_address_region"
|
||||
style="@style/AddressFormInput"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingVertical="12dp"
|
||||
android:hint="@string/address_region_hint"
|
||||
android:inputType="textPostalAddress"
|
||||
android:maxLength="80" />
|
||||
</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" />
|
||||
</LinearLayout>
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user