0

I am absolute beginner.

I have a simple listview which I don't know how its work and the only view code i fount of it is :

  String[] from = new String[]{ TITLE };
    int[] to = new int[]{ R.id.ViewTitleNotes };

thats it, I want to customize this listview a little like change the font or set a background for listview page, but i cant ! if I change the background of page, every single listview item will adopt that image and every single listview item height will fill entire page ! that "R.id.ViewTitleNotes" doesn't have any code like this : "TextView ViewTitleNotes = (textView) findViewById(R.id.ViewTitleNotes);"

I don't Know how its work !

here is a Screenshot of this listview: that small selection is the textview i want to change the font of it

that small selection is the textview i want to change the font of it

Thanks in advance.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141

1 Answers1

0

for change font of textView take a look at : How to change fontFamily of TextView in Android

for setting image in background of listview look at this link: http://www.android-examples.com/set-drawable-image-as-listview-background-in-android/

and link bellow for more complicated listView: http://www.androidhive.info/2014/07/android-custom-listview-with-image-and-text-using-volley/

also it is recommended to use recyclerview instead of listView. for recyclerview , link bellow : https://www.sitepoint.com/mastering-complex-lists-with-the-android-recyclerview/

http://javatechig.com/android/android-recyclerview-example

Community
  • 1
  • 1
pouyan
  • 3,445
  • 4
  • 26
  • 44