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:allowBackup="true"
|
||||||
android:backupAgent=".util.PrefsBackupAgent"
|
android:backupAgent=".util.PrefsBackupAgent"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
|
android:uiOptions="splitActionBarWhenNarrow"
|
||||||
android:icon="@drawable/icon"
|
android:icon="@drawable/icon"
|
||||||
android:label="@string/app_name" >
|
android:label="@string/app_name" >
|
||||||
<activity
|
<activity
|
||||||
@ -23,12 +24,10 @@
|
|||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:uiOptions="splitActionBarWhenNarrow"
|
|
||||||
android:name=".offline.OfflineActivity" >
|
android:name=".offline.OfflineActivity" >
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:uiOptions="splitActionBarWhenNarrow"
|
|
||||||
android:name=".MainActivity" >
|
android:name=".MainActivity" >
|
||||||
<intent-filter >
|
<intent-filter >
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
<item
|
<item
|
||||||
android:id="@+id/share_article"
|
android:id="@+id/share_article"
|
||||||
android:icon="@android:drawable/ic_menu_share"
|
android:icon="@android:drawable/ic_menu_share"
|
||||||
android:showAsAction="ifRoom"
|
android:showAsAction=""
|
||||||
android:actionProviderClass="android.widget.ShareActionProvider"
|
android:actionProviderClass="android.widget.ShareActionProvider"
|
||||||
android:title="@string/share_article"/>
|
android:title="@string/share_article"/>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
android:id="@+id/share_article"
|
android:id="@+id/share_article"
|
||||||
android:actionProviderClass="android.widget.ShareActionProvider"
|
android:actionProviderClass="android.widget.ShareActionProvider"
|
||||||
android:icon="@android:drawable/ic_menu_share"
|
android:icon="@android:drawable/ic_menu_share"
|
||||||
android:showAsAction="ifRoom"
|
android:showAsAction=""
|
||||||
android:title="@string/share_article"/>
|
android:title="@string/share_article"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/set_unread"
|
android:id="@+id/set_unread"
|
||||||
|
@ -1509,6 +1509,9 @@ public class MainActivity extends CommonActivity implements OnlineServices {
|
|||||||
if (m_selectedArticle != null) {
|
if (m_selectedArticle != null) {
|
||||||
Log.d(TAG, "setting up share provider");
|
Log.d(TAG, "setting up share provider");
|
||||||
shareProvider.setShareIntent(getShareIntent(m_selectedArticle));
|
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) {
|
if (m_selectedArticleId != 0) {
|
||||||
Log.d(TAG, "setting up share provider");
|
Log.d(TAG, "setting up share provider");
|
||||||
shareProvider.setShareIntent(getShareIntent(getArticleById(m_selectedArticleId)));
|
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