Skip to content

Commit

Permalink
Merge pull request #6 from Dwite/master
Browse files Browse the repository at this point in the history
Distorted UI elements on large screen #1
  • Loading branch information
eoinfogarty committed Aug 17, 2016
2 parents e780bc3 + acfb185 commit 3658493
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_scene_one.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
android:id="@+id/deviceImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="30dp"
android:layout_margin="@dimen/deviceImagePadding"
android:scaleType="fitXY"
android:src="@drawable/img_device" />

<LinearLayout
Expand Down
7 changes: 5 additions & 2 deletions app/src/main/res/layout/fragment_scene_two.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<Space
android:id="@+id/space"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_width="@dimen/space_size"
android:layout_height="@dimen/space_size"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />

Expand All @@ -18,6 +18,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/space"
android:layout_marginTop="@dimen/space_margin"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_twitter" />

Expand All @@ -30,6 +31,7 @@
android:layout_marginRight="42dp"
android:layout_toLeftOf="@id/twitter_icon"
android:layout_toStartOf="@id/space"
android:layout_marginTop="@dimen/space_margin"
android:src="@drawable/ic_abema" />

<ImageView
Expand All @@ -41,6 +43,7 @@
android:layout_marginStart="42dp"
android:layout_toEndOf="@id/twitter_icon"
android:layout_toRightOf="@id/twitter_icon"
android:layout_marginTop="@dimen/space_margin"
android:src="@drawable/ic_facebook" />

</RelativeLayout>
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values-w600dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="deviceImagePadding">80dp</dimen>
<dimen name="space_size">70dp</dimen>
<dimen name="space_margin">200dp</dimen>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values-w820dp/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>

<dimen name="deviceImagePadding">100dp</dimen>
<dimen name="space_size">80dp</dimen>
<dimen name="space_margin">240dp</dimen>
</resources>
3 changes: 3 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
<dimen name="recommended_indicator_text">14sp</dimen>
<dimen name="recommended_indicator_margin">24dp</dimen>
<dimen name="recommended_margin_bottom">4dp</dimen>
<dimen name="deviceImagePadding">30dp</dimen>
<dimen name="space_size">40dp</dimen>
<dimen name="space_margin">0dp</dimen>
</resources>

0 comments on commit 3658493

Please sign in to comment.