I am beginner in android app development, I would like to know that how can i get insights of something that has been implemented, Which layout is used, Which view is it, I try to make some attractive UI and i end-up with some ugly UI, I would like to know how they make UI like this
Which layout they use, Which view they use, I Want to know this insights so that i can learn about them and implement the same in my app.
You can do it this by using Dump View Hierarchy for UI Automator option in Eclipse for that
Go to DDMS and devicesand select the device
and then it's generate your device screen shot .uix as below
Move your Cursor in uix and you'll see the all View Hierarchy Structure in right side upper corner area.
Here you'll get idea about the Layout View only.
#Pushpendra you will never get exactly what you want, you can get some ideas by seeing some existing application and then google it or check some open source projects on github to get starting idea.
You have to use your own creativity.
Here is a basic example to help you start.
Use this library
cardslib
which will help you to built card style layout as some of your shared images UI is designed the same way.
Sample app demo
for above library.
I hope it helps you.
If you want just to how the view is draw, you can go in the "Developer Options" settings and enable the "Show layout bounds" item.
If you want a more in-depth view of the layout, on the SDK you have the "Hierarchy View" that can be accessed from command line or on Eclipse/Android Studio. Inside Hierarchy View, go to the screen you want to know in the phone, select the screen in Hierarchy View and after a while the entire layout tree is shown and you can explore the items in it, so you can have an idea about the layout.
Related
Is there any way we can design a live tiles in android like windows phone? If so can you please guide me
hello you have to look at android design principles ,
just look at this link
You can use fragments for mimicking live tiles in android!
The container for the fragments should be dynamically created frame layout or any other layout.
You can add a long click listener for these layouts, to show options like unpin,re-size as in windows.
Add a drag listener too, so that the user can freely drag and drop the view any where within the parent layout.
I hope this idea is pretty clear.
I've recently switched from eclipse to IntelliJ IDEA for Android development. I'm not missing any features, beside the rather helpful designer preview in eclipse. I populate certain views in my activities at runtime, there are no texts defined in the corresponding XML files. In eclipse, it looks like this:
It fills the empty views with placeholder text which is nice to get a rough impression of the layout without having to start the app. But in IDEA, the designer looks like this:
The views are empty, and it's difficult to even see them without selecting them in the Component Tree. I haven't found anything in the options, is this missing from IDEA or did I miss an option?
It's not possible right now, but it would be nice to have, I've created a new feature request, please vote.
Working with Android for the first time, I've blocked out a layout using the relative layout and laid down some buttons and text widgets how I like them. However when I go back to rename the IDs the layout goes all crazy moving elements around and in general destroying the hours of work I spent laying them out.
Does anyone know how I can rename the widgets without Android destroying the positioning for widgets in the Relative Layout? Is this some "feature" of Android? I can't imagine why it would be hard for the UI builder to handle simple renaming of a widget ID without destroying the positioning information.. Do I have to use an external text editor and modify the XML files directly? Ughh I hope not.. I'm using Eclipse IDE.
You can use find and then replace all to change the names every place that they appear. Shouldn't take anywhere near an hour if you're dealing with a small layout.
In general the graphical UI creator that is currently included with the Android SDK is not so great for creating anything but very simple layouts. In my experiences (which were a long time ago, it may have gotten better since) it was terrible with RelativeLayouts.
If you have not modified your xml directly then it is time that you jump in and start learning to do it that way. You'll find that you have a much greater level of control over your layout, and once you get the basics figured out you'll probably be able to create quicker using raw xml then with the graphical tool anyway. I do wish that there were a nice GUI creator for android out there, the best one that I've ever come across is Droid Draw which I found to be better than the one included with the SDK, but still not as good as I was hoping.
To modify the xml directly you don't need any additional text editors, you do it inside eclipse. Open up your layout file and at the bottom click on the tab that says "Source" when you want to switch back to graphical (good to see the changes that you make to the xml graphically) just click back to the tab that says "Design"
I've just moved my entire development suite from windows to linux. Huuray.
I have installed the entire android sdk on my laptop, and the ADT works great.
The only problem that I have is the above written text in my main.xml layout window, and I do not know how to view the layout itself. On top of it, I don't see the UI pallet.
I have deleted and reinstalled the entire eclipse\SDK\ADT sevral times, but I just can't get to view my UI pallet.
Did someone encounter this problem? if so, I'd love to hear how you solved it.
Thank you,
dan.
The only problem that I have is the above written text in my main.xml layout window, and I do not know how to view the layout itself.
If you are seeing this message, then there is no layout yet. You can drag something from the tool palette into the drag-and-drop area of the "Graphical Preview" sub-tab, or click on the "main.xml" sub-tab (below the editing area, above the console, in a typical Java perspective tools layout) to work with the raw XML.
On top of it, I don't see the UI pallet.
AFAIK, that is not removable. It will be to the left of the drag-and-drop area in the "Graphical Preview" sub-tab:
If your Eclipse looks substantially different, perhaps posting a screenshot of your own will help us give you more concrete advice.
I'm trying to learn Android development and using the Android SDK in Eclipse. I'm following a tutorial to build the Main.XML file on the Graphical Layout tab. It instructs me to drag several Views onto the screen surface, including: EditText, Button, RadioGroup and RadioButton.
My issue is that these Views do not seem to drag. I place the mouse cursor over them, press the right button but the Views are not captured for dragging. There are other Views (such as Gallery) that seems to drag OK but those I'm interested in (to complete the tutorial lesson) do not drag.
Any help making this work properly would be appreciated.
Forget about dragging Android elements. The best approach is to hand code them. Eclipse helps a lot, since it can show you a preview of what you wrote.
you can try to edit the properties of the button i do believe that eclipse lets you do that
Goto Help->Check for New Updates and update
And then, You'll be able to drag n drop the View components onto your xml Graphical Layout. As #MEGA said, its advisable to hand code them. But, still as a beginner, I use Graphical Layout and the set properties using the Properties tab, which is more handy (since we donno what each property is for!)