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

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).

Related

How to add an overlay on widget on android auto

I'm looking into Android APIs in order to understand how to add an overlay widget to Andoid Auto but to no avail.
I'm not willing to add the widget on the main phone's screen but on the car display/head unit: my purpose is to write a simple widget which overlays the android auto bottom bar and adds a very readable clock (since the embedded one is really small!!!).
I've looked into existing tools for this to no avail and can't even find any hint if this is even possible using the APIs to target specifically the second screen used by AndroidAuto.
The reasonable starting point might be the WindowManager with appropriate LayoutParameters but this does not seem to be the right way.
Any hint?
Android Auto is designed to help minimize distraction so drivers can focus on the road. This means you can't do much, unless you have access to the full Android Auto SDK. Currently, only some big companies have access to the official SDK. There's also an unofficial SDK that allows you to make your own custom apps, but since version 3.0 Android Auto no longer supports launching custom apps.

Android Background is showing in the graphical layout but not on the device

I cannot see what the issue is. I am using eclipse 4.2.2. My SDK is fully updated.
When I set an application background in Android, it shows up on the graphical layout but not on the device. I have made a few apps that do nothing but display images or text on a single activity. Some of them will display the background using the same image that others wont. But in all cases it shows up in the graphical layout.
What are some common causes for this?
I am very much a beginner.
Thank you VERY much for the help.
I guess this is a very common problem.update your manifest file.Check whether you have used
try build the project using that sdk version and open up the avd using that particular api.All images will be shown.

How to create multi-pane layout in android

I want to make screen in which I have used multi pane layout.In screen ,left side show custom list view and right hand side show detail about click item.When I have run app in protrait from that show only single screen for example list.But on lanscape mode that is show list and detail page on screen.Please suggest me what can i do or example.
This is fairly easy with Fragments
And I think this is exactly what you want.
Android introduced fragments in Android 3.0 (API level 11), primarily to support more dynamic and flexible UI designs on large screens, such as tablets.
TIP:
If you update your SDK, and ADT plugin for Eclipse (If you are using it). You can even create a new project based on a fragment example! Which is very informative and easy to adjust.
You project has to have a minimum SDK version of 11.
Normally it would check with a configuration qualifier if you have a small handset screen or a big tablet screen, this check is fairly easy to find in your example project (Sorry I don't have much time to find a good example for you). Now you can change this configuration qualifier from large to large-landscape, or whatever you want.

Where is the Create Button form the UI editor?

Where is this button gone in the UI editor form ADT? Or what is the alternative?
It was very useful to create new layouts for different screen configurations.
Thanks
UPDATE: This button disappeared after updating to ADT 20.0
Where is this button gone in the UI editor form ADT? Or what is the alternative?
If that is what I think it is, it is in the drop-down that, by default, is labeled "default":
When folded open, the drop-down looks like this:
You can refer this SO Question/Answers and followings links, that gives you the same or better UI development tool for different configuration.
Droid Draw
Android App Developers GUI Kits
Android UI Utils
Simple UI
App Inventor
I'm regularly using these tools for UI development for my Android Application, You can try this for your development.
EDIT :
Sorry, I misunderstood the Question and the possible answer is,
You can get this button in Android Common XML Editor in top navigation bar, from there you can create alternative layout for different density.

Demoing android app screenshots

I need a way to show off concept designs of an android application on an android phone to simulate that it is running. Basically just being able to tap to advance to the next photo/screen would be sufficient with a tap ANYWHERE on the screen. Any tools you know that would be helpful?
Eclipse with Android toolkit.
Write a small program. wont take up much time.
[update]
No coding is required. Create an android project Using Eclipse android project, you can visually create UI prototype (i.e. drag and drop .. no coding). Use main.xml after developing each screen run the project in emulator, you can take screenshot of the same (either using eclipse DDMS plugin's snapshot capability or using Alt+Print screen in windows or something similar in other OS). Use this screenshot in a powerpoint presetation . Repeat the same process for a second screen (overwrite the same main.xml so that you dont have to write code). take screenshot again. Add the required animations in powerpoint.
Is there any other option that does not involve any code?
The easiest way I can think of is:
1. Take screen shots(wireframes, screen prototypes) for every screen flow you wish to demonstrate.
2. add them in proper sequence(regulated by sequence number) to your sdcard.
3. Open Picture gallery and use swipe gesture to transition and cycle between screen, walk through all the screen flows.
Do it photoshop, create images, add it to an activity. Create a layout that fills the parent, add it as a background. Then implement a ontouch method to finish the activity and load the next. Quite simple.

Categories

Resources