Android : Trying To Make Nice Layouts For Landscape Mode?
Nov 10, 2010
My app has a tabhost with four tabs, and now I'm trying to make nice layouts for landscape mode. In order to make use of additional horizontal space I want to put TabWidget at the right side of the screen, and of cource all tabs must be one under another (like in a column).
But when switching to landscape mode all tabs get aligned in a row, it looks quite ugly. How to fix that?
Screenshot is here: http://imgur.com/gPS1R.png
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="1">
<include layout="@layout/filter_wizard"/>
<include layout="@layout/filter_wizard"/>
<include layout="@layout/filter_wizard"/>
<include layout="@layout/filter_wizard"/>
</FrameLayout>
<TabWidget
android:background="#75ffffff"
android:id="@android:id/tabs"
android:layout_width="wrap_content" android:orientation="vertical"
</LinearLayout>
</TabHost>
View 1 Replies
Jun 13, 2009
Does anyone know how to make a dialog fill the screen width in landscape mode? Setting the layout's width to fill_parent doesn't do it. It always comes up portrait width, or something suspiciously similar.
View 3 Replies
View Related
Feb 13, 2010
How do you make the widgets and menus resize when you switch to landscape mode? I'm having problem with my homescreen because it cuts off my widgets and the menus don't resize making it difficult to activate them.
View 6 Replies
View Related
Jan 23, 2010
I've seen references to being able to specify two separate layout xml files for an activity, one for Portrait and one for Landscape. I've not been to find any information on how to do that though. How do I specify for each activity which xml file is it's portrait layout and which is the Landscape layout? Is it also possible to specify different layouts for different screen sizes? If so, how is this done?
View 2 Replies
View Related
Nov 15, 2009
I have an app that I started in 1.6. It used images that were specific to portrait and landscape layouts. I put these in the corresponding drawable folders, for example:
drawable/image01,png
drawable-land/image01.png
when I created a new project with 2.0 it gave me the following folders. drawable drawable-hdpi drawable-mdpi drawable-lpdi. when I look at the documentation around these folders it all seems very straight forward. I assumed that you were able to create the following folders. drawable-hdpi-land drawable-mdpi-land drawable-lpdi-land
and everything would work as before. The image directory would swap automagically pulling the appropriately laid out image depending on your screen orientation. Unfortunately it does not. The SDK seems to get confused, and if I clean the project, the folders come up as poorly named.
View 3 Replies
View Related
Oct 17, 2013
Is it possible and if, then how, to achieve different layouts for portrait and landscape mode.
So basically whenever you rotate your screen (for the sake of example) in Nova launcher Prime, the layout could either separately be set up or it would switch from say 10x8 to like 8x10 or whatever you choose.
At the moment when you rotate the screen the portrait layout obviously looks pretty much messed up (see attachments for example of a messed up landscape layout).
View 4 Replies
View Related
Nov 15, 2009
I want a nice looking filter for my ListView in Android. How can I do this?
View 2 Replies
View Related
Mar 26, 2012
there are those of us, who due to whatever reason (helmet cams, preference for posture, etc) want to record videos in portrait mode.
What happens (on my sgs2) is that the video records just fine in whatever resolution I pick... but it records it 90 degrees rotated to the right.
The solution that is usually offered is that "you can rotate it after!" yes... but then you have to CROP part of the image and lower the resolution. 1920 x 1080 recordings end up having to be cropped so that half of the view is cut out , or even more if you are maintaining a real aspect ratio.
The questions about "why not just hold it sideways", are just as pointless as the statement by steve jobs telling iphone4 users that they were holding their phones wrong.
is this something that can be remedied ? or has google decided that people should only record videos when their phones are in landscape mode?
i understand that we cant see landscape resolution in portrait mode; but can't we just have a viewport into the camera, but record in properly oriented landscape mode? so that playback on a computer will show the full resolution, even though we will only see part of it on the phone..
View 1 Replies
View Related
Dec 1, 2013
dialer in kitkat is always in landscape mode when call is ongoing....how can we set it in portrait mode
View 1 Replies
View Related
Apr 16, 2010
I am trying to make Layout that contains 2 layout, vertical and horizontal scrolls.
Like this :
http://202.131.244.11/demo/VerticalAndHorizontalScrolls.PNG
How to make it ?
I've tried it. But horizontal scroll doesn't work for me.
View 1 Replies
View Related
Aug 20, 2010
I have a layout that has just a ScrollView visible. It has a relative layout as its child. This layout has several other layouts (mainly text views) as its children. When the text is not big enough, the scroll view does not expand itself to fit the whole screen. Instead, it shows a gap at the bottom where the background shows. I tried setting fillViewPort=true on the ScrollView, but that just made the first child layout (RL1) to fill the screen.
CODE:....................
View 1 Replies
View Related
Sep 6, 2010
I'm creating a game where there's a screen that, for the most part, is shared by four different activites - but a key portion of the screen will be completely different, depending upon which activity is active. Basically, on the left will be an image of the player and along the bottom there will be a row of buttons (let's say for Armour, Weapons, Magic, Skills). This leaves the top-right portion, which will need to dynamically change to represent the button pressed. (So, one moment the top-right portion is the armour selection activity, and the next it's the weapon selection activity, and so on.)
Is this possible? Can I have a layout within a layout and dynamically point the nested layout at a (nested) layout.xml of my choosing? Or, am I looking at just duplicating most of the layout four times (for the four different activities?) Or, am I going to be looking at linking the four activities to a (the top-right) view component, and then having to dynamically construct all of *that* view's child views based on the currently active activity? Well, that's about as much sense as I can make this question make.
View 4 Replies
View Related
Nov 24, 2010
I am New To android, my problem is when iam capturing image programetically the camera is opening in landscape mode..Than How to Avoid it?
View 1 Replies
View Related
Feb 10, 2009
I have a small application. It has some user inputs (like name, phone number, country, connection type etc, I used editText for the user to enter). Its working fine on the emulator. When I installed the same app on real device, firstly it shows the whole input screen. But when I tried to give input, (changing into landscape mode) half of the screen is not visibiling. I want to show the whole screen, I dont know how to do?
View 7 Replies
View Related
Mar 31, 2009
When we try to implement orientation in AP layer, we can set "android:screenOrientation" parameter in AndroidManifest.xml file or call "setRequestOrientation()" method of Activity class. But if I want to porting android in new HW device, how can I do? Do I need to modify the graphic driver, or just add configuration in program. (Actually I do some experiments but my AP cannot rotate) Besides, can every experts tell me when I set the "android:screenOrientation" parameter, which process will read this configuration, pass to where and which process will do the rotation?
View 2 Replies
View Related
Mar 24, 2009
There are some question bother me.
How to fix landscape mode when boot on device?
I had change manifest.xml ->
CODE:...........
But that only change sensorDemo screen. That doesn't I want. I want to set landscape mode when boot on device and show main screen. what methods does I try it?
View 3 Replies
View Related
Jan 15, 2010
I wanted a way to find out whether a softkeyboard is visible at any given time.
If I set the windowSoftInputMode property to adjustResize, I receive resize events in the portrait mode (onSizeChanged gets called). I use these events to find out whether the softkeyboard is visible or not. But I get no resize events in the landscape mode (Android SDK 2.0). Do I need to set some property explicitly to get these events in the landscape mode.
Also when the application switches between landscape and portrait, the application gets resize events. So to find out whether the keyboard is actually visible, I would need to differentiate between the 2 resize events.
So in short, is there a cleaner way (other than resize events) to find out whether the soft keyboard is visible? And if resize is the only way, how can I turn it on for landscape mode?
View 2 Replies
View Related
Jun 17, 2009
My application crashes when I switch the Android Emulator to landscape mode. But when I start the application, everything works fine, until I switch to portrait mode again.
The error only occurs when I switch from one mode to another. When I debug my app while switching to the other mode everything works fine until my program counter jumps out of the onCreate() function.
this is an error message i picked out: java.lang.RuntimeException: Unable to start activity ComponentInfo {com.prog.drink/com.prog.drink.App}: java.lang.IllegalArgumentException: Wrong state class -- expecting View State
Any idea what I could have done wrong in my app?
View 5 Replies
View Related
Dec 22, 2009
I am working currently on an application which is in landscape mode by default. I want the virtual kepad to be poped up whenever I click on the edit box. Please, help me for the same.
View 3 Replies
View Related
Apr 11, 2010
This is probably a pretty easy to answer question, but I can't find the solution myself after a couple hours of searching the documentation and Google.I set the orientation of my Android app to landscape in the AndroidManifest.xml file: android:screenOrientation="landscape"
However, when I run the app in the simulator, it appears sideways and in portrait mode. How can I switch the emulator to landscape mode on a mac? It's running the 1.6 SDK.
View 3 Replies
View Related
May 5, 2009
I tried a lot of ways with no luck.
View 2 Replies
View Related
Oct 1, 2009
I am facing a problem when i put a text view on screen in landscape mode it position is fine but when i switch to portrait mode it position is remain fix it not change according to screen resolution.
View 2 Replies
View Related
Feb 24, 2009
How can I disable landscape mode for some of the views in my Android app?
View 3 Replies
View Related
May 15, 2010
I have a an application which is having some UI items like Buttons Radio Buttons etc. I want to change through code from landscape to portrait mode. I did by calling the method setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); But my UI items totally disturbed some of the i am unable to see.
View 3 Replies
View Related
Dec 27, 2009
I am using a TableLayout in my application. It contains four TableRows each containing four ImageViews. The behavior I want is to scale the layout to fit the shortest dimension. It works fine in portrait mode but fails miserably in landscape mode.
From the documentation it looks like this is because the TableRow layout_height is always set to WRAP_CONTENT. While I can set the dimensions of the individual Views, the TableLayout won't render at all if I set the View layout_height to FILL_PARENT.
I feel like there is something simple I am missing. Is there a way to get the TableLayout with TableRows to scale to fit the height in landscape mode?
XML Layout:
CODE:...................
Java:
CODE:......................
View 2 Replies
View Related
Jul 25, 2009
I tried to search discussions and couldn't find definite answer or example in old thread. I want my tabs to realign vertically in the landscape mode. Currently I have to use buttons which is sorta silly when there is a tab control..
View 2 Replies
View Related
May 24, 2010
I am trying out the (latest) Android SDK, and noticed some strange behavior.I've written a skeletal SurfaceView app: Activity, SurfaceView and a rendering thread. It doesn't actually do any painting, and only writes out the framerate to logcat once a second. When it runs in portrait mode, I get around 60 fps. However, when I flip it to landscape the framerate drops to about 30 fps.
I have also tested it on the LunarLender sample, and got similiar results. All of the testing are done on the emulator, since I don't have a physical device.What's it all about? I can't seem to find any mentioning to this on Google, have anyone else experienced that? Is it just an emulator quirk or does it apply to physical hardware too?
View 2 Replies
View Related
Jun 16, 2012
Since i have an android device and tried some roms for this device (HTC One S)and its dissapointing to see that landscape mode is so lacking in the space that could have been used in messaging apps.
Its quite annoying (for me atleast) to have to withdraw my keyboard whilst typing something because the one i am texting with has sent something new.
I understand that this is not a place for requests, so my question is, is there any way to make messaging look like this (this image is not real)
and not like this..
I am not looking for a specific rom that allows this, im just looking for anything that makes this possible on any rom.
View 3 Replies
View Related
Feb 11, 2009
I have written a small example which displays the photos from the server. Its working fine when the device is in one of the mode (landscape of potrait). But if I switch to landscape to potrait or potrait to landscape while downloading the photos from the server, I am getting NullPointerException, showing with androidRunTimeException.
I am using LinearLayout -> ImageView
I am using threads to download the images.
View 4 Replies
View Related
Apr 30, 2010
In android emulator, I am in landscape mode and double click the text edit panel. the softkeyboard does not show up. However, it works in portrait mode.
I have check some of posts on line. They said because of hardkeyboard is available in landscape mode. If that so, how can i disable the hardkeyboard. Or is there any setting reason for this problem?
View 1 Replies
View Related