RecyclerView
我在项目中有应用程序MaterialCardView
。我看到,我的物品被切断了:
这是我的项目 xml 文件:
<?xml version="1.0" encoding="utf-8"?>
<layout 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">
<data>
</data>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="46dp"
android:layout_marginTop="6dp"
android:layout_marginBottom="6dp"
app:cardCornerRadius="5dp"
app:cardElevation="0dp"
app:strokeColor="@color/silver"
app:strokeWidth="1dp">
<EditText
android:id="@+id/editText"
android:textColor="@color/gray"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:layout_marginLeft="23dp"
android:layout_marginRight="23dp"
android:textSize="14dp"
android:textColorHint="@color/grey"
android:background="@color/colorPrimary"
android:gravity="center_vertical"
android:hint="text here"
android:singleLine="true"
android:textDirection="rtl"
tools:text="sfsdf s fs fs" />
</com.google.android.material.card.MaterialCardView>
</RelativeLayout>
</layout>
而且我不知道如何解决它。此问题并非在所有设备上重现,仅在三星上重现。我的应用程序处于 RTL 模式,也许问题与此有关。有没有办法解决它?