How to draw brick patterned view in android - android

I am working with a gridview and I want to style it according to the following pattern in the image.The gridview must be populated dynamically. Is there a way to achieve this in android?

You can use Recycler View for this. Please refer https://developer.android.com/reference/android/support/v7/widget/RecyclerView.LayoutManager.html
and StaggeredGridLayoutManager
https://developer.android.com/reference/android/support/v7/widget/StaggeredGridLayoutManager.html

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

How to design this in android?

I have a problem with the design of the picture. I have tried many ways to do this. I used GridView to make a similar thing. But in GridView rows columns are equal. Please help me to do this. Suggest me some XML to design a layout like this image.
You can use staggered grid. Use RecyclerView with StaggeredGridLayoutManager.
Check this example:
https://inducesmile.com/android/android-staggeredgridlayoutmanager-example-tutorial/
You can Use RecyclerView to make this kind of layout.
https://developer.android.com/training/material/lists-cards.html
By using staggeredgridview You can acheive this layout

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.

Multi column listview layout

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.

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.

Categories

Resources