Skip to content
1 change: 1 addition & 0 deletions changelog.d/4604.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cleanup the layout files
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appBarLayout">
app:layout_constraintTop_toBottomOf="@id/appBarLayout">

<LinearLayout
android:layout_width="match_parent"
Expand Down Expand Up @@ -334,7 +334,6 @@

</com.google.android.material.textfield.TextInputLayout>


<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
android:layout_width="match_parent"
Expand Down
1 change: 0 additions & 1 deletion library/ui-styles/src/debug/res/values/debug_styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<item name="android:visibility">visible</item>
</style>


<style name="Theme.Debug.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
<!-- Keep all default value -->
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@
<changeImageTransform />

</transitionSet>


2 changes: 0 additions & 2 deletions library/ui-styles/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@
<dimen name="call_pip_width">88dp</dimen>
<dimen name="call_pip_radius">8dp</dimen>


<dimen name="item_form_min_height">76dp</dimen>

<!-- Max width for some buttons -->
<dimen name="button_max_width">280dp</dimen>

<!-- Navigation Drawer -->
<dimen name="navigation_drawer_max_width">320dp</dimen>

</resources>
1 change: 0 additions & 1 deletion library/ui-styles/src/main/res/values/palette.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<color name="palette_prune">#5C56F5</color>
<color name="palette_links">#0086E6</color>


<!-- For light themes -->
<color name="palette_gray_25">#F4F6FA</color>
<color name="palette_gray_50">#E3E8F0</color>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>

<resources>

<declare-styleable name="BadgeFloatingActionButton">
Expand Down
4 changes: 0 additions & 4 deletions library/ui-styles/src/main/res/values/styles_social_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
<item name="android:backgroundTint">@android:color/black</item>
</style>


<style name="Widget.Vector.Button.Outlined.SocialLogin.Facebook">
<item name="icon">@drawable/ic_social_facebook</item>
</style>
Expand All @@ -68,7 +67,6 @@
<item name="android:backgroundTint">#3877EA</item>
</style>


<style name="Widget.Vector.Button.Outlined.SocialLogin.Twitter">
<item name="icon">@drawable/ic_social_twitter</item>
</style>
Expand All @@ -85,7 +83,6 @@
<item name="android:backgroundTint">#5D9EC9</item>
</style>


<style name="Widget.Vector.Button.Outlined.SocialLogin.Apple">
<item name="icon">@drawable/ic_social_apple</item>
</style>
Expand Down Expand Up @@ -118,5 +115,4 @@
<item name="android:backgroundTint">@android:color/black</item>
</style>


</resources>
5 changes: 5 additions & 0 deletions tools/check/forbidden_strings_in_layout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@

### Use style="@style/Widget.Vector.TextView.*" instead of textSize attribute
android:textSize===9

### Use `@id` and not `@+id` when referencing ids in layouts
layout_(.*)="@\+id
accessibilityTraversal(.*)="@\+id
toolbarId="@\+id
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those mistakes should not reappear thanks to that new rules

2 changes: 0 additions & 2 deletions tools/templates/ElementFeature/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@
suggest="${underscoreToCamelCase(classToResource(fragmentClass))}ViewEvents"
default="MainViewEvents"
help="The name of the view events to create" />



<parameter
id="packageName"
Expand Down
4 changes: 1 addition & 3 deletions vector/src/debug/res/layout/demo_theme_sample.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
The aim of this file is to test the different themes of Riot
The aim of this file is to test the different themes of Element
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIP Riot

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋

-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
Expand Down
4 changes: 1 addition & 3 deletions vector/src/debug/res/layout/demo_themes.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>

<!--
The aim of this file is to test the different themes of Riot
The aim of this file is to test the different themes of Element
Unfortunately, this does not work in the preview.
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@

</item>


</layer-list>
1 change: 0 additions & 1 deletion vector/src/main/res/drawable/bg_rounded_button.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item android:id="@android:id/mask">
Expand Down
1 change: 0 additions & 1 deletion vector/src/main/res/drawable/bg_tombstone_predecessor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@
</shape>
</item>


</layer-list>
1 change: 0 additions & 1 deletion vector/src/main/res/drawable/bg_unread_notification.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@
</shape>
</item>


</selector>
2 changes: 1 addition & 1 deletion vector/src/main/res/layout/activity_big_image_viewer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appBarLayout"
app:layout_constraintTop_toBottomOf="@id/appBarLayout"
app:optimizeDisplay="true" />

</androidx.constraintlayout.widget.ConstraintLayout>
7 changes: 2 additions & 5 deletions vector/src/main/res/layout/activity_call.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- tools:ignore is needed because lint thinks this can be replaced with a merge. Replacing this
with a merge causes the fullscreen SurfaceView not to be centered. -->

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
Expand Down Expand Up @@ -33,10 +31,10 @@
android:id="@+id/pipContainer"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/callControlsView"
app:layout_constraintBottom_toTopOf="@id/callControlsView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/callToolbar">
app:layout_constraintTop_toBottomOf="@id/callToolbar">

<com.google.android.material.card.MaterialCardView
android:id="@+id/pipRendererWrapper"
Expand Down Expand Up @@ -94,7 +92,6 @@

</androidx.constraintlayout.widget.ConstraintLayout>


<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/callToolbar"
android:layout_width="match_parent"
Expand Down
4 changes: 2 additions & 2 deletions vector/src/main/res/layout/activity_call_transfer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:layout_constraintBottom_toTopOf="@+id/callTransferActionsLayout"
app:layout_constraintBottom_toTopOf="@id/callTransferActionsLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/appBarLayout" />
Expand Down Expand Up @@ -65,7 +65,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
android:layout_toStartOf="@+id/callTransferConnectAction"
android:layout_toStartOf="@id/callTransferConnectAction"
android:layout_toEndOf="@id/callTransferConsultCheckBox"
android:ellipsize="end"
android:text="@string/call_transfer_consult_first" />
Expand Down
2 changes: 1 addition & 1 deletion vector/src/main/res/layout/activity_filtered_rooms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appBarLayout" />
app:layout_constraintTop_toBottomOf="@id/appBarLayout" />

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
2 changes: 0 additions & 2 deletions vector/src/main/res/layout/activity_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@

</androidx.coordinatorlayout.widget.CoordinatorLayout>


<androidx.fragment.app.FragmentContainerView
android:id="@+id/homeDrawerFragmentContainer"
android:layout_width="@dimen/navigation_drawer_max_width"
android:layout_height="match_parent"
android:layout_gravity="start" />


</androidx.drawerlayout.widget.DrawerLayout>
2 changes: 1 addition & 1 deletion vector/src/main/res/layout/activity_incoming_share.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appBarLayout" />
app:layout_constraintTop_toBottomOf="@id/appBarLayout" />

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
1 change: 0 additions & 1 deletion vector/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- The background of this Activity is in the theme (so just added as tools here, for preview),
so we just add a ProgressBar here -->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
Expand Down
1 change: 0 additions & 1 deletion vector/src/main/res/layout/activity_room_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

</androidx.coordinatorlayout.widget.CoordinatorLayout>


<androidx.fragment.app.FragmentContainerView
android:id="@+id/roomDetailDrawerContainer"
android:layout_width="wrap_content"
Expand Down
2 changes: 1 addition & 1 deletion vector/src/main/res/layout/activity_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appBarLayout" />
app:layout_constraintTop_toBottomOf="@id/appBarLayout" />

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
2 changes: 1 addition & 1 deletion vector/src/main/res/layout/activity_vector_web_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appBarLayout" />
app:layout_constraintTop_toBottomOf="@id/appBarLayout" />

<ProgressBar
android:id="@+id/simple_webview_loader"
Expand Down
4 changes: 2 additions & 2 deletions vector/src/main/res/layout/alerter_incoming_call_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
android:maxLines="1"
android:textColor="?vctr_content_primary"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/incomingCallRejectView"
app:layout_constraintEnd_toStartOf="@id/incomingCallRejectView"
app:layout_constraintStart_toEndOf="@id/incomingCallAvatar"
app:layout_constraintTop_toTopOf="@id/incomingCallAvatar"
tools:text="@sample/users.json/data/displayName" />
Expand All @@ -48,7 +48,7 @@
android:maxLines="1"
android:textColor="?vctr_content_secondary"
app:drawableTint="?vctr_content_secondary"
app:layout_constraintEnd_toStartOf="@+id/incomingCallRejectView"
app:layout_constraintEnd_toStartOf="@id/incomingCallRejectView"
app:layout_constraintStart_toStartOf="@id/incomingCallNameView"
app:layout_constraintTop_toBottomOf="@id/incomingCallNameView"
tools:drawableStart="@drawable/ic_call_audio_small"
Expand Down
4 changes: 2 additions & 2 deletions vector/src/main/res/layout/alerter_verification_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
android:layout_height="40dp"
android:importantForAccessibility="no"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/alerter_texts"
app:layout_constraintEnd_toStartOf="@id/alerter_texts"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@sample/user_round_avatars" />
Expand All @@ -26,7 +26,7 @@
android:layout_height="24dp"
android:importantForAccessibility="no"
android:src="@drawable/ic_shield_warning"
app:layout_constraintCircle="@+id/ivUserAvatar"
app:layout_constraintCircle="@id/ivUserAvatar"
app:layout_constraintCircleAngle="135"
app:layout_constraintCircleRadius="20dp"
tools:ignore="MissingConstraints"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@
app:titleTextColor="?vctr_content_primary"
tools:actionDescription="" />


</LinearLayout>
2 changes: 1 addition & 1 deletion vector/src/main/res/layout/bottom_sheet_bootstrap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/bootstrapIcon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/bootstrapIcon"
app:layout_constraintStart_toEndOf="@id/bootstrapIcon"
app:layout_constraintTop_toTopOf="@id/bootstrapIcon"
tools:text="@string/bottom_sheet_setup_secure_backup_title" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@
app:tint="?vctr_content_primary"
app:titleTextColor="?vctr_content_primary" />


</LinearLayout>
2 changes: 0 additions & 2 deletions vector/src/main/res/layout/bottom_sheet_invited_to_space.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
app:layout_constraintTop_toTopOf="parent"
tools:src="@sample/user_round_avatars" />


<TextView
android:id="@+id/inviterText"
style="@style/Widget.Vector.TextView.Subtitle"
Expand Down Expand Up @@ -61,7 +60,6 @@
app:layout_constraintTop_toBottomOf="@id/inviterText"
tools:text="@sample/users.json/data/id" />


</androidx.constraintlayout.widget.ConstraintLayout>

<View
Expand Down
2 changes: 0 additions & 2 deletions vector/src/main/res/layout/bottom_sheet_leave_space.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
android:layout_gravity="center_horizontal"
android:text="@string/leave_space" />


</FrameLayout>

<Button
Expand All @@ -103,5 +102,4 @@
android:layout_marginBottom="8dp"
android:text="@string/cancel" />


</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
android:paddingTop="8dp"
android:paddingBottom="8dp">


<TextView
style="@style/Widget.Vector.TextView.HeadlineMedium"
android:layout_width="match_parent"
Expand Down
Loading