View.getLocationInWindow() only returns Y (and sometimes not even X)

by Romain Guy » Fri, 29 Jan 2010 06:52:52 GMT


Sponsored Links
 You are probably calling getLocationInWindow() before the layout happened.



>



View.getLocationInWindow() only returns Y (and sometimes not even X)

by ClarkBattle » Fri, 29 Jan 2010 06:53:19 GMT


 Sorry, in that first example I meant;

Log.i("Where?","x=" + loc[0] + " y=" + loc[1] );

not

Log.i("Where?","x=" + where[0] + " y=" + where[1] );

Copy/paste user error :)

--


Sponsored Links


View.getLocationInWindow() only returns Y (and sometimes not even X)

by ClarkBattle » Fri, 29 Jan 2010 06:54:38 GMT


 But its in onStart() while the layout happens in onCreate().  There is
no onFinishInflate() for Activities.  How do i make sure that the
inflation has happened?




> >



Other Threads

1. Tanya : O2 xda atom bisa diganti Android?

Dear All,

Mau tanya kepada para pakar, apakah o2 xda exec bisa diganti dari windows
mobile 5 menjadi android ?

Jika bisa, please panduan step by step or link-nya jika ada.

 

Terima kasih atas informasinya.

Anom

 

 

-- 
"Indonesian Android Community [id-android]" 

2. Porting to LG GW 620 Etna

Hi guys,
I'm planning to buy the new LG GW 620 with Android 1.5. Since it is
not sure if LG will release upgrade for Android 2.1 and over, I was
wondering if a custom build for this phone is possible.

It has a Qualcomm MSM7200A @ 528Mhz.
I'm a programmer, maybe I only need a starting point, I really don't
want to be chained to Android 1.5...

Thanks in advance,
Riccardo

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Receive large sms

4. Interconnecting emulators by network

5. problem building android image for gumstix overo

6. Newbie Samsung Galaxy Spica

7. Problem with self-compiled kernels