Android Beginner Tutorial #8 – Custom ListView Adapter For Displaying Multiple Columns By the end of this video you will know how to: 1) Display multiple …

Nguồn:https://u-os.org/

Xem Thêm Bài Viết Khác:https://u-os.org/cong-nghe

Author

24 Comments

  1. Hello I am getting an java null pointer exception and logcat says its from layoutinflater line of code i followed everything in the video and the only problem is the layoutinflater returning a null value please help, ill just use the built in lists for now ty

  2. Pratik Altekar Reply

    Try to explain things while u use them. Nt like " ok we'll use this 1".

  3. Hoping there is anyone still active here: Does anyone know, whether it's possible to apply an onclicklistener to the created textviews in the listview?

  4. miguel munoz Reply

    HOW WOULD YOU SET A CONTEXT MENU FOR EACH ITEM OF THE LISTVIEW? I cant make that work

  5. Lyusien Tsvetkov Reply

    I'm wondering how can I set OnItemClickListener to get the name of my item using the it position and setting a text unto a textview. Could you help me on that?

    my_listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {

    @Override

    public void onItemClick(AdapterView<?> View view, int position, long l) {

    // The problems is here I stuck at getting just the name but not the entire row.
    if (position==0) {
    my_textview.setText(THE CLICKED ITEM NAME);

    }

    });

  6. Are there special reason you used layout_width="match_parent" and weight, instead of using layout_width="0dp" and proper weight(ex 1:2 )to TextView and LinearLayout ?

  7. Talib Daryabi Reply

    why u created the person object inside the getView() method? what's the use of it? BTW ur tutorial helps us a lot we appreciate your efforts.!

  8. سديم المعرفة Reply

    hello
    How can I create 2 listview in app , when i click on item in first listview open to me a second listview ?
    Please reply to me because I stopped because of this problem .

  9. Safvan Bardolia Reply

    I got some error for getBirthday() and getSex() tham cannot find this symbol.

  10. Hi how come this doesnt work with the search filter that you have in your previous video??

  11. Øyvind Lyse Reply

    The tutorial was made with Android Studio 2.2.3, while I tried using version 3.3.2 and got some errors: The getName(), getBirthday() and getSex() methods won't resolve.

    Should this code even work in the newer AS versions?

  12. Jesus Christ Is Lord Reply

    Thank you so much for your help!!

    Just want to add this… in the getView() method, you could have used:
    Person person = getItem();

    and then do:

    tvName.setText(person.getName());

    etc.

  13. Where is the person object in the getview method being used? My code says the variable is never used.

  14. Oomptz Fantasy & Ambient Theme Music Reply

    This is the tutorial I have been looking for!! Thank you!

  15. Roel Visser Reply

    got stuck badly on this lesson and need it for the next ones to complete, this error code is driving me nuts! error: no suitable method found for getItem(no arguments)
    method Adapter.getItem(int) is not applicable

    (actual and formal argument lists differ in length)

    method ArrayAdapter.getItem(int) is not applicable

    (actual and formal argument lists differ in length)
    cant find a solution anyware.. somebody has a suggestion ? thx

Write A Comment