File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Changing the font size of text displayed Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Android
Reply Bookmark "Changing the font size of text displayed" Watch "Changing the font size of text displayed" New topic
Author

Changing the font size of text displayed

Brian Wong
Greenhorn

Joined: May 14, 2011
Posts: 7
Hi, I am obviously very new to Android. Can anyone help me as to how to change the size of text displayed?

Thanks!

P.S. I'd also like to know if the screen size will affect the number of characters displayed in a basic text displaying function.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32768
The specifics would obviously depend on what kind of UI component you're using to display the text; assuming it's a TextView (or one of its subclasses), then something like this would work:


Not sure I understand the second question: obviously a larger display can display more characters in a row. But screen density also plays a role - two screens of the same physical size don't necessarily support the same amount of pixels.


Android appsImageJ pluginsJava web charts
 
 
subject: Changing the font size of text displayed
 
Threads others viewed
Date Difference
retrieve size of an image
how to detect change of Text Size
Code Formatting
Problem chaning text on JCheckbox
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture