Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions demo/src/main/res/drawable/custom_button_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#343341"/>
<corners android:radius="4dp"/>
</shape>
</item>
</selector>
36 changes: 36 additions & 0 deletions demo/src/main/res/drawable/custom_edit_text.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<!-- State: Focused
When user touch the input -->
<item android:state_focused="true">
<layer-list>
<item>
<shape android:shape="rectangle">
<solid android:color="#000000"/>
</shape>
</item>
<item android:bottom="4dp">
<shape android:shape="rectangle">
<solid android:color="#FFFFFF"/>
</shape>
</item>
</layer-list>
</item>

<!-- State: Default -->
<item>
<layer-list>
<item>
<shape android:shape="rectangle">
<solid android:color="#9B9A9A"/>
</shape>
</item>
<item android:bottom="1dp">
<shape android:shape="rectangle">
<solid android:color="#FFFF"/>
</shape>
</item>
</layer-list>
</item>
</selector>
76 changes: 58 additions & 18 deletions demo/src/main/res/layout/example.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content"
android:layout_gravity="center_vertical">

<LinearLayout
android:orientation="vertical"
Expand All @@ -17,14 +18,34 @@
android:layout_height="wrap_content">

<EditText
android:hint="Username"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:background="@drawable/custom_edit_text"
android:hint="USERNAME"
android:paddingBottom="10dp"
android:textColor="#000000"
android:textColorHint="#C1C1C1"
/>

<EditText
android:hint="Password"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:background="@drawable/custom_edit_text"
android:hint="PASSWORD"
android:paddingBottom="10dp"
android:textColor="#000000"
android:textColorHint="#C1C1C1"
android:textSize="15sp" />

<TextView
android:id="@+id/notice2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_marginStart="10dp"
/>
</LinearLayout>

<LinearLayout
Expand All @@ -33,34 +54,53 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<TextView
android:id="@+id/notice2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<Button
android:id="@+id/submit2"
android:text="Submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:background="@drawable/custom_button_background"
android:padding="15dp"
android:text="Submit"
android:textSize="14sp"
android:textColor="#FFFF"
android:typeface="serif" />
</LinearLayout>

<LinearLayout
android:padding="@dimen/activity_horizontal_margin"
android:id="@+id/edit_area"
android:layout_marginTop="32dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<EditText
android:hint="Username"
android:textColorHint="#C1C1C1"
android:paddingBottom="10dp"
android:background="@drawable/custom_edit_text"

android:layout_marginBottom="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<EditText
android:hint="Password"
android:textColorHint="#C1C1C1"
android:paddingBottom="10dp"
android:background="@drawable/custom_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />


<TextView
android:id="@+id/notice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_marginStart="10dp"
/>
</LinearLayout>

<LinearLayout
Expand All @@ -69,16 +109,16 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<TextView
android:id="@+id/notice"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<Button
android:id="@+id/submit"
android:text="Submit"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:background="@drawable/custom_button_background"
android:padding="15dp"
android:textSize="14sp"
android:textColor="#FFFF"
android:typeface="serif"/>
</LinearLayout>

</LinearLayout>
Expand Down
3 changes: 1 addition & 2 deletions demo/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="android:windowBackground">#FFFF</item>
</style>

</resources>