The attached UI is the calllog. What i am interested is that how the horizontal menu is implemented. When click on one list item, it appeared in one line under the list item.
In the earlier android, one click on list item, we can use Context menu popup menu to show the available action to do.
I am curious that it is using expandable list view concept?
I want to design like that when click on list item to show like this, but my layout would not be the same as this one. I want to put custom layout depending on the list item type. It may include button, textview, other widgets and the layout height will not be the list item height.
Can someone give some suggestion? Thanks a lot.
Related
I need to create recyclerView with collapsing items. For example, I have a list of 10 items. By default, I only need to flip the first 2 elements. But by clicking on the "See all" button, I need to display all the items in the list. And vice versa, by clicking on the "Hide" button, you need to leave only the first two items in the list. Here is an example:
I suppose to implement it like this: create a flag that determines whether the full list is displayed or not, and by clicking on the button, depending on the flag, send the full list to the adapter or cut it to two elements and call notifyDataSetChanged().
But this solution seemed to me not very good, perhaps there is a more elegant solution.
Note: I don't need nested collapsing elements. I just need to display two items from a list or all items.
Please help me.
Hi I want to make a menu like
in first it shows a list like in drawer layout.
when i click on any item the list should populate in right side. in this case both parent and right side list visible.
if i click on any item of right side list then it should again populate in right side.
In this way i want to populate menu upto three level.
i want to show like when we open menu inside window 7 or like in window xp.
if anyone have any clue then please help. i can not post the image because my reputation is below 10.
Thanks in advance.
I have resolved my problem myself.
Now i use three fragment inside a linear layout. on click on first list item i load the second list fragment and on click on second list item i load a third listfragment.
I have a ListView and each item have a TextView.
I would like add a small icon when user click in that item. (when user click other, icon hide and show in the other)
any ideas, examples or tutorials?
thanks
You are going to need a custom ListViewAdapter. This website has a good tutorial:
http://www.ezzylearning.com/tutorial.aspx?tid=1763429
You could put an OnClickListener on each list item that associates the icon with that item and programmatically add the icon to its layout, while removing it from the previous' layout. So you'll want to have a variable that holds the current layout that is associated with the icon, and when a new item is clicked you remove the icon from that layout, then set the variable to this new item's layout.
In my android application I have a list view and some other buttons above the listview. I need to implement the functionality to add the selected item of the listview to my favourites list by creating a menu item.
I can create a menu item to click and add the functionality.
But it should only show the menu item if the focus is on any listview item and not when the focus is on any other button or anyItem. the menu item should only display when the focus is on any listview item and press the menu button.
Can Someone help me please.
Have you considered using a context menu instead of trying to modify the main menu? It seems like behavior might be more in line with the UI guidelines.
I want to display a list item that says "More" at the end of my ListView. Clicking on this list-item will perform some action. How can I create this "more" list item?
I don't know about the "Clicking on this list-item will perform some action" part. The typical pattern is that once the user scrolls to the bottom, new material is loaded automatically. Some people do that by detecting the scroll. I do it by putting in a "More" placeholder and detecting when that is used. Here is a component that implements this pattern.
Just add another value to your arrayadapter (or any other adapter), you might be using.set the text to 'more' .
Suppose you have n items in the list then handle the (n+1)th postion click and do your stuff.
You can add a footer to your listview...
Did you check this post out?
Android ListView Footer View not being placed on the bottom of the screen