本文整理汇总了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;
}
}
示例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);
}
示例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();
}
}
示例4: toString
@Override
public String toString() {
if (Utilities.ATLEAST_JB_MR1) {
return mUser.toString();
} else {
return "";
}
}
示例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;
}
}
示例6: hashCode
@Override
public int hashCode() {
if (Utilities.ATLEAST_JB_MR1) {
return mUser.hashCode();
} else {
return 0;
}
}
示例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);
}
}
示例8: getDensity
private static int getDensity(Configuration config) {
return Utilities.ATLEAST_JB_MR1 ? config.densityDpi : 0;
}