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 - draw view on top of an other

draw view on top of an other

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

draw view on top of an other

Postby bela » Thu Aug 13, 2009 11:11 am

Hello,

I was wondering if it is possible to draw a textview object on the surface of a gridview. If it is, how can I do that?
This piece of source code doesn't seem to work:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. public class MyCustomView extends GridView {
  3.  
  4.  
  5.  
  6. @Override
  7.  
  8.         protected void onDraw(Canvas canvas) {
  9.  
  10.                 super.onDraw(canvas);
  11.  
  12.                 TextView tv=new TextView(getContext());
  13.  
  14.                 tv.setText("abbababba");
  15.  
  16.                 tv.measure(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
  17.  
  18.                 tv.draw(canvas);
  19.  
  20.                
  21.  
  22.         }
  23.  
  24.  
  25.  
  26. }
Parsed in 0.011 seconds, using GeSHi 1.0.8.4


Please help!

Thanks,
bela
bela
Freshman
Freshman
 
Posts: 2
Joined: Mon Aug 10, 2009 4:17 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 8 guests