Layout 什么是;isrtl&&;1“;什么意思?

Layout 什么是;isrtl&&;1“;什么意思?,layout,integer,boolean,Layout,Integer,Boolean,在ConstraintLayout中,有以下代码: protected boolean isRtl() { if (android.os.Build.VERSION.SDK_INT >= 17) { boolean isRtlSupported = (this.getContext().getApplicationInfo().flags & 4194304) != 0; return isRtlSupported && 1

在ConstraintLayout中,有以下代码:

protected boolean isRtl() {
    if (android.os.Build.VERSION.SDK_INT >= 17) {
        boolean isRtlSupported = (this.getContext().getApplicationInfo().flags & 4194304) != 0;
        return isRtlSupported && 1 == this.getLayoutDirection();
    } else {
        return false;
    }
}
我将其复制到我的自定义布局中,Android Studio无法读取&&1中的“1”。
为什么布尔值可以&&a int?

对不起,应该这样理解

return isRtlSupported && (1 == this.getLayoutDirection());
这里1被View.LAYOUT\u DIRECTION\u RTL代替,效果很好。 i、 e

在哪里

in View.java

在LayoutDirection.java中

return isRtlSupported && (View.LAYOUT_DIRECTION_RTL == this.getLayoutDirection());
public static final int LAYOUT_DIRECTION_RTL = LayoutDirection.RTL;
public static final int RTL = 1;