Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d95b500 authored by Deepanshu Gupta's avatar Deepanshu Gupta Committed by Android (Google) Code Review
Browse files

Merge "Action bar rendering in layoutlib"

parents 111db01a 14bf0cef
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);
        if (!activityChooserView.isInEditMode()) {
            ActivityChooserModel dataModel = ActivityChooserModel.get(mContext, mShareHistoryFileName);
            activityChooserView.setActivityChooserModel(dataModel);
        }

        // Lookup and set the expand action icon.
        TypedValue outTypedValue = new TypedValue();
+12 −3
Original line number Diff line number Diff line
@@ -170,6 +170,15 @@ public class WindowDecorActionBar extends ActionBar {
        init(dialog.getWindow().getDecorView());
    }

    /**
     * Only for edit mode.
     * @hide
     */
    public WindowDecorActionBar(View layout) {
        assert layout.isInEditMode();
        init(layout);
    }

    private void init(View decor) {
        mOverlayLayout = (ActionBarOverlayLayout) decor.findViewById(
                com.android.internal.R.id.action_bar_overlay_layout);
@@ -559,8 +568,8 @@ public class WindowDecorActionBar extends ActionBar {
            return;
        }

        final FragmentTransaction trans = mActivity.getFragmentManager().beginTransaction()
                .disallowAddToBackStack();
        final FragmentTransaction trans = mActionView.isInEditMode() ? null :
                mActivity.getFragmentManager().beginTransaction().disallowAddToBackStack();

        if (mSelectedTab == tab) {
            if (mSelectedTab != null) {
@@ -578,7 +587,7 @@ public class WindowDecorActionBar extends ActionBar {
            }
        }

        if (!trans.isEmpty()) {
        if (trans != null && !trans.isEmpty()) {
            trans.commit();
        }
    }
+3 −4
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
    <include layout="@android:layout/action_bar_home" />
    <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

<include layout="@android:layout/screen_action_bar" />

</merge>
+2 −1
Original line number Diff line number Diff line
@@ -215,7 +215,8 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge {
                Capability.ADAPTER_BINDING,
                Capability.EXTENDED_VIEWINFO,
                Capability.FIXED_SCALABLE_NINE_PATCH,
                Capability.RTL);
                Capability.RTL,
                Capability.ACTION_BAR);


        BridgeAssetManager.initSystem();
+5 −0
Original line number Diff line number Diff line
@@ -63,6 +63,11 @@ public class BridgeRenderSession extends RenderSession {
        return mSession.getViewInfos();
    }

    @Override
    public List<ViewInfo> getSystemRootViews() {
        return mSession.getSystemViewInfos();
    }

    @Override
    public Map<String, String> getDefaultProperties(Object viewObject) {
        return mSession.getDefaultProperties(viewObject);
Loading