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>
Parsed in 0.014 seconds, using GeSHi

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.
Posts: 6
Joined: Mon Jun 08, 2009 5:49 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 3 guests