I'm developing an app with a list that should show the name, phone and e-mail addresses of users previously registered on a sqlite database. In each row will also have two buttons.
Something like this:
ListFragment:
--------------------
[Name 1]
[Phone 1]
[E-mail 1]
[Button 1][Button 2]
--------------------
[Name 2]
[Phone 2]
[E-mail 2]
[Button 1][Button 2]
--------------------
... (and so on) ...
where the button 1 will make a call and the button 2 will send an email to person. detail, these buttons are clickables ImageView.
I managed to create the XML correctly.
And I know I will need to implement a Custom ArrayAdapter with data from my SQLite database.
I really need to know what is the BEST WAY to implement a Custom ArrayAdapter with data from SQLite ??? I saw so many different ways that I'm totally confused.
please can someone help me with this? if there is a tutorial that explains in detail how to do this, I thank you very much.
It looks like this question has the answers you're looking for. You might also try the links in the accepted answer in this question.
Basically, it looks like what you want to do is:
SimpleCursorAdapter
getView
OnClickListener
s for each button