Skip to content

Commit c85927f

Browse files
committed
commit
1 parent 02771cd commit c85927f

File tree

6 files changed

+9
-3
lines changed

6 files changed

+9
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
![image](https://github.com/DingMouRen/PaletteImageView/raw/master/screenshot/p1.png) <br><br>
12
### 简介
23
* 可以解析图片中的主色调,默认将主色调作为控件阴影的颜色
34
* 可以自定义设置控件的阴影颜色
@@ -20,6 +21,9 @@
2021
##### 阴影颜色默认是图片的主色调
2122

2223
                  ![image](https://github.com/DingMouRen/PaletteImageView/raw/master/screenshot/demo4.gif)
24+
![image](https://github.com/DingMouRen/PaletteImageView/raw/master/screenshot/p2.png)
25+
##### 图片颜色主题解析
26+
![image](https://github.com/DingMouRen/PaletteImageView/raw/master/screenshot/p3.png)
2327
## 使用
2428

2529
```

app/src/main/java/com/dingmouren/smaple/paletteimageview/SampleTwoActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public ViewHolder(View itemView) {
6868
mLinearLayout = (LinearLayout)itemView. findViewById(R.id.linear);
6969
title = (TextView)itemView. findViewById(R.id.tv1);
7070
content = (TextView) itemView.findViewById(R.id.tv2);
71-
initListener();
71+
// initListener();
7272
}
7373

7474
private void initListener() {

app/src/main/res/layout/item_sample_two.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
android:id="@+id/palette"
1313
android:layout_width="match_parent"
1414
android:layout_height="wrap_content"
15-
app:palettePadding="0dp"
15+
app:palettePadding="20dp"
16+
app:paletteOffsetX="15dp"
17+
app:paletteOffsetY="15dp"
1618
/>
1719
<LinearLayout
1820
android:id="@+id/linear"
1921
android:layout_width="match_parent"
2022
android:layout_height="wrap_content"
2123
android:orientation="vertical"
22-
android:visibility="visible"
24+
android:visibility="gone"
2325
>
2426
<TextView
2527
android:id="@+id/tv1"

screenshot/p1.png

98.1 KB
Loading

screenshot/p2.png

103 KB
Loading

screenshot/p3.png

118 KB
Loading

0 commit comments

Comments
 (0)