• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps how setup the font size of text in a Button

lse123

Member
how setup the font size of text in a
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<Button xmlns:android="http://schemas.android.com/apk/res/android"
   android:id="@+id/newGuessButton" android:layout_weight="1"
   android:layout_width="wrap_content" 
   android:layout_height="wrap_content"></Button>
 
void setTextSize(float size)
Set the default text size to the given value, interpreted as "scaled pixel" units.
void setTextSize(int unit, float size)
Set the default text size to a given unit and value.

yes i saw but DEFAULT is sp units? if set a unit i supposed to use
void setTextSize(COMPLEX_UNIT_PX, 10)
void setTextSize(COMPLEX_UNIT_SP, 10)
 
Back
Top Bottom