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.
Related
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]
So I have a Scroll View which contains a relative layout. I want that relative layout to have 3 or more layouts that can be scrolled. I know how to implement that with HorizontalScrollView, but before execution, I have no idea how many elements the HorizontalScrollView is going to have. Should I use ViewPager for this? What I would like the most is a HorizontalListView.
Would you recommend something like this:
https://github.com/sephiroth74/HorizontalVariableListView
Or should I add views programmatically in a HorizontalScrollView?
ScrollView is widget that should be used to keep static layouts inside. In general - ones that just are ~slightly bigger that the screen.
If you need something really dynamic you should use elements based on adapters like ListView, or ViewPager.
I have a custom ListView which checks for a value in its adapter, and if its false it should disable scrolling. The reason I need to do this is because inside the listview are rows of horizontal listviews (using this implementation: https://github.com/dinocore1/DevsmartLib-Android) and if you scroll slightly up or down whilst scrolling on of these horizontal views, they stop scrolling and the listview instead scrolls.
The issue with this code is that it doesn't always seem to prevent the listview from scrolling, and it also doesn't pass the action through to the child (horizontal listview) like I believe it should (passing false).
Does anyone have any idea how I can get it to stop scrolling and still pass the movement action through to the child? Any help would be appreciated.
Thanks.
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
I have the following question: I have a difficult layout that contain ListView. I need disable scrolling ability for ListView, because it's container (root Layout) have had ScrollView already, and I don't need a scrolls for ListView. I disable scrolls by android:scrollbars="none", but abilitity for scrolling would stay. I need that if ListView has 10 items that all items will be shown. How can I do it?
Can't you just use a LinearLayout with 10 elements instead of the ListView? It is not a good idea to have a ScrollView in another ScrollView.
Why do you still use the ListView? Create your own Layout for an item and load it several times (LayoutInflater, .addView(listItem)).