Wednesday, August 14, 2013

[android-developers] resizing a webview dynamically

I'm trying to resize a webview in a relativelayout when a user clicks a button but it's proving to be quite difficult.  Here's what I've tried.  In every case the webview simply repositions itself but never resizes.
 

   

protected void toggleMap(){

...

lp=new RelativeLayout.LayoutParams(800,600);

//lp=new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);

lp.addRule(RelativeLayout.

BELOW,R.id.lblTop);

web.setLayoutParams(lp);

// web.invalidate();

// web.refreshDrawableState();

// web.requestLayout();

// web.reload();

}

 

Here's my layout...

<WebView

android:id="@+id/webDetMap"

android:layout_width="fill_parent"

android:layout_height="88dp"

android:layout_below="@+id/lblBusName"

android:layout_alignParentRight="true"

/>

 

 

--
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
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate