Skip to content

Commit fdbe504

Browse files
fix: logo getting cropped in landscape mode of login page (commons-app#6106)
* Fixed logo getting cropped in landscape mode of login page * Indentation added at line 12 * New Dimension created in dimens.xml which is used in land\activity_login.xml
1 parent b2159ed commit fdbe504

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

app/src/main/res/layout-land/activity_login.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
android:layout_width="@dimen/landscape_width"
1313
android:layout_height="wrap_content"
1414
android:layout_gravity="center"
15-
android:layout_marginTop="@dimen/small_gap">
15+
android:layout_marginTop="@dimen/login_gap">
1616

1717
<androidx.cardview.widget.CardView
1818
android:layout_width="match_parent"

app/src/main/res/layout-xlarge/activity_login.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
xmlns:app="http://schemas.android.com/apk/res-auto"
33
xmlns:tools="http://schemas.android.com/tools"
44
android:layout_width="match_parent"
5-
android:layout_height="match_parent">
5+
android:layout_height="match_parent"
6+
android:layout_gravity="center_vertical">
67

78
<LinearLayout
89
android:layout_width="match_parent"
910
android:layout_height="wrap_content"
10-
android:orientation="vertical">
11+
android:orientation="vertical"
12+
android:layout_gravity="center_vertical">
1113

1214
<FrameLayout
1315
android:layout_width="@dimen/landscape_width"

app/src/main/res/layout/activity_login.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
22
android:layout_width="wrap_content"
3-
android:layout_height="wrap_content">
3+
android:layout_height="wrap_content"
4+
android:layout_gravity="center_vertical">
45

56
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
67
xmlns:tools="http://schemas.android.com/tools"
78
android:layout_width="wrap_content"
89
android:layout_height="wrap_content"
910
android:fillViewport="true"
10-
android:orientation="vertical">
11+
android:orientation="vertical"
12+
android:layout_gravity="center_vertical">
1113

1214
<FrameLayout
1315
android:layout_width="wrap_content"

app/src/main/res/values/dimens.xml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<dimen name="gigantic_gap">64dp</dimen>
2121
<dimen name="standard_gap">16dp</dimen>
2222
<dimen name="small_gap">8dp</dimen>
23+
<dimen name="login_gap">20dp</dimen>
2324
<dimen name="small_height">7dp</dimen>
2425
<dimen name="tiny_gap">4dp</dimen>
2526
<dimen name="very_tiny_gap">2dp</dimen>

0 commit comments

Comments
 (0)