Search in sources :

Example 1 with StyleRes

use of android.annotation.StyleRes in project platform_frameworks_base by android.

the class DatePickerDialog method resolveDialogTheme.

@StyleRes
static int resolveDialogTheme(@NonNull Context context, @StyleRes int themeResId) {
    if (themeResId == 0) {
        final TypedValue outValue = new TypedValue();
        context.getTheme().resolveAttribute(R.attr.datePickerDialogTheme, outValue, true);
        return outValue.resourceId;
    } else {
        return themeResId;
    }
}
Also used : TypedValue(android.util.TypedValue) StyleRes(android.annotation.StyleRes)

Example 2 with StyleRes

use of android.annotation.StyleRes in project android_frameworks_base by crdroidandroid.

the class DatePickerDialog method resolveDialogTheme.

@StyleRes
static int resolveDialogTheme(@NonNull Context context, @StyleRes int themeResId) {
    if (themeResId == 0) {
        final TypedValue outValue = new TypedValue();
        context.getTheme().resolveAttribute(R.attr.datePickerDialogTheme, outValue, true);
        return outValue.resourceId;
    } else {
        return themeResId;
    }
}
Also used : TypedValue(android.util.TypedValue) StyleRes(android.annotation.StyleRes)

Example 3 with StyleRes

use of android.annotation.StyleRes in project android_frameworks_base by DirtyUnicorns.

the class DatePickerDialog method resolveDialogTheme.

@StyleRes
static int resolveDialogTheme(@NonNull Context context, @StyleRes int themeResId) {
    if (themeResId == 0) {
        final TypedValue outValue = new TypedValue();
        context.getTheme().resolveAttribute(R.attr.datePickerDialogTheme, outValue, true);
        return outValue.resourceId;
    } else {
        return themeResId;
    }
}
Also used : TypedValue(android.util.TypedValue) StyleRes(android.annotation.StyleRes)

Example 4 with StyleRes

use of android.annotation.StyleRes in project android_frameworks_base by AOSPA.

the class DatePickerDialog method resolveDialogTheme.

@StyleRes
static int resolveDialogTheme(@NonNull Context context, @StyleRes int themeResId) {
    if (themeResId == 0) {
        final TypedValue outValue = new TypedValue();
        context.getTheme().resolveAttribute(R.attr.datePickerDialogTheme, outValue, true);
        return outValue.resourceId;
    } else {
        return themeResId;
    }
}
Also used : TypedValue(android.util.TypedValue) StyleRes(android.annotation.StyleRes)

Example 5 with StyleRes

use of android.annotation.StyleRes in project android_frameworks_base by ResurrectionRemix.

the class DatePickerDialog method resolveDialogTheme.

@StyleRes
static int resolveDialogTheme(@NonNull Context context, @StyleRes int themeResId) {
    if (themeResId == 0) {
        final TypedValue outValue = new TypedValue();
        context.getTheme().resolveAttribute(R.attr.datePickerDialogTheme, outValue, true);
        return outValue.resourceId;
    } else {
        return themeResId;
    }
}
Also used : TypedValue(android.util.TypedValue) StyleRes(android.annotation.StyleRes)

Aggregations

StyleRes (android.annotation.StyleRes)5 TypedValue (android.util.TypedValue)5