using CSS in an android project - android

I have many xml pages that repeat lines of code, i feel like it would be much cleaner if I used a css page, I have looked it up, but in all the examples, it uses webview, which is something a freind told me to avoid when designing apps for phone use.
can I use a css page to reduce repetition and make my code cleaner? or does it have a side effect?

You can't use CSS natively in Android, however you have a number of choices.
You can either use the built in styling options for android and provide a styles.xml with styles you can reuse throughout the app.
Android Styles and Themes
Another option, if you're set on using CSS is to make use of the pixate library:
Pixate Android
Whilst this isn't production ready yet, it does provide a way for you to use CSS to style your widgets.

Related

android Responsive design VS CSS Resposnive Design

I wanna make android application with responsive design concept.
After searching and searching, I found that there are two ways for doing that :
By adding new xml files under res folder like layout-sw800dp/activity1.xml and values-sw800dp/activity1.xml , and android detects the screen size during run time and loads the appropriate xml file.
By making CSS responsive design and loading it in android but I don't know how to deal with buttons' actions in this way.
I ask about the best way for doing responsive design in android and what are the advantage and disadvantages for each way and how to deal with the buttons in the second way ?
Thanks in advance
I agree with #schabluk. Android provides RelativeLayout which is similar to responsive design in html.
Your first way of creating layout is not appropriate as there are thousands of android mobiles.
Use android's Webview for handling button events. Webview is a view for embedding html content in android applications.
You should follow "Best Practices for User Experience & UI". See Designing for Multiple Screens tutorial.

How to make an android app beautiful like this one?

I'm an amateur android programmer and I really like to code. My main difficulty is to make apps nice.
I came across a simple app, but at the same time, nice: https://play.google.com/store/apps/details?id=com.linksaude.bulas
I would like to know if this app has been designed with some specific plugin/add-on for Eclipse or whatever. It seems to be so consistent and beautifully designed that there must be an answer to simplify the building process of such apps.
Thanks!
I think what you're impressed with is the consistent color theme of the application. It looks like its designers carefully overrode the default design of Android widgets with their own custom scheme.
There is NOT any plugin for development tools that will help you achieve this; however, there are many external tools.
Here is a tool to generate styles for the action bar (the navigation bar at the top):
http://jgilfelt.github.io/android-actionbarstylegenerator
A tool to generate custom colored Holo widgets: (Holo is the theme in modern Android platforms):
http://android-holo-colors.com/
And my #1 favorite resource for this type of customization, this website:
http://www.stylingandroid.com/
These three are more than sufficient to customize an interface like the one you linked to above. Good luck!
Though beauty is in the eye of the beholder, this will do the job.
http://developer.android.com/design/index.html
Welcome to Android Design, your place for learning how to design
exceptional Android apps.
There are some DevBytes videos on YouTube of how you make your app beautiful.
The result is an application which looks very modern and beautiful, you should have a look at those videos

How to add style to android app

I'm wondering how I could add styles to my android applications. I have created some apps on Eclipse but all of them with fixed style. I would like to know how people manage to create those fancy and cool apps that you can download from the GooglePlay. I would like to know if there is any tool for applying style to buttons, tabs, etc like a CSS to HTML.
I hope no to bother anyone with this questions, I'm eager to know how to do it ^^
I like to use PhoneGap (http://phonegap.com/), it lets you code your entire app with HTML, CSS, and JavaScript.
Go with Fries. It's a design framework specifically for Android, and it provides all the fancy bottons, tabs, etc: http://jaunesarmiento.me/fries/
If you want to style your native app (Android and iOS) using the CSS language, I'm aware of two options:
FreeStyle: former Pixate, Free - http://www.freestyle.org/
NativeCSS: Paid - https://nativecss.com/

Android application using css for common view of pages

I want to make use of css in my android application to make a common view through out the application, please help how to add, implement and map a css in an android application.
Thanks.
Your question is a little confusing, but styles and themes might be what are you looking for.

Android Application looks like iphone

I came across this app and I wonder how was it developed on android (Cause it looks so much like an iphone app), see this screenshot.
Anyone have any idea how to accomplish that type of look on Android?
That's just a matter of styling after all. In general, I would consider it to be discouraged to make your Android app look like an iPhone app. Every platform has its own UX standards, and Android's standards are different from iPhone's. That quite obviously also reflects in the user interface.
Anyhow, you may want to read this article about Android themes and styles. It should get you going with defining own widget styles and stateful drawables to implement custom buttons.
This app obviously uses customized ListViews, ButtonView on the bottom of the screen.
Theses are pretty much standard and common in android apps.
Here is how to create custom components:
https://developer.android.com/guide/topics/ui/custom-components.html

Categories

Resources