Set the textsize of a listview?

The size of the text within the List View is defined by the ListView's adapter's item resource. If you create a custom view for the list view item and define a TextView, you can change the size of the font within that text view, which will define the size of the text in each item within the List.

Good catch -- I didn't realize the OP was trying to style the List itself and not the list item. – Shawn Lauzon Jul 22 at 17:19.

I would say the best way is to define resource files that you want and then override them in different configurations. For example, create a values/dimen. Xml file and define: 18sp and then create another file values-large/dimen.

Xml which defines 22sp Then you just say in your styles. Xml: @dimen/text_size_medium.

I did try that also but didn't work ...I had the text size defined in my styles. Xml but to no avail. – JayP Jul 21 at 16:25.

I have a custom listview and have defined a style for it. I am not able to change the textsize of the items on listview. I am trying to change it through layout so that it can dynamically change depending on device.

I know that I can use setTextSize in my code for changing the font size . But I want to change it applying styles. Any suggestions on how to go about changing it?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions