screen - Wrong alignment share menu -


i have app share option in action bar show displaced right. part of options go off-screen. have checked everything... no result

my menu.xml is:

    <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" >    <item android:id="@+id/menu_share"       android:showasaction="ifroom"       android:title="@string/action_share"       android:actionproviderclass="android.widget.shareactionprovider" />      <item android:title="@string/otras_apps" android:id="@+id/otras_apps"></item>     <item android:title="@string/acerca" android:id="@+id/acerca"></item>     <item android:title="@string/rate" android:id="@+id/rate"></item>     <item android:title="@string/salir" android:id="@+id/salir"></item> </menu> 

my code dealing menu is:

public class fartsound extends activity implements oninitlistener {       public  mediaplayer mediaplayer;      private shareactionprovider mshareactionprovider;     //definición del menú en menu.xml     @override     public boolean oncreateoptionsmenu(menu menu){          /** inflating current activity's menu res/menu/items.xml */         getmenuinflater().inflate(r.menu.menu, menu);          /** getting actionprovider associated menu item id share */         mshareactionprovider = (shareactionprovider) menu.finditem(r.id.menu_share).getactionprovider();          /** setting share intent */         mshareactionprovider.setshareintent(getdefaultshareintent());          return super.oncreateoptionsmenu(menu);      }       /** returns share intent */      private intent getdefaultshareintent(){          intent intent = new intent(intent.action_send);          intent.settype("text/plain");          intent.putextra(intent.extra_subject, getstring(r.string.subject1));          intent.putextra(intent.extra_text, getstring(r.string.extra_text1));          return intent;      }      //lo que hace cada opción del menu     @override     public boolean onoptionsitemselected(menuitem item) {         // handle item selection         switch (item.getitemid()) {             case r.id.otras_apps:                 startactivity(new intent(action_view, uri.parse("https://play.google.com/store/apps/developer?id=pedro+santangelo") ) );                 return true;             case r.id.rate:                 startactivity(new intent(action_view, uri.parse("https://play.google.com/store/apps/details?id=com.fart.sound") ) );                 return true;             case r.id.salir:                 flurryagent.onendsession(this);                 this.finish();                 return true;             case r.id.acerca:                 alertdialog builder;                 try {                     builder = aboutdialogbuilder.create(this);                     builder.show();                 } catch (namenotfoundexception e) {                     // todo auto-generated catch block                     e.printstacktrace();                 }              default:                 return super.onoptionsitemselected(item);         }     } 

another side effect seeing sharing options not scrollable when device in portrait mode, scrollable when in landscape orientation.

could give me hand this?

enter image description here

i have found solution

i had in androidmanifest.xml

 <supports-screens         android:anydensity="false"         android:largescreens="true"         android:normalscreens="true"         android:resizeable="true"         android:smallscreens="true"/> 

after eliminating this... goes ok


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -