Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge pull request #349 from mapzen/chuck/login-flow-ui
Browse files Browse the repository at this point in the history
Make login UI less broken for really small screens and really big screens
  • Loading branch information
baldur committed Nov 6, 2014
2 parents 546ff75 + fa8b2e2 commit b89ab7d
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
21 changes: 11 additions & 10 deletions res/layout/login_activity.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -11,27 +11,28 @@
android:id="@+id/logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="180dp"
android:layout_centerInParent="true"
android:paddingBottom="48dp"
android:contentDescription="@string/logo_description"
android:src="@drawable/ic_open_logo" />

<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginTop="60dp" />

<com.viewpagerindicator.CirclePageIndicator
android:id="@+id/view_pager_indicator"
android:layout_width="match_parent"
android:layout_height="@dimen/vpi_height"
android:layout_marginBottom="@dimen/vpi_margin_bottom"
android:layout_alignParentBottom="true"
android:padding="@dimen/vpi_padding"
app:fillColor="@color/vpi_fill_color"
app:pageColor="@color/vpi_page_color"
app:strokeColor="@color/vpi_stroke_color"
app:radius="@dimen/vpi_radius"
app:strokeWidth="@dimen/vpi_stroke_width" />

</LinearLayout>
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_above="@+id/view_pager_indicator" />

</RelativeLayout>
2 changes: 1 addition & 1 deletion res/layout/login_page_1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/login_page_one_body"
style="@style/LoginBody" />
Expand Down
2 changes: 1 addition & 1 deletion res/layout/login_page_2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/login_page_two_body"
style="@style/LoginBody" />
Expand Down
2 changes: 1 addition & 1 deletion res/layout/login_page_3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/login_page_three_body"
style="@style/LoginBody" />
Expand Down
5 changes: 5 additions & 0 deletions res/values-sw600dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="login_body_font_size">36sp</dimen>
<dimen name="login_padding_horizontal">48dp</dimen>
</resources>
1 change: 1 addition & 0 deletions res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<dimen name="small_2">18sp</dimen>
<dimen name="small">15sp</dimen>
<dimen name="tiny">9sp</dimen>
<dimen name="login_body_font_size">24sp</dimen>

<!-- ViewPagerIndicator -->
<dimen name="vpi_height">26dp</dimen>
Expand Down
2 changes: 1 addition & 1 deletion res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<style name="LoginBody" parent="@android:style/Widget.TextView">
<item name="android:fontFamily">sans-serif-condensed-light</item>
<item name="android:textColor">@color/red</item>
<item name="android:textSize">@dimen/medium_2</item>
<item name="android:textSize">@dimen/login_body_font_size</item>
<item name="android:gravity">center</item>
</style>

Expand Down

0 comments on commit b89ab7d

Please sign in to comment.