From 37879ca07ee243a451b9de5391ae7f64904d1060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Thu, 25 Mar 2021 12:48:28 +0100 Subject: [PATCH] [Layout] Migrate marginLeft/marginRight to marginHorizontal. --- app/src/main/res/layout/card_home.xml | 3 +-- .../main/res/layout/card_home_timetable.xml | 3 +-- app/src/main/res/layout/dialog_day.xml | 15 ++++------- app/src/main/res/layout/dialog_event_list.xml | 9 +++---- .../main/res/layout/dialog_event_manual.xml | 8 +++--- .../main/res/layout/dialog_grade_details.xml | 3 +-- .../main/res/layout/dialog_lesson_details.xml | 15 ++++------- app/src/main/res/layout/event_list_item.xml | 3 +-- .../main/res/layout/fragment_attendance.xml | 15 ++++------- .../main/res/layout/fragment_behaviour.xml | 9 +++---- app/src/main/res/layout/fragment_feedback.xml | 6 ++--- .../res/layout/fragment_grades_editor.xml | 27 +++++++------------ app/src/main/res/layout/fragment_loading.xml | 5 ++-- app/src/main/res/layout/message_fragment.xml | 21 +++++---------- app/src/main/res/layout/messages_details.xml | 24 ++++++----------- app/src/main/res/layout/recaptcha_view.xml | 6 ++--- .../res/layout/row_grades_editor_item.xml | 3 +-- 17 files changed, 59 insertions(+), 116 deletions(-) diff --git a/app/src/main/res/layout/card_home.xml b/app/src/main/res/layout/card_home.xml index 60e58ec3..d2c42753 100644 --- a/app/src/main/res/layout/card_home.xml +++ b/app/src/main/res/layout/card_home.xml @@ -6,9 +6,8 @@ diff --git a/app/src/main/res/layout/card_home_timetable.xml b/app/src/main/res/layout/card_home_timetable.xml index 842e5b51..0df38a7d 100644 --- a/app/src/main/res/layout/card_home_timetable.xml +++ b/app/src/main/res/layout/card_home_timetable.xml @@ -239,8 +239,7 @@ style="?android:attr/progressBarStyleHorizontal" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="4dp" - android:layout_marginRight="4dp" + android:layout_marginHorizontal="4dp" android:visibility="gone" tools:max="2700" tools:progress="780" diff --git a/app/src/main/res/layout/dialog_day.xml b/app/src/main/res/layout/dialog_day.xml index d8c108ac..6461f14d 100644 --- a/app/src/main/res/layout/dialog_day.xml +++ b/app/src/main/res/layout/dialog_day.xml @@ -23,8 +23,7 @@ android:id="@+id/dayDate" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" + android:layout_marginHorizontal="8dp" android:layout_marginBottom="8dp" android:textAppearance="@style/NavView.TextView.Title" android:textIsSelectable="true" @@ -34,8 +33,7 @@ android:id="@+id/lessonsInfo" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" + android:layout_marginHorizontal="8dp" android:layout_marginBottom="8dp" android:textAppearance="@style/NavView.TextView.Helper" android:textIsSelectable="true" @@ -54,9 +52,8 @@ layout="@layout/row_lesson_change_item" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" + android:layout_marginHorizontal="8dp" android:layout_marginTop="5dp" - android:layout_marginRight="8dp" android:layout_marginBottom="5dp" android:visibility="gone" tools:visibility="visible" /> @@ -73,10 +70,9 @@ layout="@layout/row_teacher_absence_item" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginHorizontal="8dp" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" android:visibility="gone" tools:visibility="visible" /> @@ -85,8 +81,7 @@ android:id="@+id/eventsNoData" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" + android:layout_marginHorizontal="8dp" android:paddingVertical="16dp" android:orientation="vertical" android:visibility="gone" diff --git a/app/src/main/res/layout/dialog_event_list.xml b/app/src/main/res/layout/dialog_event_list.xml index d321844b..0b49bdd4 100644 --- a/app/src/main/res/layout/dialog_event_list.xml +++ b/app/src/main/res/layout/dialog_event_list.xml @@ -16,10 +16,9 @@ layout="@layout/row_lesson_change_item" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginHorizontal="24dp" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" - android:layout_marginLeft="24dp" - android:layout_marginRight="24dp" android:visibility="gone" tools:visibility="visible" /> @@ -28,10 +27,9 @@ layout="@layout/row_teacher_absence_item" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginHorizontal="24dp" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" - android:layout_marginLeft="24dp" - android:layout_marginRight="24dp" android:visibility="gone" tools:visibility="visible" /> @@ -39,8 +37,7 @@ android:id="@+id/eventListLessonDetails" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="24dp" - android:layout_marginRight="24dp" + android:layout_marginHorizontal="24dp" android:orientation="vertical"> @@ -231,4 +229,4 @@ android:text="@string/dialog_event_manual_no_subject" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/dialog_grade_details.xml b/app/src/main/res/layout/dialog_grade_details.xml index b53ff721..c97e9fd8 100644 --- a/app/src/main/res/layout/dialog_grade_details.xml +++ b/app/src/main/res/layout/dialog_grade_details.xml @@ -260,8 +260,7 @@ android:id="@+id/gradeHistoryNest" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="-8dp" - android:layout_marginRight="-8dp" + android:layout_marginHorizontal="-8dp" android:visibility="@{historyVisible ? View.VISIBLE : View.GONE}"> @@ -131,9 +130,8 @@ android:id="@+id/shiftedLayout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" + android:layout_marginHorizontal="8dp" android:layout_marginTop="8dp" - android:layout_marginRight="8dp" android:baselineAligned="false" android:gravity="center_vertical" android:orientation="horizontal"> @@ -159,9 +157,8 @@ @@ -231,8 +228,7 @@ @@ -302,8 +298,7 @@ android:id="@+id/eventsNoData" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" + android:layout_marginHorizontal="8dp" android:paddingVertical="16dp" android:orientation="vertical" android:visibility="gone" diff --git a/app/src/main/res/layout/event_list_item.xml b/app/src/main/res/layout/event_list_item.xml index f8f42ef9..24445327 100644 --- a/app/src/main/res/layout/event_list_item.xml +++ b/app/src/main/res/layout/event_list_item.xml @@ -90,8 +90,7 @@ android:layout_width="32dp" android:layout_height="32dp" android:layout_gravity="top" - android:layout_marginLeft="4dp" - android:layout_marginRight="4dp" + android:layout_marginHorizontal="4dp" android:visibility="gone" app:iiv_color="@color/md_green_500" app:iiv_icon="cmd-check" diff --git a/app/src/main/res/layout/fragment_attendance.xml b/app/src/main/res/layout/fragment_attendance.xml index da464f3b..5d89279f 100644 --- a/app/src/main/res/layout/fragment_attendance.xml +++ b/app/src/main/res/layout/fragment_attendance.xml @@ -59,8 +59,7 @@ android:id="@+id/presentCount" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="5dp" - android:layout_marginRight="5dp" + android:layout_marginHorizontal="5dp" android:textStyle="bold" tools:text="0" /> @@ -79,8 +78,7 @@ android:id="@+id/absentCount" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="5dp" - android:layout_marginRight="5dp" + android:layout_marginHorizontal="5dp" android:textStyle="bold" tools:text="0" /> @@ -99,8 +97,7 @@ android:id="@+id/absentUnexcusedCount" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="5dp" - android:layout_marginRight="5dp" + android:layout_marginHorizontal="5dp" android:textStyle="bold" tools:text="0" /> @@ -119,8 +116,7 @@ android:id="@+id/belatedCount" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="5dp" - android:layout_marginRight="5dp" + android:layout_marginHorizontal="5dp" android:textStyle="bold" tools:text="0" /> @@ -139,8 +135,7 @@ android:id="@+id/releasedCount" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="5dp" - android:layout_marginRight="5dp" + android:layout_marginHorizontal="5dp" android:textStyle="bold" tools:text="8" /> diff --git a/app/src/main/res/layout/fragment_behaviour.xml b/app/src/main/res/layout/fragment_behaviour.xml index ddd9faed..79b8554e 100644 --- a/app/src/main/res/layout/fragment_behaviour.xml +++ b/app/src/main/res/layout/fragment_behaviour.xml @@ -42,8 +42,7 @@ android:id="@+id/noticesPraisesCount" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="5dp" - android:layout_marginRight="5dp" + android:layout_marginHorizontal="5dp" android:textStyle="bold" tools:text="0" /> @@ -62,8 +61,7 @@ android:id="@+id/noticesWarningsCount" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="5dp" - android:layout_marginRight="5dp" + android:layout_marginHorizontal="5dp" android:textStyle="bold" tools:text="0" /> @@ -82,8 +80,7 @@ android:id="@+id/noticesOtherCount" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="5dp" - android:layout_marginRight="5dp" + android:layout_marginHorizontal="5dp" android:textStyle="bold" tools:text="0" /> diff --git a/app/src/main/res/layout/fragment_feedback.xml b/app/src/main/res/layout/fragment_feedback.xml index 64aa6a4f..d4891dd6 100644 --- a/app/src/main/res/layout/fragment_feedback.xml +++ b/app/src/main/res/layout/fragment_feedback.xml @@ -43,9 +43,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="end" - android:layout_marginLeft="8dp" + android:layout_marginHorizontal="8dp" android:layout_marginTop="8dp" - android:layout_marginRight="8dp" android:text="@string/feedback_faq_button" android:visibility="gone" /> @@ -112,8 +111,7 @@ diff --git a/app/src/main/res/layout/fragment_grades_editor.xml b/app/src/main/res/layout/fragment_grades_editor.xml index df49ef4d..242b8a02 100644 --- a/app/src/main/res/layout/fragment_grades_editor.xml +++ b/app/src/main/res/layout/fragment_grades_editor.xml @@ -10,9 +10,8 @@ android:id="@+id/subjectName" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" + android:layout_marginHorizontal="8dp" android:layout_marginTop="8dp" - android:layout_marginRight="8dp" android:textSize="24sp" android:textAppearance="@style/NavView.TextView.Title" tools:text="geografia" /> @@ -21,9 +20,8 @@ android:id="@+id/semesterName" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" + android:layout_marginHorizontal="8dp" android:layout_marginTop="8dp" - android:layout_marginRight="8dp" android:textAppearance="@style/NavView.TextView.Subtitle" tools:text="Semestr 1" /> @@ -36,8 +34,7 @@ @@ -152,9 +145,8 @@ android:id="@+id/addGrade" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" + android:layout_marginHorizontal="8dp" android:layout_marginTop="8dp" - android:layout_marginRight="8dp" android:minHeight="0dp" android:text="@string/grades_editor_add_grade" /> @@ -162,9 +154,8 @@ android:id="@+id/restoreGrades" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="8dp" + android:layout_marginHorizontal="8dp" android:layout_marginTop="8dp" - android:layout_marginRight="8dp" android:minHeight="0dp" android:text="@string/grades_editor_restore" /> diff --git a/app/src/main/res/layout/fragment_loading.xml b/app/src/main/res/layout/fragment_loading.xml index 1c740c19..b6e4ae34 100644 --- a/app/src/main/res/layout/fragment_loading.xml +++ b/app/src/main/res/layout/fragment_loading.xml @@ -22,11 +22,10 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/message_fragment.xml b/app/src/main/res/layout/message_fragment.xml index 53778e8a..4a475824 100644 --- a/app/src/main/res/layout/message_fragment.xml +++ b/app/src/main/res/layout/message_fragment.xml @@ -153,9 +153,8 @@ @@ -170,9 +169,8 @@ android:id="@+id/attachmentsTitle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="16dp" + android:layout_marginHorizontal="16dp" android:layout_marginTop="8dp" - android:layout_marginRight="16dp" android:text="Załączniki:" android:textAppearance="@style/NavView.TextView.Subtitle" /> @@ -186,8 +184,7 @@ @@ -186,9 +185,8 @@ android:id="@+id/messageAttachmentsTitle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="16dp" + android:layout_marginHorizontal="16dp" android:layout_marginTop="8dp" - android:layout_marginRight="16dp" android:text="Załączniki:" android:textAppearance="@style/NavView.TextView.Subtitle" /> @@ -226,8 +224,7 @@ android:layout_width="18dp" android:layout_height="18dp" android:layout_gravity="center_vertical|end" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" /> + android:layout_marginHorizontal="8dp" /> @@ -255,8 +252,7 @@ android:layout_width="18dp" android:layout_height="18dp" android:layout_gravity="center_vertical|end" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" /> + android:layout_marginHorizontal="8dp" /> @@ -265,8 +261,7 @@ @@ -66,8 +65,7 @@