Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit a31c952

Browse files
author
Nagesh Susarla
committed
Add a scroll view for activity_main.xml
Change-Id: I1008d1917046a7795b35a8b71f97756463fa95b8
1 parent ddd09d4 commit a31c952

File tree

1 file changed

+117
-113
lines changed

1 file changed

+117
-113
lines changed
Lines changed: 117 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!--
1+
<?xml version="1.0" encoding="utf-8"?><!--
32
Copyright (C) 2017 The Android Open Source Project
43
Licensed under the Apache License, Version 2.0 (the "License");
54
you may not use this file except in compliance with the License.
@@ -11,127 +10,132 @@
1110
See the License for the specific language governing permissions and
1211
limitations under the License.
1312
-->
14-
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
13+
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
1514
xmlns:app="http://schemas.android.com/apk/res-auto"
1615
xmlns:tools="http://schemas.android.com/tools"
17-
android:id="@+id/activity_main"
1816
android:layout_width="match_parent"
1917
android:layout_height="match_parent"
2018
tools:context="com.example.android.constraintlayoutexamples.MainActivity">
2119

22-
<Button
23-
android:id="@+id/button"
24-
android:layout_height="wrap_content"
25-
android:onClick="show"
26-
android:tag="constraint_example_1"
27-
android:text="@string/centering_views"
28-
android:layout_marginTop="16dp"
29-
app:layout_constraintTop_toTopOf="parent"
30-
android:layout_width="0dp"
31-
tools:layout_constraintRight_creator="1"
32-
android:layout_marginStart="16dp"
33-
android:layout_marginEnd="16dp"
34-
app:layout_constraintRight_toRightOf="parent"
35-
tools:layout_constraintLeft_creator="1"
36-
app:layout_constraintLeft_toLeftOf="parent" />
20+
<android.support.constraint.ConstraintLayout
21+
android:id="@+id/activity_main"
22+
android:layout_width="match_parent"
23+
android:layout_height="wrap_content">
3724

38-
<Button
39-
android:id="@+id/button2"
40-
android:layout_width="0dp"
41-
android:layout_height="wrap_content"
42-
android:onClick="show"
43-
android:tag="constraint_example_2"
44-
android:text="@string/basic_arrange"
45-
android:layout_marginTop="8dp"
46-
app:layout_constraintTop_toBottomOf="@+id/button"
47-
tools:layout_constraintRight_creator="1"
48-
android:layout_marginStart="16dp"
49-
android:layout_marginEnd="16dp"
50-
app:layout_constraintRight_toRightOf="parent"
51-
tools:layout_constraintLeft_creator="1"
52-
app:layout_constraintLeft_toLeftOf="parent" />
25+
<Button
26+
android:id="@+id/button"
27+
android:layout_width="0dp"
28+
android:layout_height="wrap_content"
29+
android:layout_marginEnd="16dp"
30+
android:layout_marginStart="16dp"
31+
android:layout_marginTop="16dp"
32+
android:onClick="show"
33+
android:tag="constraint_example_1"
34+
android:text="@string/centering_views"
35+
app:layout_constraintLeft_toLeftOf="parent"
36+
app:layout_constraintRight_toRightOf="parent"
37+
app:layout_constraintTop_toTopOf="parent"
38+
tools:layout_constraintLeft_creator="1"
39+
tools:layout_constraintRight_creator="1" />
5340

54-
<Button
55-
android:id="@+id/button15"
56-
android:layout_width="0dp"
57-
android:layout_height="wrap_content"
58-
android:onClick="show"
59-
android:tag="constraint_example_4"
60-
android:text="@string/advanced_arrangement"
61-
android:layout_marginTop="8dp"
62-
app:layout_constraintTop_toBottomOf="@+id/button30"
63-
tools:layout_constraintRight_creator="1"
64-
app:layout_constraintRight_toRightOf="@+id/button30"
65-
tools:layout_constraintLeft_creator="1"
66-
app:layout_constraintLeft_toLeftOf="@+id/button30" />
41+
<Button
42+
android:id="@+id/button2"
43+
android:layout_width="0dp"
44+
android:layout_height="wrap_content"
45+
android:layout_marginEnd="16dp"
46+
android:layout_marginStart="16dp"
47+
android:layout_marginTop="8dp"
48+
android:onClick="show"
49+
android:tag="constraint_example_2"
50+
android:text="@string/basic_arrange"
51+
app:layout_constraintLeft_toLeftOf="parent"
52+
app:layout_constraintRight_toRightOf="parent"
53+
app:layout_constraintTop_toBottomOf="@+id/button"
54+
tools:layout_constraintLeft_creator="1"
55+
tools:layout_constraintRight_creator="1" />
6756

68-
<Button
69-
android:id="@+id/button18"
70-
android:layout_width="0dp"
71-
android:layout_height="wrap_content"
72-
android:onClick="show"
73-
android:tag="constraint_example_5"
74-
android:text="@string/aspect_ratio"
75-
android:layout_marginTop="8dp"
76-
app:layout_constraintTop_toBottomOf="@+id/button15"
77-
tools:layout_constraintRight_creator="1"
78-
app:layout_constraintRight_toRightOf="@+id/button15"
79-
tools:layout_constraintLeft_creator="1"
80-
app:layout_constraintLeft_toLeftOf="@+id/button15" />
57+
<Button
58+
android:id="@+id/button15"
59+
android:layout_width="0dp"
60+
android:layout_height="wrap_content"
61+
android:layout_marginTop="8dp"
62+
android:onClick="show"
63+
android:tag="constraint_example_4"
64+
android:text="@string/advanced_arrangement"
65+
app:layout_constraintLeft_toLeftOf="@+id/button30"
66+
app:layout_constraintRight_toRightOf="@+id/button30"
67+
app:layout_constraintTop_toBottomOf="@+id/button30"
68+
tools:layout_constraintLeft_creator="1"
69+
tools:layout_constraintRight_creator="1" />
8170

82-
<Button
83-
android:id="@+id/button19"
84-
android:layout_width="0dp"
85-
android:layout_height="wrap_content"
86-
android:onClick="show"
87-
android:tag="constraint_example_6"
88-
android:text="@string/basic_chains"
89-
android:layout_marginTop="8dp"
90-
app:layout_constraintTop_toBottomOf="@+id/button18"
91-
tools:layout_constraintRight_creator="1"
92-
app:layout_constraintRight_toRightOf="@+id/button18"
93-
tools:layout_constraintLeft_creator="1"
94-
app:layout_constraintLeft_toLeftOf="@+id/button18" />
71+
<Button
72+
android:id="@+id/button18"
73+
android:layout_width="0dp"
74+
android:layout_height="wrap_content"
75+
android:layout_marginTop="8dp"
76+
android:onClick="show"
77+
android:tag="constraint_example_5"
78+
android:text="@string/aspect_ratio"
79+
app:layout_constraintLeft_toLeftOf="@+id/button15"
80+
app:layout_constraintRight_toRightOf="@+id/button15"
81+
app:layout_constraintTop_toBottomOf="@+id/button15"
82+
tools:layout_constraintLeft_creator="1"
83+
tools:layout_constraintRight_creator="1" />
9584

96-
<Button
97-
android:id="@+id/button20"
98-
android:layout_width="0dp"
99-
android:layout_height="wrap_content"
100-
android:onClick="showConstraintSetExample"
101-
android:tag="constraint_example_7"
102-
android:text="@string/constraintset"
103-
android:layout_marginTop="8dp"
104-
app:layout_constraintTop_toBottomOf="@+id/button19"
105-
tools:layout_constraintRight_creator="1"
106-
app:layout_constraintRight_toRightOf="@+id/button19"
107-
tools:layout_constraintLeft_creator="1"
108-
app:layout_constraintLeft_toLeftOf="@+id/button19" />
85+
<Button
86+
android:id="@+id/button19"
87+
android:layout_width="0dp"
88+
android:layout_height="wrap_content"
89+
android:layout_marginTop="8dp"
90+
android:onClick="show"
91+
android:tag="constraint_example_6"
92+
android:text="@string/basic_chains"
93+
app:layout_constraintLeft_toLeftOf="@+id/button18"
94+
app:layout_constraintRight_toRightOf="@+id/button18"
95+
app:layout_constraintTop_toBottomOf="@+id/button18"
96+
tools:layout_constraintLeft_creator="1"
97+
tools:layout_constraintRight_creator="1" />
10998

110-
<Button
111-
android:id="@+id/button21"
112-
android:layout_width="0dp"
113-
android:layout_height="wrap_content"
114-
android:onClick="show"
115-
android:tag="constraint_example_x1"
116-
android:text="@string/advanced_chains"
117-
android:layout_marginTop="8dp"
118-
app:layout_constraintTop_toBottomOf="@+id/button20"
119-
tools:layout_constraintRight_creator="1"
120-
app:layout_constraintRight_toRightOf="@+id/button20"
121-
tools:layout_constraintLeft_creator="1"
122-
app:layout_constraintLeft_toLeftOf="@+id/button20" />
99+
<Button
100+
android:id="@+id/button20"
101+
android:layout_width="0dp"
102+
android:layout_height="wrap_content"
103+
android:layout_marginTop="8dp"
104+
android:onClick="showConstraintSetExample"
105+
android:tag="constraint_example_7"
106+
android:text="@string/constraintset"
107+
app:layout_constraintLeft_toLeftOf="@+id/button19"
108+
app:layout_constraintRight_toRightOf="@+id/button19"
109+
app:layout_constraintTop_toBottomOf="@+id/button19"
110+
tools:layout_constraintLeft_creator="1"
111+
tools:layout_constraintRight_creator="1" />
123112

124-
<Button
125-
android:id="@+id/button30"
126-
android:layout_width="0dp"
127-
android:layout_height="wrap_content"
128-
android:onClick="show"
129-
android:tag="constraint_example_3"
130-
android:text="@string/guidelines"
131-
android:layout_marginTop="8dp"
132-
app:layout_constraintTop_toBottomOf="@+id/button2"
133-
tools:layout_constraintRight_creator="1"
134-
app:layout_constraintRight_toRightOf="@+id/button2"
135-
tools:layout_constraintLeft_creator="1"
136-
app:layout_constraintLeft_toLeftOf="@+id/button2" />
137-
</android.support.constraint.ConstraintLayout>
113+
<Button
114+
android:id="@+id/button21"
115+
android:layout_width="0dp"
116+
android:layout_height="wrap_content"
117+
android:layout_marginTop="8dp"
118+
android:onClick="show"
119+
android:tag="constraint_example_x1"
120+
android:text="@string/advanced_chains"
121+
app:layout_constraintLeft_toLeftOf="@+id/button20"
122+
app:layout_constraintRight_toRightOf="@+id/button20"
123+
app:layout_constraintTop_toBottomOf="@+id/button20"
124+
tools:layout_constraintLeft_creator="1"
125+
tools:layout_constraintRight_creator="1" />
126+
127+
<Button
128+
android:id="@+id/button30"
129+
android:layout_width="0dp"
130+
android:layout_height="wrap_content"
131+
android:layout_marginTop="8dp"
132+
android:onClick="show"
133+
android:tag="constraint_example_3"
134+
android:text="@string/guidelines"
135+
app:layout_constraintLeft_toLeftOf="@+id/button2"
136+
app:layout_constraintRight_toRightOf="@+id/button2"
137+
app:layout_constraintTop_toBottomOf="@+id/button2"
138+
tools:layout_constraintLeft_creator="1"
139+
tools:layout_constraintRight_creator="1" />
140+
</android.support.constraint.ConstraintLayout>
141+
</ScrollView>

0 commit comments

Comments
 (0)