long click

by Noel Yap » Thu, 30 Oct 2008 23:46:24 GMT


Sponsored Links
 Can anyone point me to a code example that handles long clicks?  I can't
seem to find what I'm looking for in the Contacts app, but that's probably
because I don't know what to look for.
Thanks,
Noel

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



long click

by jtaylor » Fri, 31 Oct 2008 17:45:06 GMT


 Search through different code samples with this.

android.view.View.OnLongClickListener
 http://code.google.com/android/reference/android/view/View.OnLongClickListener.html 

onLongClick(View v)
Called when a view has been clicked and held.


- Juan T.





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


Sponsored Links


Other Threads

1. RawContactsEntity - Invalid column aggregation_mode

I've been poking around retrieving RawContactsEntity records (ie
RawContacts joined with RawContactsData) and am getting an
IllegalArgumentException when trying to create a query that contains
  ContactsContract.RawContactsEntity.AGGREGATION_MODE
in its projection.

Caused by: java.lang.IllegalArgumentException: Invalid column
aggregation_mode
at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
144)
at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
114)
at
android.content.ContentProviderProxy.bulkQuery(ContentProviderNative.java:
326)
at
android.content.ContentProviderProxy.query(ContentProviderNative.java:
345)
at android.content.ContentResolver.query(ContentResolver.java:202)
at android.app.Activity.managedQuery(Activity.java:1504)
at
au.com.xandar.contactsmanager.RawContactsCursor.getAllContactsWithNames(RawContactsCursor.java:
136)
at
au.com.xandar.contactsmanager.AccountsFactory.getAccounts(AccountsFactory.java:
44)
at
au.com.xandar.contactsmanager.DisplayContactsActivity.onCreate(DisplayContactsActivity.java:
37)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1047)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2459)
... 11 more

As far as I can tell, AGGREGATION_MODE is a valid column to be
retrieving.
Any ideas?

Also, when I retrieve the RawContactsEntity records for the
GoogleContacts account where MIME_TYPE =
StructuredName.CONTENT_ITEM_TYPE, I get about a dozen records that
ONLY contain RawContactId, ContactId and Sync4 and Sync4 == 1. I know
this is within the internals of the GoogleContacts sync adapter, but
I'm curious as to what Sync4==1 means in this context and more
importantly whether these sparse RawContacts records are real or
debris that can be safely removed.

-- 

2. Remote Service - Reconnecting

Hi,

I have implemented a RemoteService which will increment a countere
( just for testing purposes ). Therefore I have a Task class which
implements Runnable and the method run() where a infinite while loop
increments the variable.

then i bind to the service. When I close the activity, the service is
still running.
Now i want to rebind to the service.

How do I know if the service has already been started (therefore i
would only need to bind to the service again) or not (then I would
need to call startService() first and then bind to the service)?

What would happen, if I call startService() if the service is already
running? Does the OS start a second service, or will it affect the
service which is already running?
I am a little confused an can't find the answer in the developer
resources.

Thanks for your help in advance,
regards, Markus

-- 

3. How to know the home launcher app packagename through programming?

4. compiling a driver

5. Conversion to Dalvik format failed with error 1

6. Stop scrolling ListView

7. Enable usb debugging (under settings/applications/development) programatically from within app