Skip to content

Commit 5975eea

Browse files
Merge pull request #244 from MihaiCristianCondrea/codex/optimize-android-xml-layouts-for-performance-fhy2o0
Optimize layout wrappers and clean redundant attributes
2 parents 67dfa50 + e03002f commit 5975eea

11 files changed

+5
-13
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
android:id="@+id/ad_container"
4646
android:layout_width="match_parent"
4747
android:layout_height="wrap_content"
48-
app:layout_constraintBottom_toTopOf="@+id/nav_view">
48+
app:layout_constraintBottom_toTopOf="@+id/nav_view"
49+
app:layout_constraintEnd_toEndOf="parent"
50+
app:layout_constraintStart_toStartOf="parent">
4951

5052
<View
5153
android:id="@+id/ad_placeholder"
@@ -76,4 +78,4 @@
7678
app:layout_constraintEnd_toEndOf="parent"
7779
app:layout_constraintStart_toStartOf="parent"
7880
app:layout_constraintTop_toTopOf="parent" />
79-
</androidx.constraintlayout.widget.ConstraintLayout>
81+
</androidx.constraintlayout.widget.ConstraintLayout>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
xmlns:tools="http://schemas.android.com/tools"
66
android:id="@+id/container"
77
android:layout_width="match_parent"
8-
android:layout_height="match_parent"
9-
android:orientation="vertical">
8+
android:layout_height="match_parent">
109

1110
<FrameLayout
1211
android:id="@+id/frame_layout_shortcuts"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@
269269
android:layout_width="match_parent"
270270
android:layout_height="wrap_content"
271271
android:layout_marginStart="24dp"
272-
android:layout_marginTop="0dp"
273272
android:layout_marginEnd="24dp"
274273
android:layout_marginBottom="24dp"
275274
app:layout_constraintBottom_toBottomOf="parent"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
android:layout_width="match_parent"
7878
android:layout_height="wrap_content"
7979
android:layout_marginStart="24dp"
80-
android:layout_marginTop="0dp"
8180
android:layout_marginEnd="24dp"
8281
android:layout_marginBottom="24dp"
8382
app:layout_constraintBottom_toBottomOf="parent"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
android:layout_width="match_parent"
3434
android:layout_height="wrap_content"
3535
android:layout_marginStart="24dp"
36-
android:layout_marginTop="0dp"
3736
android:layout_marginEnd="24dp"
3837
android:layout_marginBottom="24dp"
3938
app:layout_constraintBottom_toBottomOf="parent"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@
188188
android:layout_width="match_parent"
189189
android:layout_height="wrap_content"
190190
android:layout_marginHorizontal="16dp"
191-
android:layout_marginBottom="0dp"
192191
app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.CardViewTopRounded">
193192

194193
<androidx.appcompat.widget.LinearLayoutCompat

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
android:layout_width="match_parent"
3434
android:layout_height="wrap_content"
3535
android:layout_marginStart="24dp"
36-
android:layout_marginTop="0dp"
3736
android:layout_marginEnd="24dp"
3837
android:layout_marginBottom="24dp"
3938
app:layout_constraintBottom_toBottomOf="parent"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
android:layout_width="match_parent"
6060
android:layout_height="wrap_content"
6161
android:layout_marginStart="24dp"
62-
android:layout_marginTop="0dp"
6362
android:layout_marginEnd="24dp"
6463
android:layout_marginBottom="24dp"
6564
app:layout_constraintBottom_toBottomOf="parent"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
android:layout_width="match_parent"
3131
android:layout_height="wrap_content"
3232
android:layout_marginStart="24dp"
33-
android:layout_marginTop="0dp"
3433
android:layout_marginEnd="24dp"
3534
android:layout_marginBottom="24dp"
3635
app:layout_constraintBottom_toBottomOf="parent"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
android:layout_width="match_parent"
5656
android:layout_height="wrap_content"
5757
android:layout_marginStart="24dp"
58-
android:layout_marginTop="0dp"
5958
android:layout_marginEnd="24dp"
6059
android:layout_marginBottom="24dp"
6160
app:layout_constraintBottom_toBottomOf="parent"

0 commit comments

Comments
 (0)