Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Measure height of view with new LayoutParam

Measure height of view with new LayoutParam

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

Measure height of view with new LayoutParam

Postby sandis84 » Mon Nov 23, 2009 11:40 am

So I have a view that I give a new layoutparam. Then I want to measure the height it gets with this new layoutparam. My code is like this:


Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. RelativeLayout.LayoutParams layoutParam = new RelativeLayout.LayoutParams(
  2.  
  3. LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
  4.  
  5. layoutParam.addRule(RelativeLayout.BELOW, R.id.title);
  6.  
  7. layoutParam.addRule(RelativeLayout.ABOVE, R.id.bottom_menu);
  8.  
  9. scroller.setLayoutParams(layoutParam);
  10.  
  11. scroller.getHeight();
  12.  
  13.  
Parsed in 0.012 seconds, using GeSHi 1.0.8.4


The problem is that the height has not changed yet when I call the getHeight-function. I want to measure the height immediately after it changes. How do I do?

Cheers,
Per Sandström
sandis84
Experienced Developer
Experienced Developer
 
Posts: 78
Joined: Fri Aug 07, 2009 3:54 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests