Using two different layouts might work for the current default screen
resolution. In order to make your app play nice with other screen
resolutions, too, you should take the time and make your layout scale
well, either by using relative measures or by wrapping it into a
ScrollView, as suggested.

The outer ScrollView should have android:width="fill_parent" and
android:height="fill_parent". The inner LinearLayout should have
android:width="fill_parent" and android:height="wrap_content".

Please post excerpts of your layout file so we can see what's wrong.

Christoph


On Tue, Feb 10, 2009 at 2:13 PM, Marco Schmitz
<netzprofi.ma...@googlemail.com> wrote:
>
> maybe you can create 2 different xml files for each mode.
>
> create a folder "layout-land" and a folder "layout-port" under "res"
> and place the xml file (same filename) into it.
>
> the xml file mustnt be inside "layout".
>
> this way the best fitting xml file is used :)
>
> greetings,
> darolla
>
> 2009/2/10 manoj <manojkumar.m...@gmail.com>:
>>
>> Hi frnds,
>>
>> I did as you suggested.
>>
>> I used ScrollView,
>>
>> inside that I used LinearLayout, but still the problem persists.
>>
>> can you please help me.
>>
>> Thanks,
>> Manoj.
>>
>> On Feb 10, 5:52 pm, Odessa Silverberg
>> <silverberg.ode...@googlemail.com> wrote:
>>> Well there can be some reasons. Problem is you aren't specific enough
>>> to get a clue what could be causing it. First off, you can also swap
>>> to Landscape Mode in the emulator too, if you press Ctrl+F11 (iirc,
>>> don't have eclipse/SDK installed on work)
>>>
>>> However, there could be a few reasons for this:
>>>
>>> 1. If you have designed your application for potrait mode, you maybe
>>> forgot to add a scroll view. So an application in potrait mode would
>>> look fine but when you flip it (i.e. open the keyboard in the G1), it
>>> turns into landscape mode.
>>>
>>> In this case you could simply add a <ScrollView> element as top
>>> element in the XML file
>>> i.e.
>>> <ScrollView
>>> android:layout_height="fill_parent"
>>> android:layout_width="fill_parent">
>>>    <LinearLayout
>>>         android:layout_....
>>>    >
>>>       <!-- Your other Views comes here -->
>>>   </LinearLayout>
>>> </ScrollView>
>>>
>>> 2. Maybe you used fixed layout where every view has a fixed position.
>>> this can cause some very unflexible layouts. Instead use something
>>> more flexible, like Relative or Linear Layout (even Table Layout)
>>>
>>> On Feb 10, 1:28 pm, manoj <manojkumar.m...@gmail.com> wrote:
>>>
>>> > Hi friends,
>>>
>>> > 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? can any one please help me?
>>>
>>> > Thanks,
>>> > Manoj.
>> >
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to