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.
Related
I have been an ecommerce App in android and facing a lot of problem in UI.I am unable to set the navbars , tabs etc properly which is consuming a lot of my time.Is there any tool to generate code based on our layout like we have for web development?
Excuse me if this is a dumb ques, I am new to android
If you use eclipse to develop you have a simple and basic WYSIWYG editor. If you open a xml layout file it will automatically open. It also supports displaying multiple languages at once. And allows for easy change in configuration, like resolution, phone orientation and themes. Using the tabs on the bottom you can switch between xml layout code and the WYSIWYG editor.
But I do recommend practicing with building layouts just from xml, your layouts will most likely be of much better quality than dragging and dropping in any WYSIWYG editor. I use the WYSIWYG editor only for previewing layouts.
Great tutorial for android layouts can be found on the official developers site: http://developer.android.com/guide/topics/ui/declaring-layout.html
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.
are there design conventions for layouts on larger layouts? I feel like this is a question few have asked.
A lot of android layouts don't look good on larger screens, or the user experience doesn't translate so seamlessly.
A critique of android apps is that they just stretch on large screens, but don't have any design considerations for them.
Is there a resource that details how a user might want to make their layout-large xml file, if their default layout xml file includes a listview, for instance. On the mobile experience, a listview with just text will be fine, where on the larger screen experience, the listview by itself doesn't look too good.
I would like to add extra layout files, but I don't have any reference on what they should look like, or even in the planning design phases of an app, I don't have any reference on how it ought to be designed so that other screen sizes can be incorporated.
Mainly looking for a resource that addresses these issues. Like maybe a blog post that goes into detail about this. Google's tablet design guidelines were a helpful start too.
Insight appreciated
Perhaps these resources will help you out. I would make the general statement that probably the most common technique for adapting layouts from handset to tablet is making tablet layouts multi-pane. You mentioned that you already perused through the Google design guide, but I figured I'd highlight the one page that talks specifically about this:
Android Design: Multi-Pane Layouts
The general concept is that information you would have presented on multiple screens on the handset (e.g. the list of items, followed by the view to display the selection) can be brought together on the same screen on a tablet (so the list now sits side-by-side with the view of the current selection). You mentioned already how the resource framework assists in selecting the proper layout; on the code side Fragments are intended to assist with modularizing the code that goes along with the view as well.
Another resource that may be of use is from Googler Kirill Grouchnikov. He has a series of blog posts dealing with Google Play as a case study and how conceptually the UI was broken up to work between the handset and tablet:
Responsive Mobile Design
Hope that Helps!
I'm planning a project which will uses JSON objects to display data on andorid mobile.
My application is some what similar to facebook application for android. It seems making detailed ui like facebook's like,comment will be time time consuming & webview seems to be better option in this case ?
need your suggestion.
I'm also planning same app to be developed on iPhone as well.
Refrence link
Android has enough support for JSON that you can easily use the native widgets for your application. By using native widgets, the Joe Default user will have a more normal (expected) user experience, since most of the application will work just like any other Android application works.
Another thing to take into consideration that by using native widgets, it will probably be easier to add support for different UI sizes (portrait and landscape mode in various sizes can be a pain to get right in a single webview).
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