Android studio LSettingItem快速实现页面 “我的”或者“设置”页面
最近想做个页面,但网上搜资料全是一七年甚至是之前的!现在这个是最新的,最新版Android studio 可用!
1、添加依赖
implementation 'com.leon:lsettingviewlibrary:1.3.0'
implementation 'de.hdodenhof:circleimageview:2.1.0'
从很早之前的文章看到compile 的,现在已经不用了。
2、布局 activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:leon="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginBottom="16dp"
android:background="#fff"
android:gravity="center"
android:orientation="vertical">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profile_image"
android:layout_width="96dp"
android:layout_height="96dp"
androi