Skip to content

Commit 348cb6b

Browse files
authored
DPMS-17928 Change text on edit image activity to icons (#5)
1 parent 4e7028f commit 348cb6b

7 files changed

Lines changed: 34 additions & 10 deletions

File tree

533 Bytes
Loading
644 Bytes
Loading
917 Bytes
Loading
1.09 KB
Loading
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<item android:drawable="@drawable/draw_pressed" android:state_pressed="true"/>
5+
<item android:drawable="@drawable/draw_normal"/>
6+
7+
</selector>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<item android:state_pressed="true" android:drawable="@drawable/rotate_pressed" />
5+
<item android:drawable="@drawable/rotate_normal" />
6+
7+
</selector>

imageeditlibrary/src/main/res/layout/fragment_edit_image_main_menu.xml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
android:orientation="horizontal"
1313
android:layout_gravity="center_horizontal">
1414

15-
<TextView
15+
<ImageView
1616
android:id="@+id/btn_paint"
1717
android:layout_width="wrap_content"
1818
android:layout_height="wrap_content"
1919
android:layout_gravity="center"
2020
android:layout_margin="@dimen/image_edit_menu_margin"
21+
android:padding="@dimen/image_edit_text_padding"
2122
android:gravity="center"
22-
android:text="@string/draw"
23+
android:src="@drawable/image_edit_icon_draw"
24+
android:contentDescription="@string/draw"
2325
android:textColor="@color/white"
2426
android:textSize="@dimen/image_edit_text_size"/>
2527

@@ -35,47 +37,55 @@
3537
android:textSize="@dimen/image_edit_text_size"
3638
android:visibility="invisible"/>-->
3739

38-
<TextView
40+
<ImageView
3941
android:id="@+id/btn_filter"
4042
android:layout_width="wrap_content"
4143
android:layout_height="wrap_content"
4244
android:layout_gravity="center"
4345
android:layout_margin="@dimen/image_edit_menu_margin"
46+
android:padding="@dimen/image_edit_text_padding"
4447
android:gravity="center"
45-
android:text="@string/filter"
48+
android:src="@drawable/image_edit_icon_filter"
49+
android:contentDescription="@string/filter"
4650
android:textColor="@color/white"
4751
android:textSize="@dimen/image_edit_text_size"/>
4852

49-
<TextView
53+
<ImageView
5054
android:id="@+id/btn_crop"
5155
android:layout_width="wrap_content"
5256
android:layout_height="wrap_content"
5357
android:layout_gravity="center"
5458
android:layout_margin="@dimen/image_edit_menu_margin"
59+
android:padding="@dimen/image_edit_text_padding"
5560
android:gravity="center"
56-
android:text="@string/crop"
61+
android:src="@drawable/image_edit_icon_crop"
62+
android:contentDescription="@string/crop"
5763
android:textColor="@color/white"
5864
android:textSize="@dimen/image_edit_text_size"/>
5965

60-
<TextView
66+
<ImageView
6167
android:id="@+id/btn_rotate"
6268
android:layout_width="wrap_content"
6369
android:layout_height="wrap_content"
6470
android:layout_gravity="center"
6571
android:layout_margin="@dimen/image_edit_menu_margin"
72+
android:padding="@dimen/image_edit_text_padding"
6673
android:gravity="center"
67-
android:text="@string/rotate"
74+
android:src="@drawable/image_edit_icon_rotate"
75+
android:contentDescription="@string/rotate"
6876
android:textColor="@color/white"
6977
android:textSize="@dimen/image_edit_text_size"/>
7078

71-
<TextView
79+
<ImageView
7280
android:id="@+id/btn_text"
7381
android:layout_width="wrap_content"
7482
android:layout_height="wrap_content"
7583
android:layout_gravity="center"
7684
android:layout_margin="@dimen/image_edit_menu_margin"
85+
android:padding="@dimen/image_edit_text_padding"
7786
android:gravity="center"
78-
android:text="@string/text"
87+
android:src="@drawable/image_edit_icon_text"
88+
android:contentDescription="@string/text"
7989
android:textColor="@color/white"
8090
android:textSize="@dimen/image_edit_text_size"/>
8191

0 commit comments

Comments
 (0)