android个人中心的列表(左小图标-中文字-右箭头)

效果图为:
在这里插入图片描述
为了使层级结构更低,这里推荐使用LSettingItem的框架,代码少,而且性能好,层级低,能让用户有更好的体验
第一步:添加依赖

implementation 'com.leon:lsettingviewlibrary:1.3.0'

第二步:在.xml写入代码

<com.leon.lib.settingview.LSettingItem
        android:id="@+id/lsScanMine"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        leon:leftIcon="@mipmap/ic_scan_mine"
        leon:leftText="扫描控制设备"
        leon:rightStyle="iconHide" />

    <com.leon.lib.settingview.LSettingItem
        android:id="@+id/item_update"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        leon:isShowUnderLine="true"
        leon:leftIcon="@mipmap/ic_checkupdate"
        leon:leftText="检查更新" />

猜你喜欢

转载自blog.csdn.net/wy313622821/article/details/108279763
今日推荐