When I click on the button, the font size shrinks to 12. However, the result is :
In main.xml file TextView size given android:textSize="40sp" . and in side java, click on the button change the value here
public void onClick(View v) { text.setTextSize(12); }