try to workaround against galaxy nexus going crazy when trying to draw
shareprovider in viewpager with split action bar. thanks, google. (refs #462)
This commit is contained in:
parent
a8c92f2f15
commit
c11a3be88e
@ -15,6 +15,7 @@
|
||||
android:allowBackup="true"
|
||||
android:backupAgent=".util.PrefsBackupAgent"
|
||||
android:hardwareAccelerated="true"
|
||||
android:uiOptions="splitActionBarWhenNarrow"
|
||||
android:icon="@drawable/icon"
|
||||
android:label="@string/app_name" >
|
||||
<activity
|
||||
@ -23,12 +24,10 @@
|
||||
</activity>
|
||||
<activity
|
||||
android:label="@string/app_name"
|
||||
android:uiOptions="splitActionBarWhenNarrow"
|
||||
android:name=".offline.OfflineActivity" >
|
||||
</activity>
|
||||
<activity
|
||||
android:label="@string/app_name"
|
||||
android:uiOptions="splitActionBarWhenNarrow"
|
||||
android:label="@string/app_name"
|
||||
android:name=".MainActivity" >
|
||||
<intent-filter >
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
@ -108,7 +108,7 @@
|
||||
<item
|
||||
android:id="@+id/share_article"
|
||||
android:icon="@android:drawable/ic_menu_share"
|
||||
android:showAsAction="ifRoom"
|
||||
android:showAsAction=""
|
||||
android:actionProviderClass="android.widget.ShareActionProvider"
|
||||
android:title="@string/share_article"/>
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
||||
android:id="@+id/share_article"
|
||||
android:actionProviderClass="android.widget.ShareActionProvider"
|
||||
android:icon="@android:drawable/ic_menu_share"
|
||||
android:showAsAction="ifRoom"
|
||||
android:showAsAction=""
|
||||
android:title="@string/share_article"/>
|
||||
<item
|
||||
android:id="@+id/set_unread"
|
||||
|
@ -1509,6 +1509,9 @@ public class MainActivity extends CommonActivity implements OnlineServices {
|
||||
if (m_selectedArticle != null) {
|
||||
Log.d(TAG, "setting up share provider");
|
||||
shareProvider.setShareIntent(getShareIntent(m_selectedArticle));
|
||||
|
||||
// seems to be needed because galaxy nexus craps out if that item is initially visible as action in XML
|
||||
m_menu.findItem(R.id.share_article).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -923,6 +923,9 @@ public class OfflineActivity extends CommonActivity implements
|
||||
if (m_selectedArticleId != 0) {
|
||||
Log.d(TAG, "setting up share provider");
|
||||
shareProvider.setShareIntent(getShareIntent(getArticleById(m_selectedArticleId)));
|
||||
|
||||
// seems to be needed because galaxy nexus craps out if that item is initially visible as action in XML
|
||||
m_menu.findItem(R.id.share_article).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user