Adding a layout in a listitem - android

i Have custom listview like this
I have to add an another list view below Account-1 which shows rest of the accounts as shown
How can i put another Listview inside a listview only for the first item of the outer list.
Please help.

Related

Android Custom Spinner elements with sub child

I am looking for custom Spinner with expandable child elements. Like I want to click on the spinner view , it shows the ExpandablelistView main categories inside it, then by clicking any of the main category, the sub categories will be shown. Like reference image.
Any help would be appreciated. Thanks
Spinner and ExpandableListview are two independent views so you can not embedded one into the other. But I have some solution for you here:
1.)Add a spinner to main layout
2.)Add a ExpandableListView to main layout
3.)Then On Click/Touch event of spinner you have to show the listview on spinner's bottom.
Note: Data which you want to show in spinner then you have to show it in listview
It is just for your suggestion..

Alternate for a listview with single row

I have a ImageView with a TextView and Button. I have it currently in a custom list view, but I noticed now that I don't need to show more as one element (object). So I actually don't need a Listview to show the row (list entry). How can I show the list entry without a Listview?
You can put the elements of your custom listview item into a Layout, e.g. LinearLayout and simply add it to your activity's layout where you needed it.
You can set an OnClickListener for that layout, so user can click the whole thing.
I think you should use ListActivity. Then you can set up empty view for list. Here some tutorial: ListActivity and ListView Tips.
Also you can implement that logic with Recycler view by yourself or use library.
Here is solution from stackoverflow

How to put ExpandableListView inside spinner in android

I am looking for Spinner having ExpandablelistView inside it. I want to click on the spinner view , it shows the ExpandablelistView main categories inside it, then by clicking any of the main category, the sub categories will be shown.
i found this example
spinner within expandable list view? in the child menu
i want the same ExpandablelistView but inside spinner view. i am new to android and are in the stage of learning. Any help will be heartly appreciated. Thanks
Spinner and ExpandableListview are two independent views so you can not embedded one into the other. But I have some solution for you here:
Add a spinner to main layout
Add a ExpandableListView to main layout
Then On Click/Touch event of spinner you have to show the listview on spinner's bottom.
Note: Data which you want to show in spinner then you have to show it in listview.

android layout slider in custom listview

I have this row item in my custom list view, and in my array-adapter which I'm using to populate data in this list contains another list in each item. Which I want to show inside the layout out with arrows (shown in image above).
Any tutorial would be helpful
It sounds like you want a create your own View for each item in your listview.
This view would probably be a LinearLayout that you could programatically add new views to. Simply loop through your list within each item, generate the textview / image / whatever that you need, and add it to the linearlayout.
Note: your inner list can't be scrollable independently of the main listview.

Dynamically add a row in list view and row contains the progress bar and button in android

i am developing an app in which there is a layout which contains 4 rows in a list view and each row contains a progress bar and a button. Below the list view there is a button when i click on this button, a new row should be add in the list view and when i will add multiple rows then there should be no problem in scrolling up and down. I don't know how to add dynamically rows in list view and how to handle scrolling problem. please help me.
Thanks in advance.
List view can contain any number of row it depends upon the array of valuew that you provide in its adapter. if you want to add one more value to list add it to its array which you are supplying to its adapter and just call this methods
adapter.notifyDataSetChanged();
You can see one more row is added to your list view

Categories

Resources