I am trying to set the TextView to be auto scale inside the dialog,
xml
<com.abc.abc.AutoResizeTextView
android:id="@+id/text_btn"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_above="@+id/view2"
android:layout_alignLeft="@+id/linear_layout_color1"
android:layout_alignRight="@+id/linear_layout_color1"
android:layout_alignTop="@+id/doodleView"
android:layout_margin="1dp"
android:background="@color/white"
android:gravity="center"
android:text="A"
android:textColor="@color/grey" />
AutoResizeTextView
and AutoResizeTextView
as in
Auto Scale TextView Text to Fit within Bounds
and then in java code
AutoResizeTextView textView = (AutoResizeTextView ) writing_dialog.findViewById(R.id.text_btn);
textView.setText("B");
Question:
I do not know why the text B is still appearing very small and not auto-scaling...
Thanks for your advice!