good afternoon
How could I get a design like this in my android application?
http://s2.subirimagenes.com/otros/previo/thump_7851660img20120718wa0000.jpg
That is, divided into three areas with different background color to the background activity. And for example in the first zone instead of having these options has a TextView and edit text where you enter something.
How to make something like that image what kind of layout is more recomedable use? Linear, Relative ...
Thanks in advance
You could use a fragment layout and use fragments to get that layout
The best way is to use PreferenceScreen with three PreferenceSections.
Related
I have a xml layout for displaying some results, depending on the result type I need to adjust this view changing 2 textViews and one ImageView, the rest of the layout keeps without changes.
The solution I think is the best is to change the text and the image inside my java code (programmatically).
A friend suggests that is better to make a copy of the entire layout and change this 2 text labels and the image.
IMHO that leads into duplicated code that is why I do not think this is the best option. What do you think is the best approach ? Do you think of a better one?
Thanks in advance.
You are in the right direction. Using 2 different layouts for different results will be absolutely redundant. You can set TextView values by :
textView.setText("Your Text")
and Image resource programatically by:
imageView.setImageResource(R.drawable.yourImage); according to your result.
I need to develop a dialog similar to the one in the image, and I don't know what is the best approach (I'm a newbie):
Which approach do you consider to be the best?
Define one custom dialog and define the custom layout (up arrow) in some way?
Define one image with 9-patch and use it as an imageView with text inside?
Thanks a lot in advance :)
Well, You need tooltips views not dialogs. Dialogs will not serve your purpose.
please refere below library
https://github.com/nhaarman/supertooltips
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.
I am trying to display my layout via android xml.
Here's what I want to do:
I have 12 buttons with a animals image like this one: , and the circle is the background.
I do not have any idea related to this, how should I start?
Please give me some suggestion so I can go ahead. What things should I use to do this?
You'd be looking for making a custom view. A good place to start is, as always, android's own development site: http://developer.android.com/training/custom-views/create-view.html
i think you can do this with xml. this need simple mathematic calculation that you can not do in xml.
you most extend View class and create your own View. then you can use it in xml.
When I place things like text boxes they are fixed in one position and I can't move them around easily.
How can I edit the style and maybe put an image at the top of the text boxes and give the app a neat and pretty little layout?
Thanks
Use RelativeLayouts instead of LinearLayouts (i assume that you are using them) which allow free positioning.
To modify the theme/colors, read Applying Styles and Themes.
Create 9-patch graphics and assign them as backgrounds.
I am unsure if this is what you are looking for,but you can arrange the object on the layout from the xml files in res/layouts/ folder.Do not forget to follow the UI guidelines provided by google for android development. Also you can create custom themes for you app if you do not like the default template.