Зачем в Ricklerview дизайн, показывающий разное выравнивание зрения в разных рядах Android? - PullRequest
0 голосов
/ 05 июня 2019

enter image description here

Вот как показывает рециркуляция.Разное выравнивание показывается в разных рядах.Я сталкиваюсь с проблемой выравнивания представлений в строках элементов recyclerView.

<android.support.v7.widget.CardView
    android:id="@+id/cvItems"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginLeft="4dp"
    android:layout_marginRight="4dp"
    android:layout_marginTop="4dp"
    app:cardElevation="20dp"
    app:cardPreventCornerOverlap="true">
<LinearLayout
        android:id="@+id/llCompleted"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp">
        <LinearLayout
            android:id="@+id/llReviewNow"
            android:layout_width="wrap_content"
            android:layout_height="40dp"
            android:layout_marginTop="5dp"
            android:layout_marginLeft="30dp"
            android:layout_marginRight="10dp"
            android:layout_weight="1"
            android:padding="10dp"
            android:gravity="center"
            android:background="#FFA80D"
            android:orientation="horizontal">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="Review Now"
                android:textColor="#ffffff"/>
        </LinearLayout>
    <LinearLayout
            android:id="@+id/llViewVendor"
            android:layout_width="wrap_content"
            android:layout_height="40dp"
            android:layout_marginTop="5dp"
            android:layout_marginLeft="30dp"
            android:layout_marginRight="10dp"
            android:layout_weight="1"
            android:padding="10dp"
            android:gravity="center"
            android:background="#FFA80D"
            android:orientation="horizontal">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="View Vendor"
                android:textColor="#ffffff"/>
        </LinearLayout>
    </LinearLayout>
</android.support.v7.widget.CardView>

Я сталкиваюсь с проблемой этих двух линейных разметок.Как это может случиться, что один и тот же вид показывает разные позиции в разных строках?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...