-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRelative_layout.xml
More file actions
75 lines (64 loc) · 2.46 KB
/
Relative_layout.xml
File metadata and controls
75 lines (64 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<LinearLayout
android:id="@+id/firstLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="horizontal"
android:weightSum="2">
<Button
android:id="@+id/firstButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_weight="1.3"
android:background="@color/redColor"
android:text="First"
android:textColor="@color/whiteColor"
android:textStyle="bold" />
<Button
android:id="@+id/secondButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="0.7"
android:background="@color/greenColor"
android:text="Second"
android:textColor="@color/whiteColor"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/secondLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/firstLayout"
android:layout_marginTop="20dp"
android:orientation="horizontal"
android:weightSum="100">
<Button
android:id="@+id/thirdButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:layout_weight="30"
android:background="@drawable/button_rounded_corners"
android:text="Third"
android:textColor="@color/whiteColor"
android:textStyle="bold" />
<Button
android:id="@+id/fourthButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="70"
android:background="@color/redColor"
android:text="Fourth"
android:textColor="@color/whiteColor"
android:textStyle="bold"
/>
</LinearLayout>
</RelativeLayout>