|
| 1 | +# TextGroupView |
| 2 | +ImageView + TextView + TextView +TextView+ EditText +ImageView 实现的组合控件 |
| 3 | +## JitPack依赖 |
| 4 | +### A.项目/build.grade |
| 5 | +``` |
| 6 | + allprojects { |
| 7 | + repositories { |
| 8 | + ... |
| 9 | + maven { url 'https://jitpack.io' } |
| 10 | + } |
| 11 | + } |
| 12 | +``` |
| 13 | +### B.项目/app/build.grade |
| 14 | +``` |
| 15 | + dependencies { |
| 16 | + implementation 'com.github.RelinRan:TextGroupView:1.0.0' |
| 17 | + } |
| 18 | +``` |
| 19 | +# 效果图 |
| 20 | + |
| 21 | +# xml布局 |
| 22 | +``` |
| 23 | + <com.android.view.TextGroupView |
| 24 | + android:layout_width="match_parent" |
| 25 | + android:layout_height="70dp" |
| 26 | + android:layout_marginLeft="20dp" |
| 27 | + android:layout_marginRight="20dp" |
| 28 | + android:layout_marginTop="20dp" |
| 29 | + app:left_imageHeight="50dp" |
| 30 | + app:left_imageMarginLeft="10dp" |
| 31 | + app:left_imageScaleType="center_crop" |
| 32 | + app:left_imageSrc="@drawable/ic_head" |
| 33 | + app:left_imageWidth="50dp" |
| 34 | + app:left_textPaddingLeft="10dp" |
| 35 | + app:radius="8dp" |
| 36 | + app:right_imagePaddingRight="10dp" |
| 37 | + app:right_imageSrc="@drawable/ic_arrow" |
| 38 | + app:right_text="更换头像" |
| 39 | + app:right_textColor="#FFFFFF" |
| 40 | + app:solid="#161538"></com.android.view.TextGroupView> |
| 41 | +
|
| 42 | + <com.android.view.TextGroupView |
| 43 | + android:layout_width="match_parent" |
| 44 | + android:layout_height="60dp" |
| 45 | + android:layout_marginLeft="20dp" |
| 46 | + android:layout_marginRight="20dp" |
| 47 | + android:layout_marginTop="20dp" |
| 48 | + app:edit_hintText="输入昵称" |
| 49 | + app:edit_hintTextColor="#FFFFFF" |
| 50 | + app:edit_textColor="#FFFFFF" |
| 51 | + app:left_text="昵称" |
| 52 | + app:left_textColor="#FFFFFF" |
| 53 | + app:left_textPaddingLeft="10dp" |
| 54 | + app:radius="8dp" |
| 55 | + app:right_imagePaddingRight="10dp" |
| 56 | + app:right_imageSrc="@drawable/ic_arrow" |
| 57 | + app:solid="#161538"></com.android.view.TextGroupView> |
| 58 | +
|
| 59 | + <com.android.view.TextGroupView |
| 60 | + android:layout_width="match_parent" |
| 61 | + android:layout_height="60dp" |
| 62 | + android:layout_marginLeft="20dp" |
| 63 | + android:layout_marginRight="20dp" |
| 64 | + android:layout_marginTop="20dp" |
| 65 | + app:left_imagePaddingLeft="10dp" |
| 66 | + app:left_imageSrc="@drawable/ic_item" |
| 67 | + app:left_text="基本信息" |
| 68 | + app:left_textColor="#FFFFFF" |
| 69 | + app:radius="8dp" |
| 70 | + app:right_imagePaddingRight="10dp" |
| 71 | + app:right_imageSrc="@drawable/ic_arrow" |
| 72 | + app:solid="#161538"></com.android.view.TextGroupView> |
| 73 | +``` |
| 74 | + |
| 75 | + |
0 commit comments