resizing FrameLayout on child View content change?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

resizing FrameLayout on child View content change?

Postby danguyf » Wed Jun 17, 2009 1:30 pm

The setup: I have a WebView inside a FrameLayout like so:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                 <FrameLayout android:id="@+id/FrameInfo"
  2.                         android:layout_height="wrap_content"
  3.                         android:layout_width="wrap_content"
  4.                         android:layout_gravity="center"
  5.                 >
  6.                                 <WebView
  7.                                         android:id="@+id/infoview"
  8.                                         android:layout_width="wrap_content"
  9.                                         android:layout_height="wrap_content"
  10.                                         android:scrollHorizontally="false"
  11.                                         android:scrollbarStyle="insideOverlay"
  12.                                 />
  13.                 </FrameLayout>
  14.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4

I have menu choices which load different html pages into the WebView.

Problem: The FrameLayout will stretch to fit the WebView when a large html file is loaded, but then not shrink back to fit the WebView when a shorter page is displayed in it.

Question: How can I tell the FrameLayout to recalculate its dimensions each time I update the WebView contents?

Thank you.
danguyf
Freshman
Freshman
 
Posts: 6
Joined: Mon Jun 08, 2009 5:49 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests