Layout Code generation in Android - android

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

Related

What is the android layout designer seen in udacity?

I recently came across an Android design course in Udacity, and I noticed they are using an interactive layout designer in the video.
Does anyone know what is the name of this designer?
I am hoping it's not a custom tool made only for Google engineers. The layout designers in Eclipse and Android studio are definitely not as easy as this one.
You can see it in the Udacity video below:
https://www.youtube.com/watch?v=O47H4PxMf9U&feature=youtu.be&t=30s
Is this thing here: https://github.com/romannurik/LayerVisualizer/
Not exactly a Layout designer but is really good to pre visualize layouts

Where can I find ready-made Android Studio GUIs to copy&paste?

I started with Android Studio and would like to get started.
I do not like fiddling around with GUIs and would like to play lego with ready-made pages and common standard interfaces.
Where can I find Android GUI XMLs to copy&paste or download to get started?
Does anyone know a good Android resource site, something like templatemonster for Android GUIs?
For example I need:
a settings page with switches, range sliders and a couple of fields, nicely arranged and already profesionallly looking
a user profile page
an inbox/outbox
a speech bubble view
list/grid view with images
a login/signup/lost password menu
You can use library for GUI and many other purpose the best place is Android assets studio
And there is a page that haves tricks for GUI is Android cheat sheet
And Android assets studio for images
If you get stuck visit Android's official site
Grabbed by JRummy's Blog

Is it possible to preview the layout of an AppWidget in Eclipse?

I'm developing quite a few homescreen widgets and currently I have to install them on my emulator or my phone in order to preview the layout.
Is it possible to preview the layout in Eclipse? When I open the XML of my layout in the preview mode, it displays it as it it were an activity and therefore the scaling is entirely wrong.
You can use jimu as a plugin into Eclipse to achieve it. Jimu is a drag & drop style App creation tool for Android. That's the most suitable tool to allow you achieve what you have in mind to get WYSIWYG, as it will enable you to have live previews of Android layouts. You have also the option to use it with Eclipse, or with Android Studio or any other editor of your choice.
To avoid the need to compile-install-run, jimu Mirror gives you live previews of your app that update as you code.
As you can image, the most positive fact about Jimu is that it speeds up Apps development times.
Alternatively, you can use IntelliJ IDEA. IntelliJ IDEA also allows you UI layouts preview.
Thus allowing you achieve WYSIWYG. And equally IntelliJ IDEA gives you the option to integrate it with Eclipse. Of course, alternatively you may decide to simply completely to move to Intellij IDEA. It is available in a commercial edition as well as in a free open source community edition.
IntelliJ IDEA UI designer allows you to build application UI by dragging widgets from its side palette. In version 13 you can simultaneously preview the UI you’re creating on multiple devices, by just selecting Preview All Screen Sizes from the device drop-down. Preview displays all changes made through the UI designer or XML editor in real time.
Such tools for GUI implementation from Jimu and IntelliJ IDEA remembers a little bit Qt Designer, which is available also for Android. In fact, any approach that properly works, allowing interactive Android UI quick development, is a greatly welcome valuable tool for developers that should be well used to improve productivity.
At the top of the view in Eclipse switch to the Holo Panel theme. If you need your own theme attributes then create tour own theme override that parent's to this. Then you could choose that in the editor.
it displays it as it it were an activity and therefore the scaling is entirely wrong.
If it displays as an Activity, then create a dummy Activity that mimics the home screen. Then use a theme, or use an include tag to include the layout from your widget into the cell(s) of that larger dummy home screen.
This solution isn't ideal, but it should be able to give you a better approximation (if what you're looking for is just to tweak the layout of your widget).

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.

Graphical layout with tabs

I am new programmin in Android.
I am trying to use a tab layout with tabhost. I have a question:
I possible to use the graphical layout interface to design the different tab screens or do I have to do it in the XML layout directly?
Thanks
I always create GUIs writing XML files by hand, without any graphical tool, so I don't have an answer for your question but I have awesome examples for you -- ActionBar Sherlock samples that are AWESOME example how to build tab-based apps:
https://github.com/JakeWharton/ActionBarSherlock/blob/master/samples/fragments/src/com/actionbarsherlock/sample/fragments/FragmentTabs.java
https://github.com/JakeWharton/ActionBarSherlock/blob/master/samples/fragments/src/com/actionbarsherlock/sample/fragments/FragmentTabsPager.java
https://github.com/JakeWharton/ActionBarSherlock/blob/master/samples/demos/src/com/actionbarsherlock/sample/demos/TabNavigation.java
Moreover, you can get all these examples on google play store and try them out without building them yourself!
https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.demos
https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.fragments
I always base my tab-based apps on one of these sample apps. Awesome stuff!

Categories

Resources