Multi column listview layout - android

How to do a layout like this? I currently use a listActivity and I need the same experience with this kind of layout.

You can use Staggered Grid View library. Also check and Quilt View. This is what you need.

To get this effect, you should create two list views and link the scrolls of both lists.
Define a OnScrollListener on both listviews and when "onScroll()", move programatically the other list. I think if all images are cached you shouldn't have delays.

You can use Staggered Grid View library. But there you need to mention height of each image pragmatically to set height of list view. Else when you scroll to end and come back to top, the alignment of images on top will get disturbed

You have to use GridView
You can refer this or this.

Related

How to implement Horizontal Scroll View inside a simple ListView?

I am trying to implement Horizontal Scroll View inside a simple List View. The elements inside the horizontal scroll view are texts over images.
I know I need to create the adapter and the getter & setter class as well for horizontal Scrolling elements.
Also, the URLs of the images are stored in a string array. But I am not sure how to implement that.
Can any one suggest a good example for this?
Thanks in advance.
Before requesting for answer make sure you try to implement/google it.
I would suggest you to use RecyclerView instead of ListView.
For your requirement you will need two Adapters one for your parent RecyclerView and another for your item if RecyclerView.
Refer the link. It'll help you to achieve what you want
Use RecyclerView with LinearLayoutManager and orientation to HORIZONTAL

Trying to load two vertically image in a Screen

Need some help!!..
I'm try to implement a list view with two images in the initial screen, after scrolling other images can be seen.
Can you suggest anyway to implement it!
Use can achieve it by creating custom adapter for list view. Have a look :-
http://www.learn2crack.com/2013/10/android-custom-listview-images-text-example.html
You need to do some updation like removing text view from custom list layout.

Add GridView in listView in android like Dropbox View

How can I add Grid View to the ListView.I could able to Implement but the problem is Grid View is not Visible its full height. I want to implement just like the Dropbox Photo CustomView which I have attached below. Please guide me in correct Path.
Thanks,
Chaitanya
Using github.com/TonicArtos/StickyGridHeaders library for placing headers in gridview and refer this article http://www.programering.com/a/MjN0ITMwATU.html where is the demo as what are u expecting.
The thing is that you are not supposed to add a scrollable view into another scrollable view. Both ListView and GridView are scrollable, so that just leads to trouble. I suspect that the Dropbox app does not use a GridView, but multiple LinearLayouts, that's at least what I would do. You just can not use an adapter in that case, but need to add the layouts and elements programmatically.

Is there a horizontal scroll widget inside listview

I need to make a scrollable row in ListView's item. The row should behave similar to Gallery or ViewPager. It was designed to behave similarly to Facebook gallery.
I was planning to use Gallery but since it has been deprecated I'm not sure if it's a good choice. Although Fragment is recommend to be used to replace Gallery, it's not expected to be put inside a ListView.
Is there other options for available? Or should I implement my own custom view to calculate and handle the view transition? Has anyone try something similar?
Make the row item a HorizontalScrollView with a LinearLayout inside.
Make the LinearLayout's oriantation horizontal and add the things you need inside.

Both way scrollable gridview in android

Is it possible to allow a griview to scroll both vertically and horizontally simultaneously in android? Please advise.
It doubt that would be possible. A GridView is based on an ArrayAdapter, having only 1 dimension for the items. How would you arrange them in a view that can be extended both vertically and horizontally?
Of course, if you just want to make it larger than the screen and use hard-coded number of rows/columns, you can put it in another scrollable view.
There are following two solutions and you can use one which fits your requirement.
You can use RecyclerView instead of GridView with a custom layout manager. You can read this code for help. Also, you can read this article on how to create custom layout manager. This article gives an example of how to create two-way scrolling grid layout.
The other solution is to use RecyclerView with horizontal scrolling Grid Layout wrapped inside a scroll view.
<ScrollView>
<RecyclerView />
</ScrollView>
use GridLayoutManager with horizontal scroll for recycler view.
The first solution is efficient in a way that it handles view recycling properly.
Hope this will help.

Categories

Resources