Monday, August 1, 2011

[android-developers] Re: Two Newbie Questions

> 1.) Is there a way to make a button load another layout XML by
> android:onClick in XML?
No, you have to use Java too. Android:onClick can only reference a
Java method in your activity and this method could do setContentView()
to replace the layout.

> 2.) In my other XML, I have a WebView that fills the screen. How can I
> set the homepage for this WebView?
Need Java for that too.
http://developer.android.com/reference/android/webkit/WebView.html#loadUrl(java.lang.String)

On 31 Juli, 21:04, Giggybyte <dustin-dusty1...@hotmail.com> wrote:
> 1.) Is there a way to make a button load another layout XML by
> android:onClick in XML?
> 2.) In my other XML, I have a WebView that fills the screen. How can I
> set the homepage for this WebView?
>
> Thanks for the help.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment