[android-developers] Re: Menu Not Showing
Thanks!! I haven't thought about this solution... Works like a charm!! On Wednesday, July 24, 2013 2:30:51 PM UTC+2, Piren wrote: > > instead of trying to somehow trick the system to duplicate the same menu > item, just add those yourself. > keep the ones you want to show as icons as you do them now (but better yet > use "always" to prevent from the duplicate to show in the overflow menu,), > then add copies of those to the menu with "never". > > > > > On Wednesday, July 24, 2013 2:07:02 PM UTC+3, Felix Garcia Lainez wrote: >> >> BTW, if I set some menu item property to android:showAsAction="never" then >> it is shown in overflow menu (It is the expected behavior). What I don't >> know if it is very standard or possible is to show all actions in overflow >> menu and actionbar buttons independently of the number of items, etc >> >> On Wednesday, July 24, 2013 10:00:01 AM UTC+2, Piren wrote: >>> >>> everything you need to know is here: >>> http://developer.android.com/guide/topics/ui/menus.html >>> >>> On Tuesday, July 23, 2013 9:45:39 PM UTC+3, Felix Garcia Lainez wrote: Hi, The case is that I have several activities in which I use actionbar successfully, showing different actions on top (with icons), but when I click on menu key (galaxy s4) then the menu options is not shown... I don't know really if this is the desired behavior but I would like to have both available, as in my device I can't see long texts on action bar options... I am creating the menu in the following way (I have also other menus in other activities created with onPrepareOptionsMenu) @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.my_menu, menu); //super.onCreateOptionsMenu(menu); return true; } And the content of my_menu is this http://schemas.android.com/apk/res/android";> >>> android:icon="@drawable/ic_menu_save" android:title="@string/menu_save" android:showAsAction="ifRoom"/> What I have found is that if I add more items to the menu (4 or 5) then it works... Am I missing something? Is this the desired behavior? If it is the case, how could I take advantage of showing both kind of menus? Thanks! -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Menu Not Showing
instead of trying to somehow trick the system to duplicate the same menu item, just add those yourself. keep the ones you want to show as icons as you do them now (but better yet use "always" to prevent from the duplicate to show in the overflow menu,), then add copies of those to the menu with "never". On Wednesday, July 24, 2013 2:07:02 PM UTC+3, Felix Garcia Lainez wrote: > > BTW, if I set some menu item property to android:showAsAction="never" then > it is shown in overflow menu (It is the expected behavior). What I don't > know if it is very standard or possible is to show all actions in overflow > menu and actionbar buttons independently of the number of items, etc > > On Wednesday, July 24, 2013 10:00:01 AM UTC+2, Piren wrote: >> >> everything you need to know is here: >> http://developer.android.com/guide/topics/ui/menus.html >> >> On Tuesday, July 23, 2013 9:45:39 PM UTC+3, Felix Garcia Lainez wrote: >>> >>> Hi, >>> >>> The case is that I have several activities in which I use actionbar >>> successfully, showing different actions on top (with icons), but when I >>> click on menu key (galaxy s4) then the menu options is not shown... I don't >>> know really if this is the desired behavior but I would like to have both >>> available, as in my device I can't see long texts on action bar options... >>> >>> I am creating the menu in the following way (I have also other menus in >>> other activities created with onPrepareOptionsMenu) >>> >>> @Override >>> >>> public boolean onCreateOptionsMenu(Menu menu) >>> >>> { >>> >>> MenuInflater inflater = getMenuInflater(); >>> >>> inflater.inflate(R.menu.my_menu, menu); >>> >>> //super.onCreateOptionsMenu(menu); >>> >>> return true; >>> >>> } >>> >>> >>> And the content of my_menu is this >>> >>> >>> >>> >>> http://schemas.android.com/apk/res/android";> >>> >>> >> >>> android:icon="@drawable/ic_menu_save" >>> >>> android:title="@string/menu_save" >>> >>> android:showAsAction="ifRoom"/> >>> >>> >>> >>> >>> >>> What I have found is that if I add more items to the menu (4 or 5) then >>> it works... >>> >>> >>> Am I missing something? Is this the desired behavior? If it is the case, >>> how could I take advantage of showing both kind of menus? >>> >>> >>> Thanks! >>> >>> >>> -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Menu Not Showing
BTW, if I set some menu item property to android:showAsAction="never" then it is shown in overflow menu (It is the expected behavior). What I don't know if it is very standard or possible is to show all actions in overflow menu and actionbar buttons independently of the number of items, etc On Wednesday, July 24, 2013 10:00:01 AM UTC+2, Piren wrote: > > everything you need to know is here: > http://developer.android.com/guide/topics/ui/menus.html > > On Tuesday, July 23, 2013 9:45:39 PM UTC+3, Felix Garcia Lainez wrote: >> >> Hi, >> >> The case is that I have several activities in which I use actionbar >> successfully, showing different actions on top (with icons), but when I >> click on menu key (galaxy s4) then the menu options is not shown... I don't >> know really if this is the desired behavior but I would like to have both >> available, as in my device I can't see long texts on action bar options... >> >> I am creating the menu in the following way (I have also other menus in >> other activities created with onPrepareOptionsMenu) >> >> @Override >> >> public boolean onCreateOptionsMenu(Menu menu) >> >> { >> >> MenuInflater inflater = getMenuInflater(); >> >> inflater.inflate(R.menu.my_menu, menu); >> >> //super.onCreateOptionsMenu(menu); >> >> return true; >> >> } >> >> >> And the content of my_menu is this >> >> >> >> >> http://schemas.android.com/apk/res/android";> >> >> > >> android:icon="@drawable/ic_menu_save" >> >> android:title="@string/menu_save" >> >> android:showAsAction="ifRoom"/> >> >> >> >> >> >> What I have found is that if I add more items to the menu (4 or 5) then >> it works... >> >> >> Am I missing something? Is this the desired behavior? If it is the case, >> how could I take advantage of showing both kind of menus? >> >> >> Thanks! >> >> >> -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Menu Not Showing
Yes, I have read but still have this doubt. Also read actionbar guide and I didn't see any reference to this specific issue... Please could you give me a response? Thanks so much! On Wednesday, July 24, 2013 10:00:01 AM UTC+2, Piren wrote: > > everything you need to know is here: > http://developer.android.com/guide/topics/ui/menus.html > > On Tuesday, July 23, 2013 9:45:39 PM UTC+3, Felix Garcia Lainez wrote: >> >> Hi, >> >> The case is that I have several activities in which I use actionbar >> successfully, showing different actions on top (with icons), but when I >> click on menu key (galaxy s4) then the menu options is not shown... I don't >> know really if this is the desired behavior but I would like to have both >> available, as in my device I can't see long texts on action bar options... >> >> I am creating the menu in the following way (I have also other menus in >> other activities created with onPrepareOptionsMenu) >> >> @Override >> >> public boolean onCreateOptionsMenu(Menu menu) >> >> { >> >> MenuInflater inflater = getMenuInflater(); >> >> inflater.inflate(R.menu.my_menu, menu); >> >> //super.onCreateOptionsMenu(menu); >> >> return true; >> >> } >> >> >> And the content of my_menu is this >> >> >> >> >> http://schemas.android.com/apk/res/android";> >> >> > >> android:icon="@drawable/ic_menu_save" >> >> android:title="@string/menu_save" >> >> android:showAsAction="ifRoom"/> >> >> >> >> >> >> What I have found is that if I add more items to the menu (4 or 5) then >> it works... >> >> >> Am I missing something? Is this the desired behavior? If it is the case, >> how could I take advantage of showing both kind of menus? >> >> >> Thanks! >> >> >> -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Menu Not Showing
everything you need to know is here: http://developer.android.com/guide/topics/ui/menus.html On Tuesday, July 23, 2013 9:45:39 PM UTC+3, Felix Garcia Lainez wrote: > > Hi, > > The case is that I have several activities in which I use actionbar > successfully, showing different actions on top (with icons), but when I > click on menu key (galaxy s4) then the menu options is not shown... I don't > know really if this is the desired behavior but I would like to have both > available, as in my device I can't see long texts on action bar options... > > I am creating the menu in the following way (I have also other menus in > other activities created with onPrepareOptionsMenu) > > @Override > > public boolean onCreateOptionsMenu(Menu menu) > > { > > MenuInflater inflater = getMenuInflater(); > > inflater.inflate(R.menu.my_menu, menu); > > //super.onCreateOptionsMenu(menu); > > return true; > > } > > > And the content of my_menu is this > > > > > http://schemas.android.com/apk/res/android";> > > > android:icon="@drawable/ic_menu_save" > > android:title="@string/menu_save" > > android:showAsAction="ifRoom"/> > > > > > > What I have found is that if I add more items to the menu (4 or 5) then it > works... > > > Am I missing something? Is this the desired behavior? If it is the case, > how could I take advantage of showing both kind of menus? > > > Thanks! > > > -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.