want to take the height and width of editText from String file

by Mark Murphy » Mon, 19 May 2008 20:38:13 GMT


Sponsored Links
 > i want to declare the constant value for the  height and width for

Use the android:height and android:width properties:

 http://code.google.com/android/reference/android/widget/TextView.html 

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
The Busy Coder's Guide to Android Development -- coming in June 2008!


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Get NinePatchDrawable from file?

Hi all

does anyone know a way to load a NinePatchDrawable from a filename

I tried NinePatchDrawable.createFromPath(), but that only gives me a
BitmapDrawable

Thanks,
--~--~---------~--~----~------------~-------~--~----~

2. What happens between two View.onDraw calls? (Game, FPS)

I am in the middle of writing an game and got curious what happens
outside my code. I extended the View class with everything happing
inside onDraw (updating the model and rendering it). Before onDraw is
exited, a invalidate() is fired so the View gets repainted
continously. With this approach I get 60 fps most of the time
(sometimes it lacks behind shortly), which is OK for now. However, the
game will get more complex, and I did some measuring with the
following averages of painting one frame:

* My code inside onDraw consumes 5ms
* Between the calls of onDraw 10ms are "consumed"

So twice the time is spend outside my code: What exactly happens here?
Is there just a 60fps maximum (causing the system to wait until the
next frame is painted), or is there so much overhead going on behind
the scene?

I know about SurfaceView and decoupling the rendering from the GUI
Thread, but I haven't tried that yet. To me, it did not seem to make a
difference in which thread my game code is executed, so I stayed with
the View so far.

Markus
--~--~---------~--~----~------------~-------~--~----~

3. Android Market Business and Program Policies

4. What happens between two View.onDraw calls? (Game, FPS)

5. What happens between two View.onDraw calls? (Game, FPS)

6. JNI run time error even I use same code and lib as Android source code.

7. Paid Apps - Repeat refunders