5/11/2023 0 Comments Android studio listview font xmlMake a new java class in your app package with name “Main. In your Android application, make a new layout file with name “ home.xml” and edit it as following : This AXML file contains the text and image controls with custom font and color settings. Requires an AXML layout file to render each row. Here we will see complete working example of the above code implementation. This AXML contains a ListView control declaration. Now set your Font or typeface: tTypeface(typeface) Initialize your Android Button or TextView or anyother layout element of which you wish to change Font or Typeface TextView txtInfo = (TextView) findViewById(R.id.txtInfo) īutton btnFonts = (Button) findViewById(R.id.btnFonts) Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/montserrat.otf")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |