TextView Text being cutoff in lower Api Devices (API~16) emulator

0 votes
asked Sep 13, 2017 by erluxman

The textview is working fine for higher api versions >19 but when I try to display the same textview in api 16 emulator, the text gets cutoff on the end/right edge like shown below.

enter image description here

I have layout like this

<?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>

What might be the reason behind this problem, any idea ?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
...