i want to set 2 different size in a multiline button.
what i do now is using below method but i have no control over the size and does not know how it looks like on different screen size.
final Button btnreset = (Button) findViewById(R.id.resetQ);
btnreset.setText(Html.fromHtml("<big>Click Here</big><br/><small>To Queue</small>"));
some of them say instead of using big or small. use html tag. html tag works fine on the color attribute but not size attribute.
final Button btnreset = (Button) findViewById(R.id.resetQ);
btnreset.setText(Html.fromHtml("<font size='9'>Click Here</font><br/><font size='2'>To Queue</font>"));
below is my xml coding
<Button
android:id="@+id/resetQ"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:text="New Queue"
android:textSize="@dimen/lblsize"
android:layout_weight="1" />
Edited
so now my code becomes
Spannable spannable = new SpannableString("Click Here To Queue");
spannable.setSpan(new RelativeSizeSpan(1.5f), 0, 10,Spannable.SPAN_INCLUSIVE_INCLUSIVE);
btnreset.setText(spannable);