Элементы в Horizontal Scroll магнитятся к левой части экрана

Есть HorizontalScrollView в нем есть 4 CardView, они скролятся свободно, мне нужно чтобы край каждого CardView магнитился к левой части экрана. Как это сделать?

Думаю это можно реализовать с помощью CollapsingToolbarLayout, но как именно я не понимаю, подскажите пожалуйста.

Как у меня сейчас

введите сюда описание изображения

Как нужно

введите сюда описание изображения

Код

 <HorizontalScrollView
                    android:layout_width="match_parent"
                    android:layout_height="133dp"
                    android:background="@color/color_10"
                    android:focusable="false"
                    android:importantForAccessibility="no"
                    android:scrollbars="none"
                    android:soundEffectsEnabled="false">

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:background="@color/color_6"
                        android:orientation="horizontal"
                        android:padding="6dp">

                        <androidx.cardview.widget.CardView
                            android:layout_width="242dp"
                            android:layout_height="match_parent"
                            android:layout_margin="3dp"
                            android:backgroundTint="@color/color_2"
                            android:clickable="true"
                            android:foreground="?android:attr/selectableItemBackground"
                            app:cardCornerRadius="6dp"
                            app:cardElevation="2dp">

                            <androidx.cardview.widget.CardView
                                android:layout_width="match_parent"
                                android:layout_height="match_parent"
                                android:layout_margin="1dp"
                                android:backgroundTint="@color/color_1"
                                app:cardCornerRadius="5dp"
                                app:cardElevation="2dp">

                                <androidx.cardview.widget.CardView
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:layout_margin="2dp"
                                    app:cardCornerRadius="4dp"
                                    app:cardElevation="0dp">


                                <ImageView
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:background="@color/color_18"/>
                                </androidx.cardview.widget.CardView>
                            </androidx.cardview.widget.CardView>
                        </androidx.cardview.widget.CardView>

                        <androidx.cardview.widget.CardView
                            android:layout_width="242dp"
                            android:layout_height="wrap_content"
                            android:layout_margin="3dp"
                            android:backgroundTint="@color/color_2"
                            android:clickable="true"
                            android:foreground="?android:attr/selectableItemBackground"
                            app:cardCornerRadius="6dp"
                            app:cardElevation="2dp">

                            <androidx.cardview.widget.CardView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_margin="1dp"
                                android:backgroundTint="@color/color_1"
                                app:cardCornerRadius="5dp"
                                app:cardElevation="2dp">


                                <RelativeLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent">

                                    <TextView
                                        android:layout_width="match_parent"
                                        android:layout_height="match_parent"
                                        android:gravity="center"
                                        android:shadowColor="@color/color_0"
                                        android:shadowRadius="3"
                                        android:text="@string/mega_boom"
                                        android:textColor="@color/colorAccent"
                                        android:textSize="20sp"
                                        android:textStyle="bold" />

                                </RelativeLayout>

                            </androidx.cardview.widget.CardView>
                        </androidx.cardview.widget.CardView>

                        <androidx.cardview.widget.CardView
                            android:layout_width="242dp"
                            android:layout_height="wrap_content"
                            android:layout_margin="3dp"
                            android:backgroundTint="@color/color_2"
                            android:clickable="true"
                            android:foreground="?android:attr/selectableItemBackground"
                            app:cardCornerRadius="6dp"
                            app:cardElevation="2dp">

                            <androidx.cardview.widget.CardView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_margin="1dp"
                                android:backgroundTint="@color/color_1"
                                app:cardCornerRadius="5dp"
                                app:cardElevation="2dp">


                                <RelativeLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent">

                                    <TextView
                                        android:layout_width="match_parent"
                                        android:layout_height="match_parent"
                                        android:gravity="center"
                                        android:shadowColor="@color/color_0"
                                        android:shadowRadius="3"
                                        android:text="@string/mega_boom"
                                        android:textColor="@color/colorAccent"
                                        android:textSize="20sp"
                                        android:textStyle="bold" />

                                </RelativeLayout>

                            </androidx.cardview.widget.CardView>
                        </androidx.cardview.widget.CardView>

                        <androidx.cardview.widget.CardView
                            android:layout_width="242dp"
                            android:layout_height="wrap_content"
                            android:layout_margin="3dp"
                            android:backgroundTint="@color/color_2"
                            android:clickable="true"
                            android:foreground="?android:attr/selectableItemBackground"
                            app:cardCornerRadius="6dp"
                            app:cardElevation="2dp">

                            <androidx.cardview.widget.CardView
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_margin="1dp"
                                android:backgroundTint="@color/color_1"
                                app:cardCornerRadius="5dp"
                                app:cardElevation="2dp">


                                <RelativeLayout
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent">

                                    <TextView
                                        android:layout_width="match_parent"
                                        android:layout_height="match_parent"
                                        android:gravity="center"
                                        android:shadowColor="@color/color_0"
                                        android:shadowRadius="3"
                                        android:text="@string/mega_boom"
                                        android:textColor="@color/colorAccent"
                                        android:textSize="20sp"
                                        android:textStyle="bold" />
                                </RelativeLayout>
                            </androidx.cardview.widget.CardView>
                        </androidx.cardview.widget.CardView>
                    </LinearLayout>
                </HorizontalScrollView>

Ответы (0 шт):