Skip to content

Commit a162b1e

Browse files
committed
Adds text input layout and edit texts.
1 parent 7c7764d commit a162b1e

4 files changed

Lines changed: 95 additions & 16 deletions

File tree

.idea/misc.xml

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/app.iml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<option name="ALLOW_USER_CONFIGURATION" value="false" />
2222
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
2323
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
24+
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
2425
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
2526
</configuration>
2627
</facet>
@@ -71,6 +72,7 @@
7172
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
7273
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
7374
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/jars" />
75+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/22.2.0/jars" />
7476
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.0/jars" />
7577
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
7678
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
@@ -85,11 +87,13 @@
8587
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
8688
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
8789
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
90+
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
8891
</content>
8992
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
9093
<orderEntry type="sourceFolder" forTests="false" />
9194
<orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" />
9295
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
9396
<orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" />
97+
<orderEntry type="library" exported="" name="design-22.2.0" level="project" />
9498
</component>
9599
</module>
Lines changed: 61 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,61 @@
1-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2-
xmlns:tools="http://schemas.android.com/tools"
3-
android:layout_width="match_parent"
4-
android:layout_height="match_parent"
5-
android:paddingLeft="@dimen/activity_horizontal_margin"
6-
android:paddingRight="@dimen/activity_horizontal_margin"
7-
android:paddingTop="@dimen/activity_vertical_margin"
8-
android:paddingBottom="@dimen/activity_vertical_margin"
9-
tools:context=".MainActivity">
10-
11-
<TextView
12-
android:text="@string/hello_world"
13-
android:layout_width="wrap_content"
14-
android:layout_height="wrap_content"/>
15-
16-
</RelativeLayout>
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:orientation="vertical"
4+
android:layout_width="match_parent"
5+
android:layout_height="match_parent"
6+
android:paddingLeft="@dimen/activity_horizontal_margin"
7+
android:paddingRight="@dimen/activity_horizontal_margin"
8+
android:paddingTop="@dimen/activity_vertical_margin"
9+
android:paddingBottom="@dimen/activity_vertical_margin"
10+
tools:context=".MainActivity">
11+
12+
<android.support.design.widget.TextInputLayout
13+
android:layout_width="fill_parent"
14+
android:layout_height="wrap_content">
15+
16+
<android.support.v7.widget.AppCompatEditText
17+
android:layout_width="fill_parent"
18+
android:layout_height="wrap_content"
19+
android:hint="Normal edit"
20+
/>
21+
22+
</android.support.design.widget.TextInputLayout>
23+
24+
<android.support.design.widget.TextInputLayout
25+
android:layout_width="fill_parent"
26+
android:layout_height="wrap_content">
27+
28+
<android.support.v7.widget.AppCompatEditText
29+
android:layout_width="fill_parent"
30+
android:layout_height="wrap_content"
31+
android:hint="Normal hint"
32+
android:text="This one is already filled"
33+
/>
34+
35+
</android.support.design.widget.TextInputLayout>
36+
37+
<android.support.design.widget.TextInputLayout
38+
android:layout_width="fill_parent"
39+
android:layout_height="wrap_content">
40+
41+
<android.support.v7.widget.AppCompatEditText
42+
android:layout_width="fill_parent"
43+
android:layout_height="wrap_content"
44+
android:hint="Special empty"
45+
/>
46+
47+
</android.support.design.widget.TextInputLayout>
48+
49+
<android.support.design.widget.TextInputLayout
50+
android:layout_width="fill_parent"
51+
android:layout_height="wrap_content">
52+
53+
<android.support.v7.widget.AppCompatEditText
54+
android:layout_width="fill_parent"
55+
android:layout_height="wrap_content"
56+
android:hint="Special hint"
57+
android:text="This should look different"
58+
/>
59+
60+
</android.support.design.widget.TextInputLayout>
61+
</LinearLayout>

app/src/main/res/values/styles.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<!-- Base application theme. -->
44
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
55
<!-- Customize your theme here. -->
6+
<item name="colorPrimary">#2196F3</item>
7+
<item name="colorPrimaryDark">#1565C0</item>
8+
<item name="colorAccent">#E91E63</item>
69
</style>
710

811
</resources>

0 commit comments

Comments
 (0)