I am adding Text in textview but it clipping at start and I have tried adding padding, margin start and textalignment center or end.
XML CODE
<LinearLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#eb2f06"
android:gravity="center"
android:orientation="vertical"
tools:context=".MainActivity">
<android.support.v7.widget.CardView
android:id="@+id/c1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dim_2"
android:visibility="invisible"
app:cardBackgroundColor="#ffeb3b"
app:cardCornerRadius="@dimen/dim_7"
app:cardElevation="@dimen/dim_5"
app:cardUseCompatPadding="true">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/dim_5">
<TextView
android:id="@+id/txtquote"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/dim_4"
android:fontFamily="@font/dancingbold"
android:padding="@dimen/dim_10"
android:textColor="#000000"
android:textSize="35sp" />
<TextView
android:id="@+id/txtauthor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dim_3"
android:layout_marginTop="@dimen/dim_3"
android:fontFamily="@font/dancingbold"
android:gravity="end"
android:padding="@dimen/dim_5"
android:textColor="#000000"
android:textSize="30sp" />
</LinearLayout>
</ScrollView>
</android.support.v7.widget.CardView>
Setting Content in java Java Code
txtquote.setText("\"" + arrquote.get(count).quote + "\"");
txtauthor.setText("~" + arrquote.get(count).author);
I have tried using hair space and \u0020
Firstly I thought it is because of my phone small screen but when I tried this in many different screen size phones, It still has the same problem