本文整理汇总了Java中com.afollestad.materialdialogs.GravityEnum.END属性的典型用法代码示例。如果您正苦于以下问题:Java GravityEnum.END属性的具体用法?Java GravityEnum.END怎么用?Java GravityEnum.END使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.afollestad.materialdialogs.GravityEnum
的用法示例。
在下文中一共展示了GravityEnum.END属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveGravityEnum
public static GravityEnum resolveGravityEnum(Context context,
@AttrRes int attr,
GravityEnum defaultGravity) {
TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
try {
switch (a.getInt(0, gravityEnumToAttrInt(defaultGravity))) {
case 1:
return GravityEnum.CENTER;
case 2:
return GravityEnum.END;
default:
return GravityEnum.START;
}
} finally {
a.recycle();
}
}
示例2: invertGravityIfNecessary
private void invertGravityIfNecessary() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
return;
}
Configuration config = getResources().getConfiguration();
if (config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
switch (buttonGravity) {
case START:
buttonGravity = GravityEnum.END;
break;
case END:
buttonGravity = GravityEnum.START;
break;
}
}
}
示例3: resolveGravityEnum
public static GravityEnum resolveGravityEnum(
Context context, @AttrRes int attr, GravityEnum defaultGravity) {
TypedArray a = context.getTheme().obtainStyledAttributes(new int[] {attr});
try {
switch (a.getInt(0, gravityEnumToAttrInt(defaultGravity))) {
case 1:
return GravityEnum.CENTER;
case 2:
return GravityEnum.END;
default:
return GravityEnum.START;
}
} finally {
a.recycle();
}
}
示例4: invertGravityIfNecessary
private void invertGravityIfNecessary() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) return;
Configuration config = getResources().getConfiguration();
if (config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
switch (buttonGravity) {
case START:
buttonGravity = GravityEnum.END;
break;
case END:
buttonGravity = GravityEnum.START;
break;
}
}
}
示例5: invertGravityIfNecessary
private void invertGravityIfNecessary() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) return;
Configuration config = getResources().getConfiguration();
if (config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
switch (mButtonGravity) {
case START:
mButtonGravity = GravityEnum.END;
break;
case END:
mButtonGravity = GravityEnum.START;
break;
}
}
}
示例6: resolveGravityEnum
public static GravityEnum resolveGravityEnum(Context context, @AttrRes int attr, GravityEnum defaultGravity) {
TypedArray a = context.getTheme().obtainStyledAttributes(new int[]{attr});
try {
switch (a.getInt(0, gravityEnumToAttrInt(defaultGravity))) {
case 1:
return GravityEnum.CENTER;
case 2:
return GravityEnum.END;
default:
return GravityEnum.START;
}
} finally {
a.recycle();
}
}
示例7: init
private void init(Context context) {
stackedEndPadding = context.getResources()
.getDimensionPixelSize(R.dimen.md_dialog_frame_margin);
stackedGravity = GravityEnum.END;
}
示例8: init
private void init(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
mStackedEndPadding = context.getResources()
.getDimensionPixelSize(R.dimen.md_dialog_frame_margin);
mStackedGravity = GravityEnum.END;
}
示例9: init
private void init(Context context) {
stackedEndPadding =
context.getResources().getDimensionPixelSize(R.dimen.md_dialog_frame_margin);
stackedGravity = GravityEnum.END;
}