123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:paddingStart="@dimen/dp_20"
- android:paddingEnd="@dimen/dp_20"
- android:layout_height="@dimen/dp_45">
- <TextView
- android:id="@+id/item_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="#333"
- android:layout_centerVertical="true"
- android:hint="@string/setting_icecream_title"
- android:textStyle="bold"
- android:textSize="@dimen/sp_15" />
- <FrameLayout
- android:id="@+id/item_icon_frame"
- android:layout_width="wrap_content"
- android:layout_toStartOf="@id/item_name"
- android:layout_marginEnd="@dimen/dp_6"
- android:layout_height="wrap_content">
- <android.support.v7.widget.AppCompatImageView
- android:id="@+id/item_icon"
- android:layout_width="@dimen/dp_42"
- android:layout_height="@dimen/dp_42"
- android:padding="@dimen/dp_4"
- android:visibility="invisible"/>
- </FrameLayout>
- <android.support.v7.widget.AppCompatEditText
- android:id="@+id/item_name"
- android:layout_width="@dimen/dp_160"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:singleLine="true"
- android:hint="@string/setting_icecream_name"
- android:layout_centerVertical="true"
- android:layout_toStartOf="@id/item_price"
- android:layout_marginEnd="@dimen/dp_12"
- android:selectAllOnFocus="true"
- android:textColor="@color/colorPrimaryDark"
- android:textColorHint="@color/color_999"
- android:textSize="@dimen/sp_15"
- android:textStyle="bold"/>
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="#333"
- android:layout_centerVertical="true"
- android:layout_toStartOf="@id/item_price"
- android:layout_marginStart="@dimen/dp_12"
- android:text="@string/price_unit"
- android:textSize="@dimen/sp_15" />
- <android.support.v7.widget.AppCompatEditText
- android:id="@+id/item_price"
- android:layout_width="@dimen/dp_60"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:singleLine="true"
- android:selectAllOnFocus="true"
- android:hint="@string/setting_icecream_price"
- android:inputType="numberDecimal"
- android:layout_centerVertical="true"
- android:layout_marginEnd="@dimen/dp_6"
- android:layout_toLeftOf="@id/item_switch"
- android:textColorHint="@color/color_999"
- android:textColor="@color/colorPrimaryDark"
- android:textSize="@dimen/sp_15"
- android:textStyle="bold"/>
- <LinearLayout
- android:id="@+id/item_switch"
- android:layout_width="wrap_content"
- android:layout_height="@dimen/dp_36"
- android:layout_centerVertical="true"
- android:layout_alignParentEnd="true"
- android:background="@drawable/bg_switch_off"
- android:orientation="horizontal">
- <View
- android:id="@+id/item_switch_icon"
- android:layout_width="@dimen/dp_32"
- android:layout_height="@dimen/dp_32"
- android:layout_margin="@dimen/dp_2"
- android:background="@drawable/circular_white" />
- <TextView
- android:id="@+id/item_switch_text"
- android:layout_width="@dimen/dp_50"
- android:layout_height="@dimen/dp_36"
- android:gravity="center"
- android:text="隐藏"
- android:textColor="@color/colorSwitchOff"
- android:textSize="@dimen/sp_16" />
- </LinearLayout>
- </RelativeLayout>
|