我的实现_滚动列表

来源:互联网 发布:淘宝装修图片轮播尺寸 编辑:程序博客网 时间:2024/05/17 07:00

这里写图片描述


<?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>

修改主题格式,变成白底黑字

原创粉丝点击