本文整理了Java中android.support.v4.app.FragmentActivity.obtainStyledAttributes()
方法的一些代码示例,展示了FragmentActivity.obtainStyledAttributes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FragmentActivity.obtainStyledAttributes()
方法的具体详情如下:
包路径:android.support.v4.app.FragmentActivity
类名称:FragmentActivity
方法名:obtainStyledAttributes
暂无
代码示例来源:origin: sjwall/MaterialTapTargetPrompt
@NonNull
@Override
public TypedArray obtainStyledAttributes(int resId, int[] attrs)
{
return this.fragment.requireActivity().obtainStyledAttributes(resId, attrs);
}
代码示例来源:origin: spacecowboy/NoNonsense-FilePicker
/**
* Checks if a divider drawable has been defined in the current theme. If it has, will apply
* an item decoration with the divider. If no divider has been specified, then does nothing.
*/
protected void configureItemDecoration(@NonNull LayoutInflater inflater,
@NonNull RecyclerView recyclerView) {
final TypedArray attributes =
getActivity().obtainStyledAttributes(new int[]{R.attr.nnf_list_item_divider});
Drawable divider = attributes.getDrawable(0);
attributes.recycle();
if (divider != null) {
recyclerView.addItemDecoration(new DividerItemDecoration(divider));
}
}
代码示例来源:origin: leftcoding/GankLy
public void setItemSelectBackground(@NonNull List<View> list) {
if (!ListUtils.isListEmpty(list)) {
int[] attrs = new int[]{R.attr.selectableItemBackground};
TypedArray typedArray = getActivity().obtainStyledAttributes(attrs);
final int backgroundResource = typedArray.getResourceId(0, 0);
ButterKnife.apply(list, new ButterKnife.Action<View>() {
@Override
public void apply(@NonNull View view, int index) {
view.setBackgroundResource(backgroundResource);
}
});
typedArray.recycle();
}
}
代码示例来源:origin: leftcoding/GankLy
public void setItemSelectBackground(@NonNull List<View> list) {
if (!ListUtils.isListEmpty(list)) {
int[] attrs = new int[]{R.attr.selectableItemBackground};
TypedArray typedArray = getActivity().obtainStyledAttributes(attrs);
final int backgroundResource = typedArray.getResourceId(0, 0);
ButterKnife.apply(list, new ButterKnife.Action<View>() {
@Override
public void apply(@NonNull View view, int index) {
view.setBackgroundResource(backgroundResource);
}
});
}
}
代码示例来源:origin: henrichg/PhoneProfilesPlus
TypedArray themeColors = getActivity().obtainStyledAttributes(mStyleResId, R.styleable.BetterPickersDialogs);
mDayPickerDescription = res.getString(R.string.day_picker_description);
mSelectDay = res.getString(R.string.select_day);
代码示例来源:origin: henrichg/PhoneProfilesPlus
TypedArray themeColors = getActivity().obtainStyledAttributes(mStyleResId, R.styleable.BetterPickersDialogs);
内容来源于网络,如有侵权,请联系作者删除!