Questions tagged [shareactionprovider]

This is a provider for a share action.

This is a provider for a share action.
It is responsible for creating views that enable data sharing and also to show a sub menu with sharing activities if the hosting item is placed on the overflow menu.

Reference page: http://developer.android.com/reference/android/widget/ShareActionProvider.html

163 questions
59
votes
8 answers

Unable to cast Action Provider to Share Action Provider

Below is the code for my Activity import android.app.Activity; import android.os.Bundle; import android.support.v7.widget.ShareActionProvider; import android.view.Menu; import android.view.MenuItem; public class…
Anuranjit Maindola
  • 1,507
  • 1
  • 14
  • 30
27
votes
8 answers

How do you turn off share history when using ShareActionProvider?

The new ShareActionProvider available in Android 4.0 (or in earlier versions if you're using ActionBarSherlock) has a feature where the last used item is displayed in the action bar. Is there anyway to turn this off?
19
votes
3 answers

ShareActionProvider with a split ActionBar

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…
16
votes
1 answer

Get image uri from picasso?

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,…
loeschg
  • 29,961
  • 26
  • 97
  • 150
15
votes
5 answers

Setting a custom share icon on Actionbar ShareActionProvider

I'm trying to set the icon ShareActionProvider, need a solid white one instead of the semi transparent white one. However setting in share_menu.xml and code doesn't work. Just wondering whether anyone has got workaround for this before extending…
scottyab
  • 23,621
  • 16
  • 94
  • 105
13
votes
3 answers

Null Pointer exception in using support library share action provider

Below is the code of my Activity . In this I am using the support library appcompat import android.content.Intent; import android.os.Bundle; import android.support.v4.view.MenuItemCompat; import…
Anuranjit Maindola
  • 1,507
  • 1
  • 14
  • 30
11
votes
4 answers

Size of ShareAction icon issue on ActionBar with ShareActionProvider-v7

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…
11
votes
3 answers

How to hide the share action (which use most) icon near the share action provider?

See the picture. How can i hide the icon "P" which means share to Pinterest? They are both on the action bar and I use ActionBarSherlock.
11
votes
3 answers

ShareActionProvider refresh text

I have an EditText which is initially filled with text from the local db. When the user leaves the screen (onPause), the updated text is stored in the local db. I also have a ShareActionProvider (using ActionBarSherlock). When the user uses the…
11
votes
4 answers

ShareActionProvider not clickable and not rendering properly on first render

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…
span
  • 5,405
  • 9
  • 57
  • 115
10
votes
1 answer

Cannot cast from ActionProvider to ShareActionProvider

I am trying to implement a ShareActionProvider in my ActionBarSherlock. The following code gives me this error : Cannot cast from ActionProvider to ShareActionProvider ReadingActivity.java @Override public boolean…
user1361491
9
votes
1 answer

Share image with ShareActionProvider from Picasso

i spand few hours to find this solution... so i decided to share this informatiom, maybe some one itwill helpful :) The first way, shown below, takes the bitmap from the view and loads it into a file. // Get access to ImageView ImageView ivImage =…
Stan Malcolm
  • 2,740
  • 5
  • 32
  • 53
8
votes
3 answers

Whats the use of app namespace in android xml

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…
Chetan Gowda
  • 390
  • 6
  • 15
8
votes
1 answer

Using ShareActionProvider with Button in Layout

I have a layout with a Button. Upon click of the button, I should be able to get the same functionality of the 'Action bar Share button'(which we can implemented using ShareActionProvider). Tried looking for an example in web ; but could not find…
Raj
  • 2,368
  • 6
  • 34
  • 52
8
votes
1 answer

ShareActionProvider does not work when showAsAction=ifRoom

I'm creating a small application and tried to provide a Share button on the ActionBar. The relevant code looks as below: Manifest Menu Item
jobinbasani
  • 2,075
  • 6
  • 47
  • 66
1
2 3
10 11