shareactionprovider

I Use ShareActionProvider in PopupMenu, but show two PopupMenu?

允我心安 提交于 2019-12-04 05:19:10
I use a ShareActionProvider in a PopupMenu, but when I click the share menu item, it shows two PopupMenus on the screen, one covered by the other. And one shows the application icon and name, the other one only shows the application name. It works fine except this problem... How can I fix it? P.S.: please forgive me for my bad expression My code is: PopupMenu popup = new PopupMenu(this, button); popup.getMenuInflater().inflate(R.menu.scrawl_popup_menu, popup.getMenu()); MenuItem overflowItem = popup.getMenu().findItem(R.id.popup_share); ShareActionProvider overflowProvider =

ShareActionProvider with a split ActionBar

巧了我就是萌 提交于 2019-12-03 22:36:46
I'm using a ShareActionProvider and would like to take advantage of the split ActionBar when there isn't enough room for it at the top - android:uiOptions="splitActionBarWhenNarrow" . The action works fine when the ActionBar does not need to split: However when the ActionBar does need to split, the ActionProvider seems to break the lower ActionBar layout completely. It fills the entire viewport below the top ActionBar and the action itself does not appear: Has anyone been able to use these two features together successfully? This has been fixed in the dev branch of ActionBarSherlock- https:/

ShareActionProvider not clickable and not rendering properly on first render

夙愿已清 提交于 2019-12-03 17:25:04
问题 I have a ShareActionProvider together with some other options in my ActionBar. It seems however that the ShareActionProvider has problems rendering properly when first rendered in portrait mode and it is not clickable on the first render. An orientation change re-renders the screen and then all the options that are supposed to be visible are visible and when rotating back the ActionBar re-renders again but this time it is rendering properly in portrait mode as well. I've attached an image

Get image uri from picasso?

末鹿安然 提交于 2019-12-03 10:28:57
I have a fairly large list of image URL's that I'm using to load up a ViewPager using Picasso. I need to be able to provide sharing capabilities for these images via an intent (ultimately sharing via ShareActionProvider ). From what I've read, Picasso isn't really built to handle this sort of thing out of the box, though it provides all the necessary tools to do so. My plan before research was to create a simple LruCache which uses the url as the key and bitmap value. This caching would occur in onBitmapLoaded via Picasso's Target interface. Whenever I want to share an image, I'll check the

Whats the use of app namespace in android xml

时光总嘲笑我的痴心妄想 提交于 2019-12-03 06:44:31
Below is the code of a menu being displayed in an activity(DetailFragment.xml of Sunshine udacity android course) I could not understand why two different namespaces are needed below. Why cant I use the namespace android: instead of app: In below xml part when I replace app:actionProviderClass="android.support.v7.widget.ShareActionProvider" with app:actionProviderClass="android.widget.ShareActionProvider" It seemed to give some assignment error, but works fine if app is changed to android as below android:actionProviderClass="android.widget.ShareActionProvider" I am not able to understand what

ShareActionProvider not clickable and not rendering properly on first render

ⅰ亾dé卋堺 提交于 2019-12-03 06:17:28
I have a ShareActionProvider together with some other options in my ActionBar. It seems however that the ShareActionProvider has problems rendering properly when first rendered in portrait mode and it is not clickable on the first render. An orientation change re-renders the screen and then all the options that are supposed to be visible are visible and when rotating back the ActionBar re-renders again but this time it is rendering properly in portrait mode as well. I've attached an image that describes the situation: The Share option is not properly rendered, it should have an icon next to it

ShareActionProvider is null

会有一股神秘感。 提交于 2019-12-03 04:07:20
I have been searching for 3 or 4 days about a solution on this. I have tried: Null Pointer exception in using support library share action provider or why MenuItemCompat.getActionProvider returns null? and some others but still I get null on ShareActionProvider. I am pretty new on developing android apps so I really need some help. My xml menu file is: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:id="@+id/action_share" android:title="@string/action_share" app:showAsAction="always" android:icon="@android

Android setShareIntent within fragment

一曲冷凌霜 提交于 2019-12-02 12:14:36
问题 1. Background I have a screen that has a ShareActionProvider and a ViewPager that uses fragments. What I was hoping to do was get some information from inside the currently visible fragment to create an intent, I would then be able to set the intent on the ShareActionProvider. This is the code I use to set the intent of the ShareActionProvider: MenuItem actionItem = men.getMenu().findItem(R.id.menu_item_share_action_provider_action_bar); ShareActionProvider actionProvider =

Android setShareIntent within fragment

北战南征 提交于 2019-12-02 05:56:03
1. Background I have a screen that has a ShareActionProvider and a ViewPager that uses fragments. What I was hoping to do was get some information from inside the currently visible fragment to create an intent, I would then be able to set the intent on the ShareActionProvider. This is the code I use to set the intent of the ShareActionProvider: MenuItem actionItem = men.getMenu().findItem(R.id.menu_item_share_action_provider_action_bar); ShareActionProvider actionProvider = (ShareActionProvider) actionItem.getActionProvider(); actionProvider.setShareIntent(createShareIntent(mProduct.mProduct))

Size of ShareAction icon issue on ActionBar with ShareActionProvider-v7

本小妞迷上赌 提交于 2019-12-01 03:16:49
I was working around my old ShareAction on my ActionBar and it was working since I updated my Packages on SDK Manager . I saw this doc from Google which says, To add a "share" action to your activity, put a ShareActionProvider in the app bar's menu resource. For example: And I've added the same without adding any Icons : <item android:id="@+id/action_share" android:title="@string/share" app:showAsAction="ifRoom" app:actionProviderClass="android.support.v7.widget.ShareActionProvider"/> I was using: app:actionProviderClass="Mypackagename.ShareActionProvider" With a custom ShareActionProvider