Я хочу показать изображение элемента с его деталями по вертикали, используя Nested Scroll View, но у меня есть проблема с изображением внизу, оно отображается с ожиданием, и я не знаю почему.
'''<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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="match_parent"
tools:context=".ui.ItemDetialsActivity">
<com.google.android.material.appbar.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent">
<androidx.appcompat.widget.Toolbar
android:layout_height="350dp"
android:layout_width="match_parent"
android:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_collapseMode="parallax"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|enterAlways">
<ImageView
android:id="@+id/image_item_diteals"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
android:scaleType="fitXY"
android:src="@drawable/omla3"
app:layout_collapseMode="parallax"/>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
здесь на изображении есть зеленая линия слева от изображения, и я хочу, чтобы это было совпадение с родителем, я хочу, чтобы изображение начиналось слева направо
вот мой полный xml файл
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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="match_parent"
tools:context=".ui.ItemDetialsActivity">
<com.google.android.material.appbar.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent">
<androidx.appcompat.widget.Toolbar
android:layout_height="350dp"
android:layout_width="match_parent"
android:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_collapseMode="parallax"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|enterAlways">
<ImageView
android:id="@+id/image_item_diteals"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
android:scaleType="fitXY"
android:src="@drawable/omla3"
app:layout_collapseMode="parallax"/>
</androidx.appcompat.widget.Toolbar>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:clipToPadding="false"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="5dp"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/item_namedetails"
android:layout_marginTop="10dp"
android:padding="12dp"
android:text="Item name"
android:textColor="@color/colorPrimary"
android:textSize="20sp"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
app:cardElevation="8dp"
app:cardUseCompatPadding="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/fooddescrition"
android:layout_marginTop="12dp"
android:lineSpacingMultiplier="1.5"
android:padding="12dp"
android:text="ful description"
android:textColor="@android:color/black"
android:textSize="14sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</androidx.cardview.widget.CardView>
<LinearLayout
android:id="@+id/layoutprice"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_weight="1"
android:layout_width="0dp"
android:src="@drawable/ic_attach_money_black_24dp"
android:layout_height="match_parent" />
<TextView
android:id="@+id/foodpricedetails"
android:layout_marginTop="10dp"
android:padding="12dp"
android:text="1000"
android:textColor="@color/colorPrimary"
android:textSize="18sp"
android:textStyle="bold"
android:layout_weight="9"
android:layout_width="0dp"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>