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.
Related
I am creating a layout programatically because it is so dependent on data requests, but because of this I can't use the different layouts (small, xlarge etc) to make my design responsive for different device screens. I made a java extention file that has a function which gets the device's screen width and height so i can pass in a percent value and returns it in px. Is this viable or is there any good way to go about this?
You should go for ConstraintLayout. It has been designed for Responsive UI. It is more flexible and you can easily design using Android Studio's Layout Editor. Make sure you are using the latest version of Android Studio.
Learn more here: https://developer.android.com/training/constraint-layout/index.html
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).
I have a hard time trying to come with a good and acceptable layout for an activity for a tablet, but I'm not sure that if my design is compatible with Google's design guidelines.
In short: my application receives a network sniffer log file and shows statistics on different features on the data. For example, traffic over time, PM over time, show the traffic as a time line, different graphs, pie charts etc.
The first thing comes to mind for a design for this activity is a multi-pane layout (like Gmail's for tablets). The first pane would be the different features specified above, the second would have controls on the third one (which would display a graph) to filter different data, colorize and other things and settings.
The problem is, the second pane is not a list that opens a content (like in Gmail), but a pane that controls the third one.
My solution for this is to create just a two-pane layout: Only the second one (with the controls) and of course the third one with the graphs. The list of the features would be on a navigation drawer that the user would have to slide in order to switch to another feature.
Is this design compatible with Google's design guidelines? Is it logical for the user?
I don't recommend using the navigation drawer for tablets, at least not in landscape mode. Three panels should work fine and you can use the navigation drawer for portrait mode only.
Android design methodology is flexible so instead of trying to use the latest design patterns try figuring out what best suits your data.
Anyway, a good example for an app displaying content in 3 different panels is the Android Wordpress app. Check it out here: https://play.google.com/store/apps/details?id=org.wordpress.android
What would be better to integrate in the application- all options (for new screens) in menu, customized for each screen or have it on top of screen as tab bar- squishing the screen? what do normal android users prefer using? and from design perspective is it okay to keep changing items in menu bar in the app?
It should be a combination.
Different Views into your app data can go as Tabs.
Quick actions like search can be ActionViews.
You can also show different tabs depending on the context.
An old question but for future generations:
In my case, it was the task to replicate an existing iOS app with iOS UITabBar, so playing with the bottom-navigation Android pattern I found that it is much easier to use FragmentContainerViews than the official bottom-navigation pattern from the Android Architecture repository. Check the repository, there's a test application that you can run to check if the solution matches your expectations: https://github.com/Codeveyor/Android-Tab-Bar
I need to create an application similar to file browser - with opportunity to move through the files tree and looking into files.
What I want - is to make one app for both phone and tablet.
On tablet I want it to look like "Split View Based Application" on IPad
On phone I want to have something like a button which shows the activity with files tree (which will be on the left on tablet)
Is it possible? I need to have a tablet-only-oriented activity with two groups (left one - for files tree, right - for file preview)
I already read about "Supporting multiple screens" on android dev. But they speak about different layouts of same components on different types of screen - I want to add there few "tablet-only" and "phone-only" components...
Or it's a dead-end?
It is definitely possible. I recommend Fragments for this task. They were introduced with honeycomb and are exactly for this kind of reusable UI parts you have in mind. There is also a compatibility lib for lower android versions (I believe down to 1.6.) inside ANDROID-SDK/extras/android/compatibility.