Android Webview - Programmatically change orientation for specific webpage without reloading -


i'm trying see how go changing webview on page if page contains video can watch in landscape mode. not reload webview allow page rotate. how can done? not sure how go it.

i haven't done this, think should work want.

  1. change orientation code when needed
  2. as dont want interrupt content disable activity retstarrt on orientation change

  3. to change orientation code use

    setrequestedorientation(activityinfo.screen_orientation_landscape)

    setrequestedorientation(activityinfo.screen_orientation_portrait);

  4. and prevent activity restarting when orientation change use following in manifest

    android:configchanges="keyboardhidden|orientation|screensize"


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -