开发者

how to fix activities' orientation in tabhost

开发者 https://www.devze.com 2023-04-11 07:33 出处:网络
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 m

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

精彩评论

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

关注公众号