Android Tutorial 50 - Beautify your List #2: Get it Working

Veröffentlicht am: 25 März 2014
auf dem Kanal: Code Here Now
1,973
6

This is an excerpt from Learn by Doing - Android for Beginners on Udemy.
https://www.udemy.com/learn-by-doing-...

Learn the quick way to create a Custom Adapter for your ListView.

Things to Remember
------------------------------
1. Create a new layout for your list item.

2. Create a custom adapter class extending the ArrayAdapter.

3. Add an appropriate constructor, ArrayAdapter(Context, int, List) will do most of the time.

4. You'll need an LayoutInflater instance to create view instances from your XML, to do that call the LayoutInflater.from(Context).

5. Override the ArrayAdapter.getView(int, View, ViewGroup) method.

6. Inflate your view using the LayoutInflater, get references to the views you are interested in by calling the View.findViewById(int) method.

7. Get the data item for the list item position by calling the ArrayAdapter.getItem(int) method.

8. Set the appropriate properties and return the view instance.


Auf dieser Seite können Sie das Online-Video Android Tutorial 50 - Beautify your List #2: Get it Working mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Code Here Now 25 März 2014 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,973 Mal angesehen und es wurde von 6 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!