parent
a67ea7cfee
commit
f6563858e3
@ -1,30 +1,177 @@
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#fffaf0" android:orientation="vertical">
|
||||
<!-- 顶部搜索栏区域 -->
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#FFDD59" android:orientation="vertical" android:padding="10dp">
|
||||
<!-- 搜索框 -->
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:alpha="0.8" android:background="@drawable/rounded_background1" android:gravity="center_vertical" android:orientation="horizontal" android:padding="8dp">
|
||||
<!-- 搜索图标 -->
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:alpha="1" android:text="🔍" android:textSize="16sp"/>
|
||||
<!-- 搜索输入框 -->
|
||||
<EditText android:id="@+id/search_edit_text" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:alpha="1" android:background="@null" android:focusable="true" android:focusableInTouchMode="true" android:hint="搜索教材、数码、生活用品..." android:imeOptions="actionSearch" android:inputType="text" android:maxLines="1" android:paddingStart="8dp" android:paddingEnd="8dp" android:singleLine="true" android:textColor="#333333" android:textColorHint="#999999" android:textSize="14sp"/>
|
||||
<ImageButton android:id="@+id/camera_button" android:layout_width="23dp" android:layout_height="24dp" android:layout_marginStart="4dp" android:background="?android:attr/selectableItemBackgroundBorderless" android:padding="0.5dp" android:scaleType="centerInside" android:src="@android:drawable/ic_menu_camera" android:contentDescription="拍照搜索"/>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#fffaf0"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 顶部搜索栏区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#FFDD59"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- 搜索框 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:alpha="0.8"
|
||||
android:background="@drawable/rounded_background1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<!-- 搜索图标 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="1"
|
||||
android:text="🔍"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<!-- 搜索输入框 -->
|
||||
<EditText
|
||||
android:id="@+id/search_edit_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:alpha="1"
|
||||
android:background="@null"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:hint="搜索教材、数码、生活用品..."
|
||||
android:imeOptions="actionSearch"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="#333333"
|
||||
android:textColorHint="#999999"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/camera_button"
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:padding="0.5dp"
|
||||
android:scaleType="centerInside"
|
||||
android:src="@android:drawable/ic_menu_camera"
|
||||
android:contentDescription="拍照搜索" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- 导航标签区域 -->
|
||||
<HorizontalScrollView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="65dp" android:background="@android:color/white" android:paddingVertical="8dp">
|
||||
<LinearLayout android:id="@+id/tab_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal">
|
||||
<!-- 关注标签 -->
|
||||
<RadioButton android:id="@+id/tab_follow" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="20dp" android:paddingEnd="20dp" android:paddingTop="10dp" android:paddingBottom="10dp" android:text="关注" android:button="@null" android:textColor="#ff6b35" android:textSize="14sp" android:textStyle="bold" android:background="?attr/selectableItemBackground" android:clickable="true" android:focusable="true"/>
|
||||
<!-- 推荐标签 -->
|
||||
<TextView android:id="@+id/tab_recommend" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="20dp" android:paddingEnd="20dp" android:paddingTop="10dp" android:paddingBottom="10dp" android:text="推荐" android:textColor="#666666" android:textSize="14sp" android:background="?attr/selectableItemBackground" android:clickable="true" android:focusable="true"/>
|
||||
<!-- 新发布标签 -->
|
||||
<TextView android:id="@+id/tab_new" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="20dp" android:paddingEnd="20dp" android:paddingTop="10dp" android:paddingBottom="10dp" android:text="新发布" android:textColor="#666666" android:textSize="14sp" android:background="?attr/selectableItemBackground" android:clickable="true" android:focusable="true"/>
|
||||
<!-- 学习资料标签 -->
|
||||
<TextView android:id="@+id/tab_study" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="20dp" android:paddingEnd="20dp" android:paddingTop="10dp" android:paddingBottom="10dp" android:text="学习资料" android:textColor="#666666" android:textSize="14sp" android:background="?attr/selectableItemBackground" android:clickable="true" android:focusable="true"/>
|
||||
<!-- 生活用品标签 -->
|
||||
<TextView android:id="@+id/tab_living" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="20dp" android:paddingEnd="20dp" android:paddingTop="10dp" android:paddingBottom="10dp" android:text="生活用品" android:textColor="#666666" android:textSize="14sp" android:background="?attr/selectableItemBackground" android:clickable="true" android:focusable="true"/>
|
||||
|
||||
<!-- 导航标签区域 -->
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="65dp"
|
||||
android:background="@android:color/white"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tab_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 关注标签 -->
|
||||
<RadioButton
|
||||
android:id="@+id/tab_follow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="关注"
|
||||
android:button="@null"
|
||||
android:textColor="#ff6b35"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
<!-- 推荐标签 -->
|
||||
<TextView
|
||||
android:id="@+id/tab_recommend"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="推荐"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
<!-- 新发布标签 -->
|
||||
<TextView
|
||||
android:id="@+id/tab_new"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="新发布"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
<!-- 学习资料标签 -->
|
||||
<TextView
|
||||
android:id="@+id/tab_study"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="学习资料"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
<!-- 生活用品标签 -->
|
||||
<TextView
|
||||
android:id="@+id/tab_living"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="生活用品"
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
<!-- 首页文字 -->
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center"/>
|
||||
|
||||
<!-- 商品列表区域 - 新增部分 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerViewProducts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="120dp"
|
||||
android:padding="8dp" />
|
||||
|
||||
</FrameLayout>
|
||||
Loading…
Reference in new issue