To create a dynamic layout I need to know the width and/or the height of the screen.
Is there any system variable or sth?
I tried the following:
Using java Syntax Highlighting
- AbsoluteLayout absLayoutMain = new AbsoluteLayout(this);
- mDebug = new TextView(this);
- String s = Integer.toString(absLayoutMain.getHeight()); //get the height from the super View
- mDebug.setText(s);
- absLayoutMain.addView(mDebug,
- new AbsoluteLayout.LayoutParams(100, 100, 50, 50));
- setContentView(absLayoutMain)
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
But it keeps me telling the Views height is "0".
Any ideas how to work this out?
greets


