Action bar rendering in layoutlib [DO NOT MERGE]
This also makes a couple of changes to the framework:
1. ShareActionProvider - Use edit mode to execute activity chooser code.
2. ActionBarImpl - add a new constructor for use by layoutlib.
This also relies on some changes to the plugin to pass the correct params.
Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
(cherry-picked from 20e0695b55)
This commit is contained in:
@@ -161,9 +161,11 @@ public class ShareActionProvider extends ActionProvider {
|
||||
@Override
|
||||
public View onCreateActionView() {
|
||||
// Create the view and set its data model.
|
||||
ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
|
||||
ActivityChooserView activityChooserView = new ActivityChooserView(mContext);
|
||||
activityChooserView.setActivityChooserModel(dataModel);
|
||||
if (!activityChooserView.isInEditMode()) {
|
||||
ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
|
||||
activityChooserView.setActivityChooserModel(dataModel);
|
||||
}
|
||||
|
||||
// Lookup and set the expand action icon.
|
||||
TypedValue outTypedValue = new TypedValue();
|
||||
|
||||
Reference in New Issue
Block a user