Skip to content

Commit e5ec343

Browse files
author
hussienalrubaye
committed
shape
1 parent 3b006f9 commit e5ec343

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item>
4+
<shape
5+
6+
android:shape="rectangle"
7+
>
8+
<solid android:color="#ffffff"/>
9+
<corners android:radius="5pt"/>
10+
<padding android:top="5pt"
11+
android:right="5pt"
12+
android:left="5pt"
13+
android:bottom="5pt"/>
14+
15+
</shape>
16+
</item>
17+
</selector>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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">
5+
<shape>
6+
<solid android:color="#70c656"/>
7+
<stroke android:color="#53933f"
8+
android:width="2dp"
9+
/>
10+
<corners android:radius="55dp"/>
11+
<padding android:bottom="8pt"
12+
android:left="8dp"
13+
android:right="8dp"
14+
android:top="8dp"/>
15+
</shape>
16+
17+
</item>
18+
19+
<item >
20+
<shape>
21+
<gradient android:startColor="#70c656"
22+
android:endColor="#53933f"/>
23+
<stroke android:color="#53933f"
24+
android:width="2dp"
25+
/>
26+
<corners android:radius="8dp"/>
27+
<padding android:bottom="8pt"
28+
android:left="8dp"
29+
android:right="8dp"
30+
android:top="8dp"/>
31+
</shape>
32+
33+
</item>
34+
</selector>

Android/GetSunSet/StartUp/app/src/main/res/layout/activity_main.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<android.support.constraint.ConstraintLayout
3+
4+
android:background="@color/gray"
35
xmlns:android="http://schemas.android.com/apk/res/android"
46
xmlns:app="http://schemas.android.com/apk/res-auto"
57
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
68
android:layout_height="match_parent" tools:context="com.hussein.startup.MainActivity">
79

810
<EditText
11+
android:background="@drawable/background"
912
android:id="@+id/etCityName"
1013
android:layout_width="wrap_content"
1114
android:layout_height="wrap_content"
@@ -19,6 +22,7 @@
1922
app:layout_constraintTop_toTopOf="parent" />
2023

2124
<Button
25+
android:background="@drawable/button_blue"
2226
android:id="@+id/buSunset"
2327
android:layout_width="wrap_content"
2428
android:layout_height="wrap_content"

Android/GetSunSet/StartUp/app/src/main/res/values/colors.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
<color name="colorPrimary">#3F51B5</color>
44
<color name="colorPrimaryDark">#303F9F</color>
55
<color name="colorAccent">#FF4081</color>
6+
<color name="gray">#d4d3d3</color>
67
</resources>

0 commit comments

Comments
 (0)