English 中文(简体)
Android景观和模式变化
原标题:Android Landscape and Portrait Modes variation

Hi All I m making an application in android 2.2 it layout has some text fields in linear layout and also some image Buttons at the bottom of the page. its view on Portrait View is Perfect but now when i turn to Landscape view by pressing CTRL+F11 its bottom Image Buttons do no display.. just because the screen size in landscape is different that of portrait.

我想要通过守则指导我,如果我的流动转向地貌模式,那么我就会检查自己的模式,改变子州的位置,以便形象地表能够看。

请朋友帮助我。

等待积极回应和指导。 预 收

最佳回答

在你的项目中,树脂会产生一个小块子,称为非地。 您的版面Xml文档被复制到这片夹子上,并为你们的景观需要做了编辑。 现在,每当你改变装置方向时,就将自动调整布局。 简单

问题回答

除了“Steff”的建议外,请允许我补充一点。 在你创立了一块非地圈子并建立了XML之后,你可以考虑在一份电文中概述你的布局。 我有一个类似的问题,这一解决办法对我来说是完美的。 这里是一部法典:

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal"
    android:layout_weight="1"   >
    <ScrollView
        android:id="@+id/ScrollView01"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_weight="1" >
        <LinearLayout
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:padding="3dp"   >
                <TextView
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:textStyle="bold"
                    android:text="NAME"
                    android:padding="3dp"
                    android:textColor="#666666"
                    android:textSize="16sp" >
                </TextView>
                <TextView
                    android:text="Name"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:id="@+id/summaryContactName"
                    android:padding="3dp"
                    android:textColor="#111111"
                    android:textSize="17sp" >
                </TextView>
            </LinearLayout>
        </LinearLayout>
    </ScrollView>
</LinearLayout>

All the elements that you put under the ScrollView will make sure that the screen content is never cut off.

希望会有所助益。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签