I've been searching this tons with no help. My application uses a
WebView and I'd like to make this default to horizontal orientation.
I've tried changing this with the layout main.xml file (confused about
that) and also with the WebSettings.setUseWideViewPort() and neither
makes any difference. What am I doing wrong?
Mancala.java class:
public class Mancala extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WebView wv = new WebView(this);
setContentView(wv);
WebSettings ws = wv.getSettings();
ws.setUseWideViewPort(true);
ws.setJavaScriptEnabled(true);
wv.loadUrl("file:///android_asset/mancala.html");
}
}
main.xml:
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
/>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---