List view item indicator (>) - android

I have noticied that in some android menues, a list view is shown that lists items with a (>) icon on the right. It is something like the expandable list but the arrow aims right. Is this something built-in, or have I to do it myself?

You have to make your list view row layout like that.
You can set image in Drawable left in your row layout

It is called Group Indicator and it is available by default in ExpandableListView.
if you don't want Group Indicator to be visible, then you have to use setGroupIndicator(null). But by default it will be visible for any Expandable ListView you create.
And when it shows an arrow towards left it means the group is in collapsed state and when it points bottom it means the group is in expanded state.

In ListView
** > Right Arrow on right side of the row,**
is putted to navigate to another Activity.
That arrow is some-time ImageButton, by clicking on it;
uoy can go to other activity.

Related

Android checkable menu item. Choosing the position of the CheckBox

I have a menu with checkable items. I want to put the CheckBox first and the Text to the right of the CheckBox. Any idea how to do this?
It's not possible to do this using menu items. What you can do, is use a custom Toolbar with a custom ImageView(aligned right) with the image src as the overflow icon (the one with 3 vertical dots). Also create a custom view(let's say checkBoxList) in your layout, which contains the text to the right of checkbox, the way you want it. Keep this checkBoxList aligned to the top right of your parent layout (super easy if you are using ConstraintLayout). Also, keep the visibility of this List to invisible. When overflow icon get's clicked, set the visibility of checkBoxList to visible. Also, have an onClickListener on the parent Layout, where you set the visibility of checkBoxList back to invisible( So that when the user clicks on anywhere outside checkBoxList, it closes).

Swipe and tap to enlarge recycler view

I have a recycler view which has its items in a card view. The recycler view gets its data from a sql database within the app . Now I want to implement two features to this recycler view items. First , whenever the individual cards are tapped , I want them to enlarge and display more data and should shrink back when tapped again. It is not like the case of expandable list view where it expands into a child list view. I want the height of the card to increase and just show some more information and buttons. Second I want the items to swipe left . I know there is a feature for that in recycler view , but I want to customise the swipe feature. Swipe from right should be locked , and when swiped from left , It should not go off list completely. It should show two buttons and should go off list only when one of the buttons is clicked. I have been looking , but there is no proper explaination anywhere. Please guide me through this process.
For your first question, set the adapter layout_height to wrap_content and set the buttons visibility to GONE. Implement the OnClick listener in the RecyclerView adapter and set the visibility of the buttons to VISIBLE if GONE and GONE if VISIBLE or use a boolean to alternate the visibility.
For your second question, this might help:
https://www.learn2crack.com/2016/02/custom-swipe-recyclerview.html
How can I make my Android SwipeableCardViews more like the IOS 7 mail app (swipe to show buttons)
https://github.com/daimajia/AndroidSwipeLayout

Android listview with custom layout header and footer

Sory I can't describe a right title for my question,
I want to create listview something like this
In top of list view on screen look like
and when user scroll the list in screen will be like this
and in end of list is
I have 3 picture for top list, middle and bottom list.
I already try to add header and footer for top image and bottom image but looks like the picture is inside the list view
I try to create vertical linear layout and put picture top,middle and bottom in sequence but still not get result that i expected
Do anyone have a suggestion for listview like this
Don't set your frame background for entire listview or its parent. Instead first slice your frame background into three parts, (i) topframe (ii) middleframe (iii) bottomframe. Now create a custom listview and set background for each and every list rows.
In order to achieve your design, you need to find the first and last item of list and set topframe for first row and bottomframe for last row , all the other rows background should be middleframe.

How to achive ListView with Search functionality and Search box should also scrollable?

As Shown in image 1: I have listview with 2 items(half empty),and at the top i have one serch box I complete search functionality with custom adapter and Filterable but i want some other thing with this .they are
want to scroll listview with half empty(By Default it scrollable when Items more than area)
Search box should also scroll with listview.(As shown in 2 picture.)
listview should be scroll up to last item (Here last item is Item2 should always shown )and item at top should highlighted with different color.
Scrollview can have only one direct child. So if you want to put more than one view in a single scrollview, you should put all the views you need to scroll, inside single container view eg:-linear layout and put those views in that.

how to scroll up when choose some item at item list in android?

I jave a list of item (linearlayout inside a scrollview where i add buttons vertically to linearlayout dynamically from the java code ) ? i need when i click on one button the item moves up (scroll up) , to make the item at the first of the screen ??!
Well I never did that, but from the ListView reference it seems pretty clear that set setSelectionFromTop is what you are searching for.
See also how-to-autoscroll-a-list-view-in-android

Categories

Resources