当前位置: 首页>>代码示例>>Java>>正文


Java Utilities.ATLEAST_JB_MR1属性代码示例

本文整理汇总了Java中com.android.launcher3.Utilities.ATLEAST_JB_MR1属性的典型用法代码示例。如果您正苦于以下问题:Java Utilities.ATLEAST_JB_MR1属性的具体用法?Java Utilities.ATLEAST_JB_MR1怎么用?Java Utilities.ATLEAST_JB_MR1使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.android.launcher3.Utilities的用法示例。


在下文中一共展示了Utilities.ATLEAST_JB_MR1属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getInstance

public static UserManagerCompat getInstance(Context context) {
    synchronized (sInstanceLock) {
        if (sInstance == null) {
            if (Utilities.isNycMR1OrAbove()) {
                sInstance = new UserManagerCompatVNMr1(context.getApplicationContext());
            } else if (Utilities.isNycOrAbove()) {
                sInstance = new UserManagerCompatVN(context.getApplicationContext());
            } else if (Utilities.ATLEAST_MARSHMALLOW) {
                sInstance = new UserManagerCompatVM(context.getApplicationContext());
            } else if (Utilities.ATLEAST_LOLLIPOP) {
                sInstance = new UserManagerCompatVL(context.getApplicationContext());
            } else if (Utilities.ATLEAST_JB_MR1) {
                sInstance = new UserManagerCompatV17(context.getApplicationContext());
            } else {
                sInstance = new UserManagerCompatV16();
            }
        }
        return sInstance;
    }
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:20,代码来源:UserManagerCompat.java

示例2: onCreateViewHolder

@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
@Override
public WidgetsRowViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    if (DEBUG) {
        Log.v(TAG, "\nonCreateViewHolder");
    }

    ViewGroup container = (ViewGroup) mLayoutInflater.inflate(
            R.layout.widgets_list_row_view, parent, false);
    LinearLayout cellList = (LinearLayout) container.findViewById(R.id.widgets_cell_list);

    // if the end padding is 0, then container view (horizontal scroll view) doesn't respect
    // the end of the linear layout width + the start padding and doesn't allow scrolling.
    if (Utilities.ATLEAST_JB_MR1) {
        cellList.setPaddingRelative(mIndent, 0, 1, 0);
    } else {
        cellList.setPadding(mIndent, 0, 1, 0);
    }

    return new WidgetsRowViewHolder(container);
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:21,代码来源:WidgetsListAdapter.java

示例3: myUserHandle

@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public static UserHandleCompat myUserHandle() {
    if (Utilities.ATLEAST_JB_MR1) {
        return new UserHandleCompat(android.os.Process.myUserHandle());
    } else {
        return new UserHandleCompat();
    }
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:8,代码来源:UserHandleCompat.java

示例4: toString

@Override
public String toString() {
    if (Utilities.ATLEAST_JB_MR1) {
        return mUser.toString();
    } else {
        return "";
    }
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:8,代码来源:UserHandleCompat.java

示例5: equals

@Override
public boolean equals(Object other) {
    if (!(other instanceof UserHandleCompat)) {
        return false;
    }
    if (Utilities.ATLEAST_JB_MR1) {
        return mUser.equals(((UserHandleCompat) other).mUser);
    } else {
        return true;
    }
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:11,代码来源:UserHandleCompat.java

示例6: hashCode

@Override
public int hashCode() {
    if (Utilities.ATLEAST_JB_MR1) {
        return mUser.hashCode();
    } else {
        return 0;
    }
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:8,代码来源:UserHandleCompat.java

示例7: bindAppWidgetIdIfAllowed

@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
@Override
public boolean bindAppWidgetIdIfAllowed(int appWidgetId, AppWidgetProviderInfo info,
        Bundle options) {
    if (Utilities.ATLEAST_JB_MR1) {
        return mAppWidgetManager.bindAppWidgetIdIfAllowed(appWidgetId, info.provider, options);
    } else {
        return mAppWidgetManager.bindAppWidgetIdIfAllowed(appWidgetId, info.provider);
    }
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:10,代码来源:AppWidgetManagerCompatV16.java

示例8: getDensity

private static int getDensity(Configuration config) {
    return Utilities.ATLEAST_JB_MR1 ? config.densityDpi : 0;
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:3,代码来源:ConfigMonitor.java


注:本文中的com.android.launcher3.Utilities.ATLEAST_JB_MR1属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。