Skip to content

Commit

Permalink
added margins to the layouts;
Browse files Browse the repository at this point in the history
  • Loading branch information
diogoloureiro committed Nov 20, 2017
1 parent 55835ae commit 952dfe6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/src/main/res/layout/error_invalid_parameter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/answers_button_margin"
>

<ImageView
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/layout/error_no_results.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/answers_button_margin"
>

<ImageView
Expand All @@ -22,6 +23,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sorry_not_enough_questions"
android:textAlignment="center"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/error_invalid_image"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/fragment_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/answers_button_margin"
tools:context="com.dfl.trivia.main.MainActivityFragment"
>

Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout/fragment_question.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/answers_button_margin"
tools:context="com.dfl.trivia.question.QuestionActivityFragment"
>

Expand Down Expand Up @@ -45,6 +46,7 @@
android:id="@+id/false_button"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="@dimen/answers_button_margin"
android:layout_weight="1"
android:background="@android:color/holo_red_light"
android:text="@string/false_answer"
Expand All @@ -54,6 +56,7 @@
android:id="@+id/true_button"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="@dimen/answers_button_margin"
android:layout_weight="1"
android:background="@android:color/holo_green_light"
android:text="@string/true_answer"
Expand All @@ -74,6 +77,7 @@
android:id="@+id/answer_a_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/answers_button_margin"
android:layout_weight="1"
android:background="@android:color/holo_orange_light"
/>
Expand All @@ -82,6 +86,7 @@
android:id="@+id/answer_b_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/answers_button_margin"
android:layout_weight="1.0"
android:background="@android:color/holo_green_light"
/>
Expand All @@ -90,6 +95,7 @@
android:id="@+id/answer_c_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/answers_button_margin"
android:layout_weight="1.0"
android:background="@android:color/holo_blue_light"
/>
Expand All @@ -98,6 +104,7 @@
android:id="@+id/answer_d_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="@dimen/answers_button_margin"
android:layout_weight="1.0"
android:background="@android:color/holo_red_light"
/>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<resources>
<dimen name="fab_margin">16dp</dimen>
<dimen name="answers_button_margin">10dp</dimen>
<dimen name="layout_margin">10dp</dimen>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<string name="app_name">Trivia</string>
<string name="action_settings">Settings</string>
<string name="ups_something_went_wrong">Ups! Something went wrong :(</string>
<string name="sorry_not_enough_questions">Sorry not enough questions :( Do you know some? Help us out!</string>
<string name="sorry_not_enough_questions">Sorry not enough questions :( \n Do you know some? Help us out!</string>
<string name="i_want_to_help">I want to help!</string>
<string name="start">Start</string>
<string name="false_answer">False</string>
Expand Down

0 comments on commit 952dfe6

Please sign in to comment.