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.
Related
I need to dynamically create a layout like this. Textview can be dynamic.
I don't have enough reputation so unable to post image here. Sorry about that.
How am I supposed to go forward as layout manager will only go in one direction either horizontal or vertical.
Please provide some example. If question is duplicate please provide link to original question.
They are Chips. You can use these libraries
https://github.com/DoodleScheduling/android-material-chips
https://github.com/klinker41/android-chips
https://github.com/eyeem/chips-android
Thank you Amir for your hint "Chips" it helped me to google in this direction and I found a similar question on stackoverflow. link to this is Adding TextView in LinearLayout like chips same as Gmail address suggestion
Please close this question. Thank you.
For e.g. I want to show tags to some article (just like we have tags attached with each question on StackOverflow), I would like to show them like this:
Where the tags can be of variable length and they should span across multiple lines if they can't fit in the given width. I tried out LinearLayout and RelativeLayout but they don't seem to be able handle such 'auto' arrangement scenario. What layout or methodology should I use to achieve this effect?
This requirement is known as FlowLayout and I found couple of solutions as open source libraries to achieve this effect:
ApmeM/android-flowlayout
blazsolar/FlowLayout
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
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.
I am developing an application for a bank for a project.
I want the layout of the application to look like this:
I want to know how to do the views, and the lines separating each view.
If you have a tutorial on how to do this or XML codes or tips, would be appreciated.
Besides the accepted answer. You can also check out Android's Preference Fragment or this example
There are many implementations of this, but https://github.com/emilsjolander/StickyListHeaders is one (you can turn of the sticky headers if you just want the sections). You could also use https://github.com/commonsguy/cwac-merge from our very own #CommonsWare, I believe ;)