Use `@id` and not `@+id` when referencing ids in layouts - RelativeLayout and toolbarId

This commit is contained in:
Benoit Marty 2021-12-01 22:44:07 +01:00
parent c84642aa33
commit 6624039413
10 changed files with 18 additions and 17 deletions

View File

@ -27,5 +27,6 @@
android:textSize===9
### Use `@id` and not `@+id` when referencing ids in layouts
layout_constraint(.*)="@\+id
layout_(.*)="@\+id
accessibilityTraversal(.*)="@\+id
toolbarId="@\+id

View File

@ -21,7 +21,7 @@
app:scrimAnimationDuration="250"
app:scrimVisibleHeightTrigger="80dp"
app:titleEnabled="false"
app:toolbarId="@+id/matrixProfileToolbar">
app:toolbarId="@id/matrixProfileToolbar">
<ViewStub
android:id="@+id/matrixProfileHeaderView"

View File

@ -20,7 +20,7 @@
app:scrimAnimationDuration="250"
app:scrimVisibleHeightTrigger="120dp"
app:titleEnabled="false"
app:toolbarId="@+id/toolbar">
app:toolbarId="@id/toolbar">
<FrameLayout
android:layout_width="match_parent"

View File

@ -20,7 +20,7 @@
app:scrimAnimationDuration="250"
app:scrimVisibleHeightTrigger="120dp"
app:titleEnabled="false"
app:toolbarId="@+id/toolbar">
app:toolbarId="@id/toolbar">
<com.google.android.material.appbar.MaterialToolbar
android:layout_width="match_parent"

View File

@ -39,7 +39,7 @@
style="@style/Widget.Vector.TextView.Caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/commandName"
android:layout_below="@id/commandName"
android:layout_alignParentStart="true"
android:layout_gravity="center_vertical"
android:maxLines="2"

View File

@ -40,7 +40,7 @@
style="@style/Widget.Vector.TextView.Caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/messageMemberNameView"
android:layout_alignBaseline="@id/messageMemberNameView"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:textColor="?vctr_content_secondary"

View File

@ -11,7 +11,7 @@
android:id="@+id/messageSelectedBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignBottom="@+id/informationBottom"
android:layout_alignBottom="@id/informationBottom"
android:layout_alignParentTop="true"
android:background="@drawable/highlighted_message_background" />
@ -46,7 +46,7 @@
style="@style/Widget.Vector.TextView.Caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/messageMemberNameView"
android:layout_alignBaseline="@id/messageMemberNameView"
android:layout_alignParentEnd="true"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
@ -145,7 +145,7 @@
android:id="@+id/messageSendStateImageView"
android:layout_width="@dimen/item_event_message_state_size"
android:layout_height="@dimen/item_event_message_state_size"
android:layout_alignBottom="@+id/viewStubContainer"
android:layout_alignBottom="@id/viewStubContainer"
android:layout_alignParentEnd="true"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
@ -160,7 +160,7 @@
android:id="@+id/eventSendingIndicator"
android:layout_width="@dimen/item_event_message_state_size"
android:layout_height="@dimen/item_event_message_state_size"
android:layout_alignBottom="@+id/viewStubContainer"
android:layout_alignBottom="@id/viewStubContainer"
android:layout_alignParentEnd="true"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
@ -175,7 +175,7 @@
android:id="@+id/informationBottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/viewStubContainer"
android:layout_below="@id/viewStubContainer"
android:layout_toEndOf="@id/messageStartGuideline"
android:addStatesFromChildren="true"
android:orientation="vertical">

View File

@ -11,7 +11,7 @@
android:id="@+id/messageSelectedBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignBottom="@+id/informationBottom"
android:layout_alignBottom="@id/informationBottom"
android:layout_alignParentTop="true"
android:background="@drawable/highlighted_message_background" />
@ -84,7 +84,7 @@
android:id="@+id/messageFailToSendIndicator"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_alignTop="@+id/viewStubContainer"
android:layout_alignTop="@id/viewStubContainer"
android:layout_marginStart="2dp"
android:layout_toEndOf="@id/viewStubContainer"
android:contentDescription="@string/a11y_error_message_not_sent"

View File

@ -142,7 +142,7 @@
android:id="@+id/mergedSumContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/creationTile"
android:layout_below="@id/creationTile"
android:layout_marginTop="8dp">
<ImageView
@ -192,7 +192,7 @@
android:id="@+id/itemMergedSeparatorView"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/mergedSumContainer"
android:layout_below="@id/mergedSumContainer"
android:layout_marginTop="4dp"
android:background="?vctr_list_separator" />

View File

@ -72,7 +72,7 @@
android:id="@+id/itemMergedSeparatorView"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@+id/mergedUTDTile"
android:layout_below="@id/mergedUTDTile"
android:layout_marginTop="4dp"
android:background="?vctr_list_separator" />