How to store user-selected font?

U

unba1300

Guest
Could someone please tell me how to save a typeface setting in a map file?

I keep getting something like this while compiling...
B4X:
main.java:474: inconvertible types
found   : java.lang.String
required: android.graphics.Typeface

I've tried dimming the font as a typeface, as a string (because of the map file), storing the value with and without quotes in the map file, etc. I just want the user to be able to select from a few fonts in a dialog and then store that value and use it later when starting the app again. Thanks.
 

JonPM

Well-Known Member
Licensed User
Longtime User
You can create variables for each font type (i. e. Times = 1, sans = 2, etc), and save the integer to map, then read it back in on startup up.

Sent from my DROIDX using Tapatalk 2
 
Upvote 0
Top