can anyone help me by telling me how can I create a layout like this one:
It looks like a grid view, but not all items have the same width, and height.
This is a modified version of Android's experimental StaggeredGridView. The StaggeredGridView allows the user to create a GridView with uneven rows similar to how Pinterest looks. Includes own OnItemClickListener and OnItemLongClickListener, selector, and fixed position restore.
Refer this,It may help to solve your problem.
Here is a well supported library https://github.com/etsy/AndroidStaggeredGrid
Another view that I found now, thanks to #AndroidLearner is PinterestLikeAdapterView you can check it here. If anyone also has the problem like me - you can refer to this one also.
This is definitely what are you looking for. The other example given in the answers does not allow you to manipulate with the width of the items, with this one you are able to do anything.
Related
I would like to make a tag view like the one below which allows the display of tags with multi-columns (1,2,3 columns depending on the width) and the tag should be clickable for further actions.
I think the traditional gridview is not suitable but i don't know how to do it.
This repo may will help you. Your ss match with this repo's gif.
https://github.com/Cutta/TagView
You need to use Fancy buttons.
Please have a look of this demo.
https://github.com/medyo/fancybuttons
Really helpful.
Thanks.
Hi everyone. I want to make a view like above. On the same screen , I have got two different layout (or it can be fragments, doesn't matter for now.). User can swipe both layout on long touch and drag/drop like above. Do you know how can we do it or is there any library for this?
Thanks
Please check DragLinearLayout libray.
Hope for help. :)
You can use Drag sort library
but i think this assumes that you use a listview.
Anyone know how can i achieve a list like this in the picture? I want to add the images in the project, and create a layout that will pick them up and put them automatically in the layout. Not manually to import all images in the layout.
So like this if i add a new image in the app then it will be picked automatically.
I didnt try anything yet as am not sure how to do it.
All i found in the web is layouts with each row having 1 icon, but thats not what i want.
Any info or a link i can use anyone?
You just can't do that with a Spinner.
You need to use a GridView.
Normally we won't use TableLayout if there are so many images, which will cause Out of Memory Error if too many images loaded. Use GridView instead, very easy and meet your requirements. Look into ApiDemos for some sample codes.
I managed to solve this. Here is the link that helped me out: http://iserveandroid.blogspot.com/2010/12/custom-gridview-in-dialog.html
I want to create a GridView like this one:
But, I don't know how! I know how work with Android GridView, but not like this one.
Suggestions of library or any tip will be welcome.
Thanks.
I want to create a GridView like this one
The View you are referring to can quite easily be created without using a GridView. If your components (clothing, bags, shoes etc.) are static, you can use nested LinearLayouts (with weights) inside a ScrollView.
Suggestions of library or any tip will be welcome.
You can try StaggeredGridView: Link
A demo project to get you going: Link
I have a GridLayout with some items in it. Nothing special on it.
I just would like to know if I can drag items around and make the other items automatically arrange themselves.
It's like Android does in Jellybean if you move an icon near another icon.
Is that possible in GridLayout?
Thank you!
I don't know if that is possible with a GridLayout, doubt it, but here is a example that looks like a GridLayout and implements Drag and Drop. This should solve your issue.
I feel like there are many projects which could solve this slightly better than the other answer:
See the following question
Within this, the following projects are mentioned:
PagedDragDropGrid
Alternative View Drag and Drop
Google Project and some other 3rd party stuff
This may help you find some stuff other than GridViews as well.