TextView Text在较低的Api设备(API~16)仿真器中被截止

时间:2017-09-13 05:38:13

标签: android android-layout android-emulator textview

textview适用于较高的api版本> 19但是当我尝试在 api 16模拟器中显示相同的textview时,文字获取结束/右边缘的截止,如下所示。

enter image description here

我有这样的布局

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_marginBottom="4dp"
    android:layout_marginEnd="8dp"
    android:layout_marginLeft="8dp"
    android:layout_marginRight="8dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="4dp"
    app:cardCornerRadius="4dp">


    <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingLeft="8dp"
        android:paddingRight="8dp"
        android:paddingStart="8dp"
        android:paddingEnd="8dp"
        android:baselineAligned="false"
        android:orientation="vertical">




            <TextView
                android:id="@+id/desh_fal_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="4dp"
                android:layout_marginTop="4dp"
                android:maxLines="1"
                android:textColor="#333"
                tools:text=""/>

            <TextView
                android:id="@+id/desh_fal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="4dp"
                android:ellipsize="end"
                android:scrollHorizontally="true"
                android:textSize="13sp"
                android:layout_marginBottom="4dp"
                tools:ignore="NestedWeights"/>


    </LinearLayout>
</android.support.v7.widget.CardView>

这个问题背后可能是什么原因,任何想法?

0 个答案:

没有答案