Posts

Showing posts with the label listview

why spinner changing & Reset value on scrolling listview

Image
Clash Royale CLAN TAG #URR8PPP why spinner changing & Reset value on scrolling listview Task: I have an activity which has a list view there is some info of student and a status which is spinner in the list view. Problem: When i scroll list view the spinner value auto change the spinner did not hold the selected value its reset by scrolling list view. If anyone know please suggest me solution or links which is useful. I shall be very thankful to him. I tried many solution but did not get out from this problem. In the first image spinner value is present but when i scroll and come back to this again it auto change as you can see it is Absent now. custom adopter: public class PersonalListAdapter extends ArrayAdapter<student> { Context mCtx; int mResource; static class ViewHolder { TextView id; TextView name; TextView f_name,rollno; Spinner status; } public PersonalListAdapter(@NonNull Context mCtx, int resource, @NonNull Array...

How to use few drawable images in unlimited length of listview?

Image
Clash Royale CLAN TAG #URR8PPP How to use few drawable images in unlimited length of listview? I have 3 images in drawable and as it is difficult to store huge image files in drawable for limitless length of listview, I want to use these three images for the entire listview repeatedly or randomly. For more to be clear.. 1st image for ----------> 1st data 2nd image for ----------> 2nd data 3rd image for ----------> 3rd data 1st image for ----------> 4th data 2nd image for ----------> 5th data 3rd image for ----------> 6th data ................................................... ................................................... 1st image for ----------> 100th data ................................................... ................................................... and so on or randomly if possible. I think I have to use loop and necessary condition to solve this problem. But do not know how to go through. Can anyone help me to solve this with necessary code imple...

Dynamic listview to get data from user

Image
Clash Royale CLAN TAG #URR8PPP Dynamic listview to get data from user I need to make something like this The layout start with only one empty row, then the user can add new empty row by clicking the + button then fill the editTexts with data or can delete that row by clicking the trash button. Then i need to get all the data the user inserted into an arrayList to insert it in my database. How can i do that? What have you done so far? – mTak 36 mins ago @mTak I made the item_view.xml and an adapter but remembered that i will have to give it an arrayList to work, and i won't be able to extract the data that the user entered. so basically i done nothing that works – Toka Ali Amien 33 mins ago ...

I was using Array Adapter with listview and and my app crashed on running…?

Image
Clash Royale CLAN TAG #URR8PPP I was using Array Adapter with listview and and my app crashed on running…? enter image description here MY app crashing on creating array adapter as the arraylist is showing data in logcat..... You should post your stack trace with logcat to show what the crash is. – Advice-Dog 28 secs ago By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.