I face a problem when scaling up TextViews and Checkboxes in Samsung GT-N5110 android version 4.1.2 the following image appears after scaling up the TextView there's textview inside i want to scale it up i did try enabling scale animation in developer options with no use i also did try nineoldandroid.jar.
here's my code inside fargment:
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
view = inflater.inflate(R.layout.test, container, false);
linearLayout = (LinearLayout) view.findViewById(R.id.test);
textView = (AutoResizeTextView) view.findViewById(R.id.text);
return view;
}
@Override
public void onStart() {
super.onStart();
ObjectAnimator.ofFloat(linearLayout , "scaleY", 500).setDuration(500).start();
ObjectAnimator.ofFloat(linearLayout , "scaleX", 500).setDuration(500).start();
}
layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/test"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:background="@drawable/prayer_background">
<com.example.views.AutoResizeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/aboutUs"
android:textSize="5sp" />
</LinearLayout>
</LinearLayout>
prayer_background:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<corners android:radius="10dip" />
<stroke
android:width="5dip"
android:color="@color/mainColor" />
<solid android:color="@color/mainColor" />
</shape>
Update:
I did try AutoResizeText and ScaleableTextView mentioned here: I get the following result: