Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
Add padding
Browse files Browse the repository at this point in the history
Android studio is like "Now!" and I'm like "Calm down, Calm down."
Not much diffrent TBH
  • Loading branch information
Cj-Malone committed Jan 2, 2017
1 parent fd900ac commit 6da7eff
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 10 deletions.
4 changes: 4 additions & 0 deletions app/src/main/res/layout-w600dp/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="uk.co.keepawayfromfire.screens.MainActivity">

<fragment
Expand Down
28 changes: 18 additions & 10 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="uk.co.keepawayfromfire.screens.MainActivity">

<FrameLayout
Expand All @@ -16,12 +20,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" />
android:layout_alignParentTop="true"
android:layout_toStartOf="@+id/quickPic1Button" />

<Button
android:id="@+id/quickPic1Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/package2View"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="+" />
Expand All @@ -32,15 +38,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/package1View" />

<Button
android:id="@+id/quickPic2Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@id/quickPic1Button"
android:text="+" />
android:layout_below="@+id/package1View"
android:layout_toStartOf="@+id/quickPic1Button" />

<EditText
android:id="@+id/nameEditText"
Expand All @@ -57,4 +56,13 @@
android:layout_alignParentStart="true"
android:layout_below="@+id/nameEditText"
android:text="@string/create_shortcut" />

<Button
android:id="@+id/quickPic2Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/nameEditText"
android:layout_alignParentEnd="true"
android:layout_below="@+id/package1View"
android:text="+" />
</RelativeLayout>
4 changes: 4 additions & 0 deletions app/src/main/res/layout/activity_shortcut.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="uk.co.keepawayfromfire.screens.ShortcutActivity">

<TextView
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/res/values-w820dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(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>
</resources>
5 changes: 5 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>

0 comments on commit 6da7eff

Please sign in to comment.