Skip to content

Commit

Permalink
Merge pull request #4652 from vector-im/feature/bma/avoid_useless_cod…
Browse files Browse the repository at this point in the history
…egen

Use viewBindingIgnore="true" when we do not need the ViewBinding.
  • Loading branch information
bmarty authored Dec 13, 2021
2 parents 406881c + ba81216 commit 5ea7f3c
Show file tree
Hide file tree
Showing 157 changed files with 345 additions and 171 deletions.
3 changes: 2 additions & 1 deletion vector/src/debug/res/layout/item_sas_emoji.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
android:layout_marginEnd="16dp"
android:layout_marginBottom="4dp"
android:gravity="center_vertical"
android:orientation="horizontal">
android:orientation="horizontal"
tools:viewBindingIgnore="true">

<TextView
android:id="@+id/sas_emoji_index"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/grid_item_emoji.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="40dp"
android:layout_height="40dp"
tools:showIn="@layout/activity_emoji_reaction_picker">
tools:showIn="@layout/activity_emoji_reaction_picker"
tools:viewBindingIgnore="true">

<View
android:id="@+id/grid_item_place_holder"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/grid_section_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
tools:viewBindingIgnore="true">

<TextView
android:id="@+id/section_header_textview"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_attachment_big_preview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black">
android:background="@android:color/black"
tools:viewBindingIgnore="true">

<ImageView
android:id="@+id/attachmentBigImageView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
android:layout_height="wrap_content"
android:layout_margin="2dp"
card_view:cardBackgroundColor="@android:color/transparent"
card_view:cardElevation="0dp">
card_view:cardElevation="0dp"
tools:viewBindingIgnore="true">

<im.vector.app.core.platform.CheckableImageView
android:id="@+id/attachmentMiniatureImageView"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_autocomplete_command.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
android:paddingStart="8dp"
android:paddingTop="6dp"
android:paddingEnd="8dp"
android:paddingBottom="6dp">
android:paddingBottom="6dp"
tools:viewBindingIgnore="true">

<TextView
android:id="@+id/commandName"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_autocomplete_emoji.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
android:background="?android:colorBackground"
android:foreground="?attr/selectableItemBackground"
android:orientation="horizontal"
android:padding="8dp">
android:padding="8dp"
tools:viewBindingIgnore="true">

<TextView
android:id="@+id/itemAutocompleteEmoji"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_autocomplete_matrix_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
android:background="?android:colorBackground"
android:foreground="?attr/selectableItemBackground"
android:orientation="horizontal"
android:padding="8dp">
android:padding="8dp"
tools:viewBindingIgnore="true">

<ImageView
android:id="@+id/matrixItemAutocompleteAvatar"
Expand Down
4 changes: 3 additions & 1 deletion vector/src/main/res/layout/item_autocomplete_more_result.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
style="@style/Widget.Vector.TextView.Caption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:padding="8dp"
android:text="@string/autocomplete_limited_results"
android:textColor="?vctr_content_secondary" />
android:textColor="?vctr_content_secondary"
tools:viewBindingIgnore="true" />
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_bottom_sheet_action.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
android:paddingStart="@dimen/layout_horizontal_margin"
android:paddingTop="8dp"
android:paddingEnd="@dimen/layout_horizontal_margin"
android:paddingBottom="8dp">
android:paddingBottom="8dp"
tools:viewBindingIgnore="true">

<!-- Used for sub items -->
<Space
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
android:paddingStart="@dimen/layout_horizontal_margin"
android:paddingTop="8dp"
android:paddingEnd="@dimen/layout_horizontal_margin"
android:paddingBottom="8dp">
android:paddingBottom="8dp"
tools:viewBindingIgnore="true">

<ImageView
android:id="@+id/radioIcon"
Expand Down Expand Up @@ -69,13 +70,13 @@
<TextView
android:id="@+id/listTitle"
style="@style/Widget.Vector.TextView.Body.Medium"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/spaces_which_can_access"
android:textAllCaps="true"
android:textColor="?vctr_content_secondary"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="@id/actionTitle"
app:layout_constraintTop_toBottomOf="@id/upgradeRequiredButton"
app:layout_goneMarginTop="8dp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
android:id="@+id/bottom_sheet_message_preview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:background="#1FF00FF0">
tools:background="#1FF00FF0"
tools:viewBindingIgnore="true">

<ImageView
android:id="@+id/bottom_sheet_message_preview_avatar"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="4dp">
android:layout_marginBottom="4dp"
tools:viewBindingIgnore="true">

<ProgressBar
android:id="@+id/messageStatusProgress"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp">
android:padding="8dp"
tools:viewBindingIgnore="true">

<TextView
android:id="@+id/quickReaction0"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_bottom_sheet_radio.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
android:paddingStart="@dimen/layout_horizontal_margin"
android:paddingTop="8dp"
android:paddingEnd="@dimen/layout_horizontal_margin"
android:paddingBottom="8dp">
android:paddingBottom="8dp"
tools:viewBindingIgnore="true">

<ImageView
android:id="@+id/radioIcon"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/bottom_sheet_message_preview"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
tools:viewBindingIgnore="true">

<ImageView
android:id="@+id/bottomSheetRoomPreviewAvatar"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_bottom_sheet_title.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
android:paddingStart="@dimen/layout_horizontal_margin"
android:paddingTop="8dp"
android:paddingEnd="@dimen/layout_horizontal_margin"
android:paddingBottom="8dp">
android:paddingBottom="8dp"
tools:viewBindingIgnore="true">

<TextView
android:id="@+id/itemBottomSheetTitleTitle"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_breadcrumbs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
android:background="?android:colorBackground"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground">
android:foreground="?attr/selectableItemBackground"
tools:viewBindingIgnore="true">

<View
android:id="@+id/breadcrumbsUnreadIndicator"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_checkbox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/phoneBookFilterContainer"
tools:text="@string/matrix_only_filter" />
tools:text="@string/matrix_only_filter"
tools:viewBindingIgnore="true" />
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_completion_homeserver.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textColor="?android:attr/textColorAlertDialogListItem"
tools:text="https://matrix.org" />
tools:text="https://matrix.org"
tools:viewBindingIgnore="true" />
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_contact_action.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
android:background="?attr/selectableItemBackground"
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingEnd="8dp">
android:paddingEnd="8dp"
tools:viewBindingIgnore="true">

<ImageView
android:id="@+id/actionIconImageView"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_contact_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
android:background="?android:colorBackground"
android:foreground="?attr/selectableItemBackground"
android:minHeight="60dp"
android:padding="8dp">
android:padding="8dp"
tools:viewBindingIgnore="true">

<TextView
android:id="@+id/contactDetailName"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_contact_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
android:foreground="?attr/selectableItemBackground"
android:paddingStart="8dp"
android:paddingTop="12dp"
android:paddingEnd="8dp">
android:paddingEnd="8dp"
tools:viewBindingIgnore="true">

<ImageView
android:id="@+id/contactAvatar"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_create_direct_room_user.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
android:background="?android:colorBackground"
android:foreground="?attr/selectableItemBackground"
android:gravity="center_vertical"
android:padding="8dp">
android:padding="8dp"
tools:viewBindingIgnore="true">

<FrameLayout
android:id="@+id/createDirectRoomUserAvatarContainer"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_device.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
android:background="?android:colorBackground"
android:foreground="?attr/selectableItemBackground"
android:orientation="horizontal"
android:padding="8dp">
android:padding="8dp"
tools:viewBindingIgnore="true">

<LinearLayout
android:layout_width="0dp"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_discovery_policy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:minHeight="80dp"
android:padding="16dp">
android:padding="16dp"
tools:viewBindingIgnore="true">

<androidx.constraintlayout.helper.widget.Flow
android:layout_width="0dp"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_display_read_receipt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
android:minHeight="40dp"
android:orientation="horizontal"
android:paddingStart="8dp"
android:paddingEnd="8dp">
android:paddingEnd="8dp"
tools:viewBindingIgnore="true">

<ImageView
android:id="@+id/readReceiptAvatar"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_divider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?vctr_list_separator"
tools:layout_height="100dp" />
tools:layout_height="100dp"
tools:viewBindingIgnore="true" />
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_divider_on_surface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?vctr_list_separator_on_surface"
tools:layout_height="100dp" />
tools:layout_height="100dp"
tools:viewBindingIgnore="true" />
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_editable_avatar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:padding="16dp">
android:padding="16dp"
tools:viewBindingIgnore="true">

<!-- I cannot do what I want using layer-list, do it manually here-->
<FrameLayout
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_editable_square_avatar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:padding="16dp">
android:padding="16dp"
tools:viewBindingIgnore="true">

<!-- I cannot do what I want using layer-list, do it manually here-->
<FrameLayout
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_emoji_result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
android:minHeight="48dp"
android:orientation="horizontal"
android:paddingStart="@dimen/layout_horizontal_margin"
android:paddingEnd="@dimen/layout_horizontal_margin">
android:paddingEnd="@dimen/layout_horizontal_margin"
tools:viewBindingIgnore="true">

<TextView
android:id="@+id/item_emoji_tv"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_error_retry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:padding="16dp">
android:padding="16dp"
tools:viewBindingIgnore="true">

<TextView
android:id="@+id/itemErrorRetryText"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_expandable_textview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:padding="16dp">
android:padding="16dp"
tools:viewBindingIgnore="true">

<im.vector.app.core.ui.views.NonScrollingTextView
android:id="@+id/expandableContent"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_form_advanced_toggle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
android:paddingStart="@dimen/layout_horizontal_margin"
android:paddingTop="12dp"
android:paddingEnd="@dimen/layout_horizontal_margin"
android:paddingBottom="12dp">
android:paddingBottom="12dp"
tools:viewBindingIgnore="true">

<TextView
android:id="@+id/itemFormAdvancedToggleTitleView"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:minHeight="@dimen/item_form_min_height">
android:minHeight="@dimen/item_form_min_height"
tools:viewBindingIgnore="true">

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/formMultiLineTextInputLayout"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_form_submit_button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:minHeight="64dp">
android:minHeight="64dp"
tools:viewBindingIgnore="true">

<Button
android:id="@+id/form_submit_button"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_form_switch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:foreground="?attr/selectableItemBackground"
android:minHeight="@dimen/item_form_min_height">
android:minHeight="@dimen/item_form_min_height"
tools:viewBindingIgnore="true">

<TextView
android:id="@+id/formSwitchTitle"
Expand Down
3 changes: 2 additions & 1 deletion vector/src/main/res/layout/item_form_text_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:minHeight="@dimen/item_form_min_height">
android:minHeight="@dimen/item_form_min_height"
tools:viewBindingIgnore="true">

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/formTextInputTextInputLayout"
Expand Down
Loading

0 comments on commit 5ea7f3c

Please sign in to comment.