Android FrameLayout best solution - android

i have simple LinearLayout as container and i'd like to show severals FrameLayouts inside. It should looks like below but id but it needs to be dynamically. The point is that number of framelayout that i will need, will be return from sql response. I found some similar questions but i need to treat my framelayouts as surfaces (with elevation, margin...). When i run app it should looks like below example. Maybe somebody know best method to achieve this.

Look at the RecyclerView. You can add the children as CardView, you can control elevation and stuff.
PS: Next time you should research a bit. I bet you could find the answer faster than waiting for someone to give it to you

Related

Bottom Panel in Android

I'm trying to design an app with a layout that will roughly look like this (don't mind the color):
How can I achieve something like that? I'm thinking of using a CardView for that bottom panel (I don't know what it's really called).
Furthermore, I want to hide it (animating it) when the use scrolls on the content. I have tried many codes but they won't work so I won't put them here anyway (like what's suggested here). Thanks for the help.
Whenever I have a question along the lines of "How do I do this neat UI thing I saw once?", I always start by checking out wasabeef's amazing UI library collection. In your case I might start by looking at bottomsheet or AndroidSweetSheet.

How to do advance "listing" for android views

I've been searching for a while now how to do some "Advance" lists like the facebook news feed and I don't think I am using the right keywords to search how to do that. I'm still quite new to android environment.
This is what I am trying to achieve:
How would I achieve a kind of list like that? Can I just do somekind of layout with a scrollbar and feed in some custom views? Do I need to do some kind of advance list?
Thank you for refering me to some useful information
For simplicity's sake, I would recommend maybe you should use a ScrollView nesting a Vertical LinearLayout and dynamically add all your child items in there.
I know...it's not the right way, but this is coming from a (somewhat) beginner's point of view here myself. (I've been coding all my life, but I was immediately not a fan of Lists and "Adapters" when I got into Android.)
So, if/when you need to search through/categorize/sort/manage your items I would suggest maybe using View.setTag() to store key information about each child, and either a) loop through all your child elements for deep searching, or b) use View.findViewsWithText() or findViewWithTag() for quick searching/categorizing.
It can get dirty pretty quick if you have to do extensive sorting, but in my head (and maybe yours) I would rather use what I know rather than learn what I don't know.
I didn't intend this to be an rock-solid answer, but it's a lot of info to cover in the comments.
Happy programming

How to develop ListView within ListView?

Friends,
I am trying to develop an application which requires the below UI:
I know its not a feasible thing to run a ListView with-in ListView or with-in a ScrollView. So I'll like to know that Is there any other way to do this same thing ? as the UI has to be same as its running in its LIVE iOS App.
Thanks in advance.
Solution: Thanks guys for all of your answers, but as I told that the Expandable-ListView is not the option in my condition. So I have creating a dynamic layout in Java Class file using an amount of various Layouts & Widget's Array. It took a lot of practice but it covered the necessity.
android-expandable-listview-simple
check this it will help you
You don't really describe your problem in detail but from your indication of a blue bar at the left, I suppose that you want to have some sort of a secondary ScrollView inside the primary ListView; which itself has its one scrolling view. If so, then using an ExpdandableListView will not be the solution that you want.
Android has some difficulties managing a ScrollView inside another ScrollView but if this is what you want, then take a look at: ScrollView Inside ScrollView .
Be warned that these solutions are not perfect and that probably you will never achieve the same level of control for this type of thing on Android as you can have on iOS.

Which View for a "fancy" scroller?

I'm developing an app that require the selection of one element (out of three) from the user.
Right now I've tried to developed a Spinner, and then a RadioGroup, they were both working but I find them not really catching.
The spinner is too simple, but easy to see. In the other hand the RadioGroup is more fancy (with some background customization), but not yet nice as I would.
I would like to implement something like a ScrollView, but with that nice "bumping" effect, the selection in the middle and the shadow on top and bottom.
A sample image:
The Libra app has this kind View for the adding of your weight:
Is the Scroller what I'm looking for? Any example or tutorial?
Thanks!
I think AndroidWheel is what you are looking for
There is no default View would do what you're asking for. Gallery does something similar but is deprecated.
Scroller isn't a View but a utility class to help View's implement Scrolling.
There are of course, libraries available to help you.

How to properly use the Space class in Android?

I have the need to use some Views as sort of place holders, but to not show anything. Its purpose is to make the TextView's that do show content to resize and share the available space horizontally. It is not necessary to go into detail, but what I am wondering is if I can use the Space class to accomplish this? I have seen it used in a GridLayout blog post, but other than that, there really isn't much on its many possible uses. The doc says its a light implementation of a View, which out of anything, would be the best way to accomplish what I need since it wont be too memory intensive. Is it only intended for GridLayout? There really isn't much info on it online so I was hoping someone could shed some light on the matter.
Just to elaborate a little of why I need to use the Space class, I have, say a LinearLayout. In that LinearLayout could be any number of TextViews horizontally. Say I want to resize it horizontally with a layout gravity, but not actually have another View actually show, just used to simulate that the size of the actually TextView with the content resizes correctly.
I appreciate any help!
The Space class was designed to include empty spaces in general purpose layouts and is very lightweight which makes sure that it doesn't add any overheads. Just put it in your layout like you would any other View. It's not specifically designed for any particular container. You can use it with a LinearLayout, a GridLayout, or anything else. Just don't expect it to display anything (not even a background).
if you want to give the space between layout .this is the way to use space. if you remove margin it will not appear.
hope that helps.
<Space
android:layout_width="match_content"
android:layout_height="wrap_content"
android:layout_margin="2sp" />

Categories

Resources