![enter image description here][1]i have the HorizontalListView.when I swipe the list items. I need only one list item to be displayed on the screen. And for a one swipe i need one list item to be scrolled.
Could anyone pls help me for this
[1]: http://i.stack.imgur.com/iugTg.pngenter code here
If you use this HorizontalListView implementation (https://github.com/dinocore1/DevsmartLib-Android/blob/master/devsmartlib/src/com/devsmart/android/ui/HorizontalListView.java) then you can use scrollTo method
If I understood your requirements correctly, that is, full-width items and sweep to move to next/previous full-width item, you should use e.g. ViewPager instead of HorizontalListView.
Related
I am a beginner, and i tried to find an answer but everything i found was from 2013 and earlier. I want to create a grid which you can scroll in any direction, (as a zoomed in picture), which contains items of different sizes which are generated randomly, then i want to populate them with a recycler view. I will attach an illustration, maybe you would understand it better.As you can see, the thick outline is the phone screen and whenever you scroll the view, it generates new items which are populated by a recycler view.
I thought of using Google's FlexBox Layout for generating the items but i don't really know how to create that scrollable view. I would literally pay to get this done.
I don't think you can make RecyclerView scroll in Both way. U can Create Nested RecyclerView if that is what you are looking for.
How can I make a working bottom navigation bar with ImageViews in a LinearLayout(Horizontal) With fragments ? instead of menu items.
if already exist then please share the source code. Please help quickly :)
Or the Question could be this :
https://github.com/qhutch/BottomSheetLayout/issues/12#issue-576279364
Oh, I found my solution not exactly but this is what I want...
I add that Bottom Navigation View in a LinearLayout(horizontal) and I delete all default Styles from BottomNavigationView. So now this is not looking like a card view. After this, I add an ImageView in the LinearLayout with a weight of a ratio of 1:3 (for 4 icons ). Now I can use effects and designs on my LinearLayout. And it is looking like how I wish. 😌
[Note: For horizontally rotated screen LinearLayout, ImageView, BottomNavigationView 's width:match-parent]
I'm new to android development
I have a Recyclerview and I want it to always show items with full layout not part of the item when screen size is changed!
say I have a Recyclerview that shows 3 items vertically in XXXhdpi when I changed the device with smaller screen (for example the new device's screen size is XXhdpi) the recyclerview shows 2 items and part of the 3rd Item and you have to scroll to see the whole item...
how to avoid this problem and always show the 3 items or maybe 2 items ! what i care about is to always show the whole item that fits in the screen not part of it.
if the screen can fit 2 items then the 3rd item should not be showed and the 2 items that appear should have bigger width and height to fit in the screen and hide the space of the 3rd item.
Thank you.
Let's say single_row.xml is the layout that is repeated in the recylcerview
You will have to create separate single_row.xml layouts for various screen sizes. And they will be accordingly used during the onCreateViewHolder
I need sync scroll of 2 listViews (vertical and horizontal)
I tried several libraries for the horizontal listview, but no library implements OnScrollListener()
https://github.com/MeetMe/Android-HorizontalListView
https://github.com/sephiroth74/HorizontalVariableListView
https://github.com/dinocore1/DevsmartLib-Android
need this callback to scroll vertical list when scoll the horizontal list...
how can I do this?
Thanks!!
I did a little bit of code for this exact thing a while back. Check it out here https://github.com/slightfoot/android-tandem-scroll
Just duplicate https://github.com/slightfoot/android-tandem-scroll/blob/master/Library/src/com/demondevelopers/tandemscroll/TandemScrollView.java file and make it extend HorizontalScrollView.
I want to swipe an image from left to right and right to left in an ListItem, I searched so many codes in online, none had solution for me, can anyone help me.
If I understand you correctly, you're looking for something like a ListView that swipes horizontally instead of vertically.
You want a ViewPager:
Here's an example:
http://developer.android.com/training/animation/screen-slide.html
On the adapter's instantiateItem() method (which more or less takes the place of the getView() method in the ListView adapters), simply inflate layouts that contain only your images, rather than text like is shown in the example.
http://developer.android.com/reference/android/support/v4/view/ViewPager.html