[android-developers] Re: How to use findViewById(int id) out of onCreate() ?

2008-10-03 Thread erkenbrandroid
Oh yes you're right. I just had made a little mistake in my program! :- p But I didn't think about the fact that keeping it into the oncreate would speed up my app! Thanks for the info Mr Snowflake! On Oct 2, 7:00 pm, MrSnowflake [EMAIL PROTECTED] wrote: Indeed seems to no problem at all. On

[android-developers] Re: I want to know a button's width before it is drawn on the screen! possible?

2008-10-02 Thread erkenbrandroid
, 2008 at 2:32 AM, erkenbrandroid [EMAIL PROTECTED] wrote: Did it! Thanks Romain! :) For other people having the same trouble, the trick is to use the onWindowFocusChanged(boolean hasWindowFocus) class like in this example : public void onWindowFocusChanged(boolean hasWindowFocus) { int

[android-developers] Re: I want to know a button's width before it is drawn on the screen! possible?

2008-10-01 Thread erkenbrandroid
: Hi, You can use a ViewTreeObserver. Look at the documentation of the android.view.View class for more information. On Sep 26, 2008 10:42 AM, erkenbrandroid [EMAIL PROTECTED] wrote: Hello everyone! I need a bit of help for an app I am trying to develop. I've got a main screen with a couple

[android-developers] How to use findViewById(int id) out of onCreate() ?

2008-10-01 Thread erkenbrandroid
Hello, I'd like to use the findViewById(int id) method outside of the onCreate(bundle) to act on some buttons. How can I do that? Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To

[android-developers] I want to know a button's width before it is drawn on the screen! possible?

2008-09-26 Thread erkenbrandroid
Hello everyone! I need a bit of help for an app I am trying to develop. I've got a main screen with a couple of buttons on it. What I would like to do is get the width of those buttons before they are actually drawn on the screen. Their width is variable, as theyr are defined as wrap_content