开发者

how to fix activities' orientation in tabhost

I have meet a problem, there is a tabhost in my app.which have 4 tabs,each tab have more than one activiy.I just want to fix some of activities in portrait mode while other's can change orientation mode,any suggestions?

    <activity android:name=".MyTabHost"          
              android:windowSoftInputMode="adjustPan|stateVisible"
              android:configChanges="keyboardHidden|orientation" 
              ></activity>
              <!-- android:screenOrientation="portrait" -->
    <activity android:name=".Products_Images"
        androi开发者_开发百科d:configChanges="keyboardHidden|orientation" 
        ></activity>

    <activity android:name=".Products_Upload"
              android:screenOrientation="portrait"></activity>
    <activity android:name=".Products_Description"
              android:screenOrientation="portrait"></activity>

in products_images.java,i just want to show larger image while orientation changed,however in products_upload.java and products_description.java,i just want to fix orientation in portrait mode, all three class just in one tab.but it doesnt work!!


use this in activity tag in manifest file:

 android:screenOrientation="portrait"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜