Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/AppCompatActionBar.java +3 −3 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ public class AppCompatActionBar extends BridgeActionBar { View contentView = getDecorContent().findViewById(contentRootId); if (contentView != null) { assert contentView instanceof FrameLayout; setContentRoot(((FrameLayout) contentView)); setContentRoot((FrameLayout) contentView); } else { // Something went wrong. Create a new FrameLayout in the enclosing layout. FrameLayout contentRoot = new FrameLayout(context); Loading Loading @@ -104,8 +104,8 @@ public class AppCompatActionBar extends BridgeActionBar { protected void setIcon(String icon) { // Do this only if the action bar doesn't already have an icon. if (icon != null && !icon.isEmpty() && mWindowDecorActionBar != null) { if (((Boolean) invoke(getMethod(mWindowActionBarClass, "hasIcon"), mWindowDecorActionBar) )) { if (invoke(getMethod(mWindowActionBarClass, "hasIcon"), mWindowDecorActionBar) == Boolean.TRUE) { Drawable iconDrawable = getDrawable(icon, false); if (iconDrawable != null) { Method setIcon = getMethod(mWindowActionBarClass, "setIcon", Drawable.class); Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/BridgeActionBar.java +2 −1 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ public abstract class BridgeActionBar { private final View mDecorContent; private final ActionBarCallback mCallback; @SuppressWarnings("NullableProblems") // Should be initialized by subclasses. @NonNull private FrameLayout mContentRoot; public BridgeActionBar(@NonNull BridgeContext context, @NonNull SessionParams params, Loading Loading @@ -91,7 +92,7 @@ public abstract class BridgeActionBar { */ protected abstract ResourceValue getLayoutResource(BridgeContext context); protected void setContentRoot(FrameLayout contentRoot) { protected void setContentRoot(@NonNull FrameLayout contentRoot) { mContentRoot = contentRoot; } Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java +1 −2 Original line number Diff line number Diff line Loading @@ -1117,8 +1117,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { } } else { // action bar overrides title bar so only look for this one if action bar is hidden boolean windowNoTitle = getBooleanThemeValue(resources, "windowNoTitle", false, !isThemeAppCompat(resources)); boolean windowNoTitle = getBooleanThemeValue(resources, "windowNoTitle", false, true); if (!windowNoTitle) { Loading Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/AppCompatActionBar.java +3 −3 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ public class AppCompatActionBar extends BridgeActionBar { View contentView = getDecorContent().findViewById(contentRootId); if (contentView != null) { assert contentView instanceof FrameLayout; setContentRoot(((FrameLayout) contentView)); setContentRoot((FrameLayout) contentView); } else { // Something went wrong. Create a new FrameLayout in the enclosing layout. FrameLayout contentRoot = new FrameLayout(context); Loading Loading @@ -104,8 +104,8 @@ public class AppCompatActionBar extends BridgeActionBar { protected void setIcon(String icon) { // Do this only if the action bar doesn't already have an icon. if (icon != null && !icon.isEmpty() && mWindowDecorActionBar != null) { if (((Boolean) invoke(getMethod(mWindowActionBarClass, "hasIcon"), mWindowDecorActionBar) )) { if (invoke(getMethod(mWindowActionBarClass, "hasIcon"), mWindowDecorActionBar) == Boolean.TRUE) { Drawable iconDrawable = getDrawable(icon, false); if (iconDrawable != null) { Method setIcon = getMethod(mWindowActionBarClass, "setIcon", Drawable.class); Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/BridgeActionBar.java +2 −1 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ public abstract class BridgeActionBar { private final View mDecorContent; private final ActionBarCallback mCallback; @SuppressWarnings("NullableProblems") // Should be initialized by subclasses. @NonNull private FrameLayout mContentRoot; public BridgeActionBar(@NonNull BridgeContext context, @NonNull SessionParams params, Loading Loading @@ -91,7 +92,7 @@ public abstract class BridgeActionBar { */ protected abstract ResourceValue getLayoutResource(BridgeContext context); protected void setContentRoot(FrameLayout contentRoot) { protected void setContentRoot(@NonNull FrameLayout contentRoot) { mContentRoot = contentRoot; } Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java +1 −2 Original line number Diff line number Diff line Loading @@ -1117,8 +1117,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { } } else { // action bar overrides title bar so only look for this one if action bar is hidden boolean windowNoTitle = getBooleanThemeValue(resources, "windowNoTitle", false, !isThemeAppCompat(resources)); boolean windowNoTitle = getBooleanThemeValue(resources, "windowNoTitle", false, true); if (!windowNoTitle) { Loading