Android Question How to create an _ItemClick in a custome listview to click an Item

AndyChang

Member
Licensed User
Dear Sir
I use Panel to build a listview which has string and bitmap shown together as my attached png.
The way of coding to build the listview is just like my second png.
Could anyone can give me a simple sample and show me how to create the _ItemClick
Thanks a lot for your response.
Andy
 

Attachments

  • Screenshot.jpg
    Screenshot.jpg
    248.2 KB · Views: 290
  • WayOfCoding.png
    WayOfCoding.png
    53.2 KB · Views: 297

Erel

B4X founder
Staff member
Licensed User
Longtime User
But when I search the Key word [CustomListView] I find yourpost in 2012 7/15 (as below)
The post was created in 2012 however it was edited many times and the latest version of CustomListView was released a few months ago.
I assure you that using CustomListView is simpler than reimplementing it yourself.
 
Upvote 0

AndyChang

Member
Licensed User
Thank you Erel,
I fully agree your point. I am now trying to learn CustomListView from a very basic level.
If no B4A, I cannot even create a very simple application. But now, I have almost finish a wonderful project by myself, except the last function which need to use CustomListView to allow user to scroll the list and click the list.
Is there any simple example about combine image and text data in one line as the basic element of a CustomListView and can get the position(index) from the _Click Function when scroll the listview.
Please help me
Andy
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
I haven't used CustomListView for a while, so I would need to do the same as what you can do, look at recent examples to learn how to use it.
Attached a small test project based on a ScrollView, not a CustomListView.
 

Attachments

  • CustomScrollView1.zip
    10.2 KB · Views: 196
Last edited:
Upvote 0

Ricky D

Well-Known Member
Licensed User
Longtime User
Dear Klaus
I found a post which you gave an example about how to add image to CustomListView. The Url is as below
https://www.b4x.com/android/forum/t...lexible-list-based-on-scrollview.19567/page-6
I learn from your example about CustomListView. My application needs to combine image and text data in the same line.
How can I achieve the task. Can you give me an example like you post in 2013
Thank you so much.
Andy
Ok. I use Customlistview in my app I can show working code of mine. I'm only using the textfield part of adding items
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Is there any simple example about combine image and text data in one line as the basic element of a CustomListView and can get the position(index) from the _Click Function when scroll the listview.
It is very simple. You can implement the cell layout with the designer. See the example project.
 
Upvote 0

AndyChang

Member
Licensed User
Dear Klaus,
Thank you so much about your example to me. It is just what I need.
After I finish my project in hand, I will learn hard about CustomListView.
Thank you Klaus.
Andy
 
Upvote 0

AndyChang

Member
Licensed User
Dear Ricky
Thanks a lot for your kindness to help me.
I just receive an example from Klaus. It can solve my problem.
So, I decide to use this example to go on coding.
I will study hard about CustomListView after I finish my project in hand.
At that time if I still fail to learn CustomListView, I will come back to ask you for help.
Thanks again.
Andy
 
Upvote 0

AndyChang

Member
Licensed User
Dear Erel
I am happy to get the example from Klaus.
You are all very kind and very helpful to the new users like me.
I am very appreciated your team and all the members that willing to provide theire precious time to whom that need help.
B4A is a very important developing tool for those who have very good idea but not so good for the low level language scientists and engineers.
Thank yo Erel
Andy
 
Upvote 0
Top