android - Unable to click on Share button -


i trying unable click share button while button works fine.

i have following code in class extends appcompatactivity :

@override public boolean oncreateoptionsmenu( menu menu ) {      menuinflater inflater = getmenuinflater();      inflater.inflate( r.menu.log_display, menu );      return super.oncreateoptionsmenu( menu );     } 

and

@override public boolean onoptionsitemselected( menuitem item ) {     logger.debug( item.getitemid()+" ==========" );     switch ( item.getitemid() ) {          case android.r.id.home:              super.onbackpressed();              break;          case r.id.menu_item_share:             logger.debug( "menu share item" );              break;          default:             logger.debug( "default in menu" );     } } 

i tried onclicklistener method oncreateoptionsmenu did not work well. ideas ?

edit : xml file

  <?xml version="1.0" encoding="utf-8"?>   <menu xmlns:android="http://schemas.android.com/apk/res/android"   xmlns:app="http://schemas.android.com/apk/res-auto">   <item     android:id="@+id/menu_item_share"     android:title="@string/log_share"     app:showasaction="always"     app:actionproviderclass="android.support.v7.widget.shareactionprovider"     app:popuptheme="@style/theme.appcompat.light.darkactionbar" />     </menu> 

the offending line in menu xml file :

    app:actionproviderclass="android.support.v7.widget.shareactionprovider" 

thanks @darshan kachhadiya


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -