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. Content Provider - any file type store..?

Hi ,

In android it is not directly possible to share files and folders
across different application. The only way is Content Providers.

1. Is there any general (any file type) content store? Today there is
Audio, Video and Image Store.

2. Wanted to write new Content Provider to store Big files, like Video
and Audio. Saw some examples, like
   ( http://developer.android.com/guide/topics/providers/content-providers.html
)

                Uri uri =
getContentResolver().insert(Media.EXTERNAL_CONTENT_URI, values);

                OutputStream outStream =
getContentResolver().openOutputStream(uri);

                sourceBitmap.compress(Bitmap.CompressFormat.JPEG, 50,
outStream);
                outStream.close();

But what functions in Content Provider get called when we do
"getContentResolver().openOutputStream(uri)" ?
Which all function need to overload/implement in cont provider  . .?

3. Is there any example for content provider which stores big files
like video, audio ?
   I want through MediaStore.Image / Video etc , but could not makeout
much.

regards
Purush

-- 

2. Samplesync adapter download problem

Hello Developers!


I have tried to use the samplysync adapter example and at first it
looked like everything works fine.
But the problem is, like some others mentioned before, that neither
contacts which are added on the device nor contacts which are added
online are synced. So neither the download of online contacts works,
nor the upload of local contacts.
I tried it with the sample server which is mentioned in the tutorial.
Is there any solution for this problem?


Best regards,
StormsoN666

-- 

3. Gifting paid market apps

4. Voice Text Comparison from a phone call

5. In-App market

6. Help with my project

7. Virtual Assistant