I programmed the layout instead of layout.xml (for our own reason).
Following is the code:

        LinearLayout mainPanel = new LinearLayout(ctx);
            mainPanel.setLayoutParams(new LinearLayout.LayoutParams
(LinearLayout.LayoutParams.FILL_PARENT,
                    LinearLayout.LayoutParams.FILL_PARENT));
            mainPanel.setOrientation(LinearLayout.VERTICAL);
            mainPanel.setEnabled(true);
            mainPanel.setClickable(true);

        Button button = new Button(ctx);
            button.setLayoutParams(new LinearLayout.LayoutParams
(LinearLayout.LayoutParams.WRAP_CONTENT,
 
LinearLayout.LayoutParams.WRAP_CONTENT));
            button.setText("  Done  ");
            button.setGravity(Gravity.CENTER);
            button.setOnClickListener(this);
            button.setPadding(3,3,6,3);
            button.setClickable(false);
            button.setEnabled(false);

        WebView mWebView = new WebView(ctx);
            mWebView.setLayoutParams(new LinearLayout.LayoutParams
(LinearLayout.LayoutParams.FILL_PARENT,
 
LinearLayout.LayoutParams.WRAP_CONTENT));
            WebSettings webSettings = mWebView.getSettings();
            webSettings.setJavaScriptEnabled(true);
            webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
                mWebView.setFocusable(true);
                mWebView.setFocusableInTouchMode(true);
            mWebView.setClickable(true);
            mWebView.setEnabled(true);
            mWebView.setLongClickable(true);
            mWebView.setOnClickListener(this);

        mainPanel.addView(button);
        mainPanel.addView(mWebView);

        setContentView(mainPanel);

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to