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. TabActivity crash

I'm trying to create a tabbed view in my widget configure activity.
I'm using a tab activity as my activity type and I have the following
code.

                tabHost = getTabHost();
                tabHost.setup();


                this.setTitle(getString(R.string.configure_widget));


                tabHost.addTab(tabHost.newTabSpec("test")
                                .setIndicator("test")
                                .setContent(new Intent(this, 
LocationListActivity.class)));*/
                TabHost.TabSpec locationTab = tabHost.newTabSpec(getString
(R.string.widget_location));

                locationTab.setContent(new TabHost.TabContentFactory()
                        {
                                public View createTabContent(String tag)
                                {
                                        createLocationTab();
                                        if( 
!getIntent().getExtras().getBoolean( getString
( R.string.intent_extra_configure ) ) )
                                        {
                                                createWidgetCreateControl();
                                        }
                                        return locationView;
                                }

                        });
                locationTab.setIndicator(getString(R.string.widget_location));

                tabHost.addTab(locationTab);

createLocationTab is a simple function that creates a basic scroll
view with 1 text view and 1 button. Location view is a class member
variable that holds the view that createLocationTabs creates. When I
try to create a widget though it crashes periodically.

The ddms log says it's a null pointer exception on line 292 of
TabHost.java. I checked the android source and it seems that current
view is null. Does anyone know what would cause this crash?

-- 

2. how to capture key events with a window-less activity

You can't forward events from one window to another.






> 

3. How can I enable the voice recognition on android phone?

4. Can other applications use the share function of "Facebook for Android"?

5. Saving service killing without "startForeground"

6. wvga854 avd screen size problem?

7. Who do you consider as the Android mobile Apps developers Guru ?