Я изменил свой макет my_view.xml
:
<merge
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">
<android.support.constraint.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"
android:layout_width="match_parent"
android:layout_height="@dimen/account_menu_account_list_item_height">
...
и я использую его в двух других макетах:
<MyView
android:id="@+id/has_selected_account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/account_menu_header_signed_in_vertical_margin"
android:layout_marginBottom="@dimen/account_menu_header_signed_in_vertical_margin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/close_and_recents"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
было раньше:
<LinearLayout
android:id="@+id/has_selected_account"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/account_menu_header_signed_in_vertical_margin"
android:layout_marginBottom="@dimen/account_menu_header_signed_in_vertical_margin"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/close_and_recents"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
и
<MyView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/account_menu_account_list_item_height"
android:layout_marginEnd="@dimen/account_menu_account_list_item_margin_end"
android:layout_marginRight="@dimen/account_menu_account_list_item_margin_end"/>
было раньше
<android.support.constraint.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"
android:layout_width="match_parent"
android:layout_height="@dimen/account_menu_account_list_item_height">
Это способ передачи layout_constraint
и margin
из используемого макета? Поскольку использование макета не так, как раньше.