我的实现_滚动列表
2017-08-08 23:09
134 查看
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <RelativeLayout android:id="@+id/layout_me_header" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#008cc9"> <Button android:id="@+id/btn_login" android:layout_width="100dp" android:layout_height="100dp" android:layout_centerHorizontal="true" android:layout_marginTop="10dp" android:background="@mipmap/login_btn" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/btn_login" android:layout_marginBottom="10dp" android:layout_marginTop="5dp" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <ImageView android:layout_width="40dp" android:layout_height="40dp" android:src="@mipmap/me_menu_sail" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="优惠券" /> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <ImageView android:layout_width="40dp" android:layout_height="40dp" android:src="@mipmap/me_menu_yh" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="折扣券" /> </LinearLayout> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center" android:orientation="vertical"> <ImageView android:layout_width="40dp" android:layout_height="40dp" android:src="@mipmap/me_menu_go" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="购物车" /> </LinearLayout> </LinearLayout> </RelativeLayout> <!--滚动列表--> <ScrollView android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal"> <ImageView android:layout_width="48dp" android:layout_height="48dp" android:layout_marginLeft="10dp" android:src="@mipmap/list_my_menu" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:gravity="center"> <TextView android:id="@+id/txt_my_menu" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="18dp" android:text="我的订单" android:textSize="28sp" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@+id/txt_my_menu" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:background="#D8dde1"> </View> </RelativeLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal"> <ImageView android:layout_width="48dp" android:layout_height="48dp" android:layout_marginLeft="10dp" android:src="@mipmap/list_save" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:gravity="center"> <TextView android:id="@+id/txt_my_save" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="18dp" android:text="我的收藏" android:textSize="28sp" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@+id/txt_my_save" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:background="#D8dde1"> </View> </RelativeLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal"> <ImageView android:layout_width="48dp" android:layout_height="48dp" android:layout_marginLeft="10dp" android:src="@mipmap/list_pwd" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:gravity="center"> <TextView android:id="@+id/txt_my_pwd" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="18dp" android:text="我的口令" android:textSize="28sp" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@+id/txt_my_pwd" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:background="#D8dde1"> </View> </RelativeLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal"> <ImageView android:layout_width="48dp" android:layout_height="48dp" android:layout_marginLeft="10dp" android:src="@mipmap/list_my" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp"> <TextView android:id="@+id/txt_my" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="18dp" android:text="我的锦囊" android:textSize="28sp" /> </RelativeLayout> </LinearLayout> <View android:layout_width="match_parent" android:layout_height="8dp" android:layout_below="@+id/txt_my" android:layout_marginTop="10dp" android:background="#D8dde1"> </View> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal"> <ImageView android:layout_width="48dp" android:layout_height="48dp" android:layout_marginLeft="10dp" android:src="@mipmap/list_safe_center" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:gravity="center"> <TextView android:id="@+id/txt_safe_center" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="18dp" android:text="安全中心" android:textSize="28sp" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@+id/txt_safe_center" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:background="#D8dde1"> </View> </RelativeLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal"> <ImageView android:layout_width="48dp" android:layout_height="48dp" android:layout_marginLeft="10dp" android:src="@mipmap/list_address" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:gravity="center"> <TextView android:id="@+id/txt_my_address" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="18dp" android:text="常用地址" android:textSize="28sp" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@+id/txt_my_address" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:background="#D8dde1"> </View> </RelativeLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal"> <ImageView android:layout_width="48dp" android:layout_height="48dp" android:layout_marginLeft="10dp" android:src="@mipmap/list_service" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:gravity="center"> <TextView android:id="@+id/txt_my_service" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="18dp" android:text="客服中心" android:textSize="28sp" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@+id/txt_my_service" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:background="#D8dde1"> </View> </RelativeLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal"> <ImageView android:layout_width="48dp" android:layout_height="48dp" android:layout_marginLeft="10dp" android:src="@mipmap/list_sug" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp"> <TextView android:id="@+id/txt_my_sug" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="18dp" android:text="意见反馈" android:textSize="28sp" /> </RelativeLayout> </LinearLayout> <View android:layout_width="match_parent" android:layout_height="8dp" android:layout_below="@+id/txt_my_sug" android:layout_marginTop="10dp" android:background="#D8dde1"> </View> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal"> <ImageView android:layout_width="48dp" android:layout_height="48dp" android:layout_marginLeft="10dp" android:src="@mipmap/list_setting" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:gravity="center"> <TextView android:id="@+id/txt_my_setting" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingTop="18dp" android:text="设置" android:textSize="28sp" /> <View android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@+id/txt_my_setting" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:background="#D8dde1"> </View> </RelativeLayout> </LinearLayout> </LinearLayout> </ScrollView>
styles.xml
<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> </resources>
修改主题格式,变成白底黑字
相关文章推荐
- 在滚动列表中实现视频的播放(ListView & RecyclerView)
- 利用JS实现键盘控制下拉列表的滚动
- swing实现一个类似网页视频列表横向滚动的效果
- html+css+javascript实现列表循环滚动示例代码
- HTML实现左侧内容可滚动,右侧列表固定布局
- js实现新闻列表自动滚动
- Android PinnedSectionListView实现滚动标题置顶/联系人列表效果
- 列表滚动触发下拉刷新的实现
- Android 横向列表GridView 实现横向滚动
- js实现文字列表无缝滚动效果
- JavaScript实现文字列表无缝向上滚动
- JQuery页面图片切换和新闻列表滚动效果的具体实现
- 【sui-mobile踩坑之旅】实现横向滚动列表
- html+css+javascript实现列表循环滚动
- NGUI 类皇室战争(CR)的滚动列表效果完整实现(三)
- RecyclerView替代Listview,实现滚动列表的显示
- 转:如何实现一个滚动列表
- Vue2.0 实现歌手列表滚动及右侧快速入口功能
- Jjcarousellite 实现图片列表滚动的简单实例