Android UI design? - android

To be very honest, I am very new to android development. I really want to learn it.
I'm facing problem in UI design. I want to make something like the picture given below.
Now my question is the that the list of person is dynamic (received from a web service). Now how can I achieve that.
I'm guessing I have to make a XML layout of one and then load it in the layout using code?
i've done something as explained here.. but that is not enough. :(
Please help!
**** EDIT ****
I want this
to be dynamic. I have successfully created the above image strip in a separate XML.
now can it be used in the main layout dynamically like we used to do in case of User Controls in .NET?

You have to work with ListViews. Just watch the Google I/O ListView video for a good introduction. The actual layout of cells will be done in a separate layout XML file.

here is important for you..following link provide how to adjust image along with two item.
refere this

Here is the project file. For simplicity I used a SimpleAdapter. You can create your custom adapter to meet your requirements. Hope you like this ui... :)

Related

trouble with layout android Not Able to generate this View According to icons and line and below text

I am designing following layout structure for one of my application. But dont know how to implement it.
This Design is called Stepper. There are lot of open source library is available for this design. Check the following link. May it will help you.
https://android-arsenal.com/details/1/3049

How to create a customized layout

i'm creating an app, and i'm kinda knew in android develpment, i don't have much experience, but i've bee maneging well. My app is almost complete and now i want to improve the looks.
Anyone knows how to put the widgets inside boxes, separated from background ? Like, i'll give you an example:
Anyone knows how to put the widgets inside boxes, separated from
background ?
=> You can use the CardView provided in support library. CardView is nothing but a FrameLayout so you can include whatever views inside it!
For more reference, go through the Creating Lists and Cards.
Use frame layouts for the boxes.

How to make a spinner with icons in a form of table layout dynamically?

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

How to set up a layout using code and not XML

I'm learning to develop android apps and in the process I realized that there two ways to get a job done. Using xml or normal code. Suppose I want to change the position of a button, I'll be doing it in xml using align left/align centre etc., This will be done in the XML file. If I want to achieve the same through code, where should I place the code ? Inside which class ?
There are two aspects to your question that I understand.
1. Creating a whole layout file dynamically (without XML).
2. Creating a layout through XML and changing the components positions and properties dynamically through your activity file.
Now, it's upto the developer what he wishes to choose.
To help you further, please view this video link posted by the Android team.
It's all about layouts and includes how to layout apps using Java, not XML. However, you are warned that the android team wants you to use XML.
The code will be placed in the same class as the class where you reference your xml code. Do a read up in your android docs for insight.

Dynamic UI Controls in Android

I am in a situation like i have to generate UI Controls like Button,Switcher,Progress Bar, Label text etc based on my list Items .
I am looking for a way to generate the controls in a View and add Views with generated controls in a Layout .
Can anyone give me a proper way to do that?
Why not to use Fragments?
Google docs about this here
and little tutorial here
You may want to take a look at the Metawidget source code. The Android version of Metawidget makes extensive use of generating Views and Layouts at runtime (e.g. see org.metawidget.android.widget.widgetbuilder.AndroidWidgetBuilder). You may even find Metawidget itself will suit your needs (it's designed to be embedded into projects for use-cases such as this).

Categories

Resources