Implementing a list that is both vertically & horizontally scrollable - java

I have a question related to Android app UI implementation. The UI I want to implement is very similar to the Slideshare app UI, which I've attached below:
Apologies for the size of the image. But basically I want to implement a vertical list, and each item within the list is another horizontal list of sub-items.
My current plan of approach is implementing a vertical RecyclerView, and then implementing each item of the list as a horizontal RecyclerView (basically a 2-Dimensional RecyclerView).
Am I on the right track here? I apologise I cannot provide any code because I am still in the design phase. I do not want any code solutions but rather a guide or small tips as to how to approach implementing such UI.
Thank you for your time reading this question. Any tips would be highly appreciated!

You can use TwoWayView library to implement this scenario for bot horizontal and vertical listviews or you can use RecyclerView.
TwoWayView Library: https://github.com/lucasr/twoway-view/
TwoWayView Samples: https://github.com/lucasr/twoway-view/tree/master/sample
You can read a great tutorial about how to implement this on on this Github page.

You can take a look at VerticalHorizontalListView and twoway-view
and of course this link might be a help, which explains how to implement Dynamic Shelfview in Android.
I found this answer on SO :
Horizontal ScrollView in List View Item Android which explains the issue prefectly, you can take a look at that too. I hope this links help you ;)

Related

How to construct the RecyclerView for the following UI vertically?

The expected UI for my application should look like this:
I have thought about using a view pager but I cannot figure out how to change opacity of the next items or make the item in view to be centered and be elastic.
I have researched multiple open source GitHub repos and found two which seems similar to what I have approaching to do.
https://github.com/bloderxd/deck
https://github.com/Ramotion/garland-view-android
I do not know how to solve the problem of opacity or going to the next item using the next button in the UI (which was designed by me for a project).
So far, I could only create a simple XML representation of the UI without the view pager but I do not know what other libraries and views I need to implement to make it interactive and elastic like in the UI.
My request is how I could build the application level code for this UI. If there is any other obscurities in my questioning, feel free to comment and reach out because I am relatively new to this kind of development. Thank you.

Creating layouts with scroll down

Im kind of new to android programming with java, and theres a small thing which i want to clarify, i have no idea what this is called either and the Question topic name might not match to what im asking here so sorry about that :P
I want to dynamically create panels which will get filled with a text, and a button when the user clicks the small plus sign (ref image)
Can anyone point me to a tutorial becouse i dont know what this is called, and any small examples would help as well
]1
For something really simple based off your design, I might recommend using a ListView as the learning curve is easier. However, the RecyclerView is optimized for performance and can be easier to build a lot more crazy scrollable layouts such as Instagram.
Recyclerview Tutorial in Kotlin by Ray Wanderlich -
https://www.raywenderlich.com/170075/android-recyclerview-tutorial-kotlin
Android Documentation - Recyclerview -
https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html
https://developer.android.com/guide/topics/ui/layout/recyclerview.html
Android Documentation - Listview -
https://developer.android.com/reference/android/widget/ListView.html
https://developer.android.com/guide/topics/ui/layout/listview.html
Vogell ListView Tutorial -
http://www.vogella.com/tutorials/AndroidListView/article.html

Bundling in Recyclerview- Android

I want to create a simple view like this. (red circle)
I searched on internet for Bundling in Recyclerview but I could not find any resources.
Can anyone tell me the name of this view or share any tutorial resources.
Can someone share an example of how to do it. Or any Tutorials on how to get this view . - Bounty question
In recyclerview you can do this with item decoration.
An ItemDecoration allows the application to add a special drawing and
layout offset to specific item views from the adapter's data set. This
can be useful for drawing dividers between items, highlights, visual
grouping boundaries and more.
All ItemDecorations are drawn in the order they were added, before the
item views (in onDraw()) and after the items (in onDrawOver(Canvas,
RecyclerView, RecyclerView.State).
refer here
or
you can design a custom layout and inflate it using getViewByType in
viewholder
I think you better to follow this videos, i am sure my side this videos gives you a perfect idea on Android Recyclerview and also provide a solution for problem.
Please follow this youtube link: https://www.youtube.com/watch?v=XhbsNO2_oDI
ItemDecorator from example below doesn't suite you. Try to use Expandable Listview, which helps you to adjust list, when user tap on image below list item, and expand size for another item, for example, chat messages in your image.
Use This Example!

Android: Yahoo Weather App Horizontal Scroll-view Effect?

I would like to know what the Android implementation is of this type of scrolling that you see in the Yahoo Weather App. Here is a video example:
http://www.youtube.com/watch?v=a-q_yetkpik
Any examples or ideas on how to implement this would sincerely help this poor lost soul!
Thank you
use that library https://github.com/xgc1986/ParallaxPagerLibrary, it's very easy to use, and it worked for me
demo
You should separate two different things here:
The horizontal scrolling
As you swipe your way through the viewpager, the background moves slower than the content does.
This effect can be achieved with the ParallaxPagerLibrary
The vertical scrolling
As you swipe up, the background image blurs away, making the "swiped up" content more visible to the user. This post explains it all and also provides a library.
But if you want it even better, someone wrote a simple "clone" of this weather app https://github.com/MoshDev/LikeYahooWeather
They customized ViewPager, the widget is called WeatherViewPager that it's unfortunately unavailable, looks like a ViewPager with a sort of parallax
You may take a look at https://play.google.com/store/apps/details?id=com.desarrollodroide.repos
it's a collection of usable opensource libraries
e.g. Utils->Paralloid or Utils->ParallaxScroll

Vertical Drawer on Android

It's there a way to make a vertical slider on Android?, for example, I want the action bar to be dragged all the way from top to bottom, to show a fragment, pretty much like the notification bar on Android.
Thank you very much
There is always a way ;), but it would take some custom code to do it. I don't really have to much time to write something out for you, but I did find something that may be useful to you. These guys open sourced a slide from bottom to top view like is used in Google Play Music. You can take a look and maybe modify it to slide from top to bottom.
https://github.com/umano/AndroidSlidingUpPanel
Good Luck
There used to be a slidingdrawer view as part of the framework but it's now deprecated. There is however a nice implementation of something similar on github that you can take a look at here:
https://github.com/umano/AndroidSlidingUpPanel
Umano's Drawer is dated and limited. You should use a more up-to-date library like https://github.com/drxeno02/androidprojects-book2-slidingdrawer.
This library has no limitations such as only having two children. You can have as many children as you want, and you can set offsets and design your drawer to look anyway you want.

Categories