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.
Related
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 have a design Mockup of a remote control with 4 buttons and a Text Display. Now i want to create an Android Activity which looks like this mockup. How can i do this.
I think taking the design image as background for the activity is not the right way to do this (how would i make the buttons on the image clickable, etc...)
Can anybody give me a hint how to start here?
kind regards
You should create 9-patches(or patterns) for each graphic element on your layout for proper layouting on all available devices.
Then apply this patterns to your UI elemnt's(ImageView's, Buttons, TextViews) backgrounds.
Refernces:
http://developer.android.com/tools/help/draw9patch.html - 9-patch documentation
http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html - 9-patch creation
http://developer.android.com/guide/topics/ui/declaring-layout.html - Layouting
You can use your background easily but the rest need to be done in Android.
First : download android sdk
second : create your project
third : code :)
If you're familiar with HTML, that should be kinda similar. You separate the cliclable parts from the background (the buttons), and make them ImageView, setting an onClickListener.
You'll need some Photoshop skills to do that, or ask a buddy designer to do that for you :)
Be careful with multiple screen support, since the background may get trickier to make it look right on every supported screen size.
I want to create an android style that allows me to put TextViews, pictures, and other elements within the "cards" as demonstrated in the link below. I think that design really adds depth and helps separate content from the background and I'd like to use it in my app. However, I don't know how to create that. If you could help that'd be greatly appreciated! :-)
android card design example
Those TextView just have a custom background. This may be
A 9-patch image
A xml-drawable
I suggest reading on 9-patch drawables and on android drawables in general.
The reason why I think it's a 9-patch is that this "card" has a slight drop shadow.
See if this Library helps you
http://www.androidviews.net/2012/12/cardsui/
I'm trying to make an iOS version of my Android app. It contains text that looks like this:
There are three labels: title, author, and publication year. I need to display the full title, which may be several lines long. However long the title is, I want the author label to be directly below the title, and the pub. year directly below that.
In Android, I just used relative layouts to achieve this effect. How can I do this in iOS? Can Auto Layout do this for me somehow? If not, do you have any suggestions for effectively displaying this information in iOS? Preferably I'd like to achieve this using the storyboard.
In iOS you use InterfaceBuilder IB for layouts - it's drag and drop - not like Android layouts.
Search for IB tutorials - it is really straight forward and you see what you get:-)
I also searched quite some time a way to achieve android-like layouts in iOS (without the hassle of computing every positions for each subviews).
I eventually gave up and coded a fast equivalent of VerticalLayout and HorizontalLayout. Here's the repo (it's ARC compliant) :
https://github.com/kirualex/iOS-Layout-helper
It's sketchy but it does the work !
Put simply relative layout organises items on the screen relative to something else. Like linear layout, relative layout is commonly used by android developers. I myself do like this layout and have used in the development of my applications before. See
http://developer.android.com/reference/android/widget/RelativeLayout.html and http://developer.android.com/guide/topics/ui/layout/relative.html for more information on relative layouts.
I am very new to Android development and am having some trouble. I am creating an XML file using Eclipse, both the Graphical Layout feature is what I'm having trouble with.
Also, I am working in Android 2.3 for compatibility reasons.
I am wondering if there is a layout which enables me to place buttons or text fields or any attribute where I want to put them. This may sound stupid, but it seems that every layout has some sort of order in which it lets you add attributes, and whenever I try to drag them elsewhere on the layout things just get very very messy.
If what you want is an AbsoluteLayout, this has been deprecated since Android 2 (IIRC). You can try using the RelativeLayout, which let you position freely your widgets. Else, if you only use LinearLayout, then yes the widget will be positioned in a strict way.
use Relative Layout. I recommend that you read up on Android layouts so you understand why, what and hows of Android way. There are some good tutorials that I found helpful. TutsPlus: Android Layouts
There is also a very good video from Marakana.
Marakana: Android Bootcamp
If you are just starting out with Android check other tutorials/videos on Marakana. They are a very good resource for beginners.