android - Orientation locked when background is transparent -
i want activity has transparent background, created theme:
<style name="theme.transparent" parent="android:theme"> <item name="android:windowistranslucent">true</item> <item name="android:windowbackground">@android:color/transparent</item> <item name="android:windownotitle">true</item> </style>
and applied manifest file:
android:theme="@style/theme.transparent"
it's working fine. when "android:windowistranslucent" set true, activity got transparent should, screen orientation doesn't change, stays @ portrait orientation. there way apply transparent background works portrait , landscape orientation?
it should work if set android:screenorientation="sensor"
on activity in question.
Comments
Post a Comment