一,布局为
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#E6E6E6"
android:orientation="vertical"
tools:context="com.jiangtunjf.jgapplication.Main6Activity">
<TextView
style="@style/common_text"
android:layout_marginTop="15dp"
android:text="我的资产"/>
<TextView
style="@style/common_text"
android:text="资产变现"/>
<TextView
style="@style/common_text"
android:text="银行卡"/>
<TextView
style="@style/common_text"
android:text="关于"/>
<TextView
style="@style/common_text"
android:text="设置"/>
</LinearLayout>
二,对应 style 的 @style/common_text为
<style name="common_text">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">1dp</item>
<item name="android:background">@color/white</item>
<item name="android:drawableLeft">@drawable/member_money</item>
<item name="android:drawablePadding">6dp</item>
<item name="android:drawableRight">@drawable/ic_arrow_right</item>
<item name="android:padding">12dp</item>
<item name="android:textColor">@color/text_color_666</item>
<item name="android:textSize">16sp</item>
</style>
三,效果图