Skip to content Skip to sidebar Skip to footer

Android: Scroll View With Titles And Text Bodies

I'm trying to create a simple help screen that looks like the the one shown below. I need to have 8 different titles with smaller sized text bodies below them. I have implemented a

Solution 1:

You can get a similar result in a single TextView by taking advantage of the fact that the TextView has the ability to present a limited set of HTML markup. For example

TextView t = (TextView)findViewById(R.id.text1);

t.setText(Html.fromHtml("<H1><u><em>Title1</em></u></H1>Details for section 1<H1><u><em>Title2</em></u></H1>Detail for Section 2"));

Will render into the TextView with Title1 as a larger font section header, bold and underlined.

This may be satisfactory for your application.

Solution 2:

You can try to create different TextViews with different font sizes and styles within a ListView, LinearLayout or TableLayout? Textviews can also support different stylings like HTML.

Post a Comment for "Android: Scroll View With Titles And Text Bodies"