"expandable" menu to the right - Android \ Java - java

I know it's not a legitimate question but I'm searching an example to this menu for Android\Java about 2.5 hours and I'm lost. Please just give me a link or write me its name so I can google it, find examples and implement it by myself.
I just saw that many people use sliding menu or dropdown menu but it's different than what I want I guess.
(source: smashingmagazine.com)

Each of those is a spinner, so I thought it might be called an expandable spinner, and got some hits for what you're trying to do : expandable-spinner : How to implement expandable spinner entry in Android
Another term for it might be "multi-level spinner" for which there are more hits similar to what you want. Best practices for implementing a multi-level Option Menu on Android?
I'm not sure this is the best approach for a menu, though. Would you consider something like this instead: https://github.com/pratikbutani/MultiSelectSpinner

Related

how do I attach a description to an imagen in android studio?

first of all I want to thank, because in this community I have found a lot of solutions to my development question. But this time I have a big one. I was looking for an answer to it in google and pdf´s and so on. But it's a complicated question and don't know how exactly ask for it in google. I new in app development. so here I go. I'm trying to do an app that shows the different recipes with photos and description like time that it takes and the difficulty and so.
explanation of the question
Apologize because the childish imagen to explain to you but you know (efficiency).
My two questions are:
1) How may I do to attach a description to an image. I mean, I want that the people can add their own recipes and of course I will make a formulary to this, but how may I do to when the people create the recipe that I suppose that it should be an object of a class, the TextView be attached to the bottom of the image automatically. in resume, that the image and the description with their elements be one unique element. I have tried to encapsulate the image and the text view in one layout, but in this case I don't know how to create a new layout once the app is running. ok the user fill the formulary but how to create a new layout on the run. I don't know how to solve this.
2) How may I do to change in the description of the image the quantity of red tomatoes. I mean. if the recipe have 3 in difficulty, 3 of 5, this is settled by the user, but how I do to show 3 red tomatoes of 5 and the other showed in gray?
I know you may say "another Newby" but I have realized that I love programming and in El Salvador (Central America) there´s almost any information about this subject. Again, thanks a lot.
one way to achieve that is by using Recycler view. and every time a user adds an item. you can add it to the list and the system will draw a new item for you.
check this tutorial
let me know if this helps or you need more explanation

What Box like view should I use?

I'm trying to create an app using Android Studio, and I want to use some type of expandable box, where I'll have an indefinite number shown like in a stack, and when clicking on the left side icon, the selected box opens up to show more info.
The basic idea of what I'm searching for:
Would anyone know about something like that??
Thanks in advance.
If I understand it well, what you're looking for is a recyclerview (for the indefinite number of row) and an accordion widget to open close your content.
I will suggest your to look at these projects:
https://github.com/hgDendi/ExpandableRecyclerView
https://android.jlelse.eu/get-expandable-recyclerview-in-a-simple-way-8946046b4573
which present all requirements you need.
And here is an similar question/answer : https://stackoverflow.com/a/10313432/6809926
The google search I made : android accordion recyclerview example.

Looking for a combobox but not an Android spinner

I'm trying to get the same item as Window's combobox in Android java. I realize there's a spinner but what I need is to display a scrollable list of items that the user can simply select one or more. The spinner is nice, but it's a totally different beast.
Is there an equivalent? Because otherwise I guess I would have to create a section of text items, that I would have to build my own scroll function as well as selection. Hoping to avoid all that.
Thanks.
You're going to have to write your own, or find a library. There is no builtin equivalent. Luckily it should be easy, you basically just want a recycler view where the adapter keeps track of what items you've clicked on. That will take care of the scrolling, and the display simplifies to a normal list adapter.
Import third-party library just for little feature is unnecessary, you could try change spinnerMode to dialog, then the spinner is scrollable.
Edited:
sorry, I noticed that you need select multiple items, my answer is not suitable. You could create a custom widget.
The easiest solution is using library. There a alot library you can use for that problem. Here is the some library you can used:
https://github.com/prsidhu/MultiSelectSpinner
https://github.com/pratikbutani/MultiSelectSpinner
Or you can follow this tutorial
https://trinitytuts.com/tips/multiselect-spinner-item-in-android/
Hope it help

How to create an Accordion Menu?

I want to create Menu like this. Tap on any Item it will open Submenu with Items
I don't think there exists a library which will allow you to do this. (I may be wrong).
But according to me the best possible way to achieve this would be to use two tableViews placed next to each other and updating the the data for the second tableView on didSelectRow of the first tableView. You would have manage a few complexities but it is achievable.
If you only have 2 level of details in your menu, you could also use one tableView, show the 1st level elements in the section header, and create rows on section header click (using a button or tap) for the second level elements.
Edit:
My answer mentions some iOS naming conventions. Because it was originally asked for iOS with tag iOS and swift. I decided not change the original answer because the core concept of achieving this should be similar on both platforms.
Anyways, I think you can still do same stuff for android, just use list view where I mentioned tableView

What is the best way to get the item selected in the listview?

I have a listview which has a bunch of selections. I want to keep the focus on the listview in touchmode and get the item selected. What is the best way to do that?
I found this blog:
http://bestsiteinthemultiverse.com/2009/12/android-selected-state-listview-example/
and
http://developer.android.com/resources/articles/touch-mode.html
What does the community suggest?
You can't keep focus in touch mode. You can use the "choice mode" instead to keep items checked.
To get an idea of how to use ListView I'd take a look at this Google I/O video. It helped me a lot in getting going and goes over the choice mode (I think).
http://code.google.com/events/io/2010/sessions/world-of-listview-android.html

Categories

Resources