Hi does anyone know how to add/change the colour of the application layout. It is a .xml file
I'd like to add a border and change the background colour. There are also text fields in there, is it possible to add a border/border colour to the text fields.
I am a novice by the way!
Thanks
If you are new to this, you should use Eclipse with Android SDK plugin. In Eclipse, you can use the visual layout editor which will give you a fast and easy answer to your questions, and even more.
android:background="#ffffff" for white bg .
2 b vry frank 4 a beginner, developer site or other tutorials will prove much more effective den putting questions here .
Related
I'm porting one of my iOS apps over to Android (which I'm pretty new to), and I was wondering how I would draw this shape in Android using XML:
I want to recreate the shape (the white object) at the bottom of a tableView. The image attached is a screenshot of the bottom of a UITableView.
Any help would be greatly appreciated if you need any more info just let me know.
Thanks
EDIT:
Sorry I wasn't totally clear, I'm actually trying to recreate the slight arch at the bottom of the table. Since it's so slight, you may not be able to see it with a quick glance.
It seams to me that you want to "lift" your table up a little bit. If so, you have to implement this attribute to your tableView:
android:elevation="2dp"
or in java:
tableview.setElevation(2);
My opinion when reading this question: Stop trying to make your android apps look like iOS apps !!!
If you still want to do it.
Just have the background color for your activity to that color and set the layout_margin to either 2 or 4.
It should give you your desired effect.
Hi I am a beginner in android and I want to know how to customize buttons,check box etc., I searched in web but found many ways and got confused...
Can you please tell me what are the ways to customize android widgets, can we do that using css, like we do for the HTML?
Thanks in advance...
There are a few ways. You can use 9patch to edit the files inside the SDK(which will typically be C:\Android\SDK\platforms\android-19\data\res\drawable-hdpi) - Android-19 is the api level, and then set them in your xml layout under the widget you want with
android:background="#drawable/your file"
Another way is to create a selector(Recommended because it can handle stuff like when clicked and more), shape(Simple creation with corners and stuff), layer list(Advanced selector) or solid(just a color) in /drawable and then set them in your xml under the widget you want with
android:background="#drawable/your file"
An example of the second solution can be found here android button selector
Basically, i am trying to implement a WYSIWYG editor just like MS Word or Quick Office. After so much R & D, i am not able to find a good simple solution.,The app would contain basic formatting buttons like text style, font, size, alignment, bullets.,.
So please anyone suggest something
I am adding snapshots from QuickOffice.,It is WYSIWIG Rich Text editor.
Snapshots are in a Series from 1 to 5.,.Pleas go through them..,.I am sure you will understand what i want now.,.
Rahul I got the point. Thanks for your explanation.
You have to build the listener what you are looking for any button's action. Like bold the text, underline , changing the color or font, change the justification of text and others. I will prefer to follow these link from where you will get depth knowledge of working with text editor on android:
GOOGLE DRIVE SDK [ANDROID, iOS , Java & more platform]
https://github.com/googledrive/dredit
Some other repository you can check :
https://github.com/paulmach/Text-Edit-for-Android
https://github.com/jecelyin/920-Text-Editor
https://github.com/jiro-aqua/Jota-Text-Editor
And if you get any specific problem you can share I will try to give the solution.
Happy coding !!!
At the moment im using:
android:theme="#android:style/Theme.Black.NoTitleBar"
Which I'm growing a bit bored of, Is there a link you can direct me to that shows me examples of all the inbuilt themes and their names?
I read on another post that there is quite a few so it would be best if there was a website/other source that could show me some previews :)
Thanks for the help!
Your IDE (I know Android Studio does), should show you them.
Otherwise, here they are in raw xml form. https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/themes.xml
More information on Android Dev docs: http://developer.android.com/guide/topics/ui/themes.html
You can see all the theme names in the manifest.xml. For this see the following snapshot:
Android Studio has a Theme Editor which provides preview function.
User can find all built-in themes inside.
2 ways to open it:
Open a styles XML file, for instance res/values/styles.xml. Then click Open editor near the top-right of file-editing window.
in top menu bar Tools-Android-Theme Editor.
I'm pretty noobish with it all but basically I think there are only two themes. Day/Night and Light. You can select individual parts and change them but as far as I can tell there are only two themes.
As I had a comment that said this doesn't answer the question I will add that you can use Theme.AppCompat.DayNight or Theme.AppCompat.Light in the AndroidManifest.xml or in styles.xml and edit any individual attribute but there are about a million attributes and god only knows what they all do. In my opinion it's a massive oversite by android.
I am trying to use the Graphical Layout editor to make my app, so far so good but now I am in this problem:
I want the grey small textview to go a little higher but no matter what I do this isnt happening. How do those apps in the market have such beautiful GUIs when I can barely create a simple one? What are they using that I am not? :P Thanks.
Well, To fine tune the UI, you will eventually have to edit the generated XML. It would be good if you start getting your hands dirty with the XMLs. Please post the XML and then anyone would be able to suggest what changes to make.
I think you would probably reduce the padding or margin of the textview above.
Have you tried editing the XML and decreasing the top margin of the text? Or decreasing the bottom margin of the view above the text?