use of androidx.annotation.Nullable in project CloudReader by youlookwhat.
the class BaseFragment method onCreateView.
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View inflate = inflater.inflate(R.layout.fragment_base, null);
bindingView = DataBindingUtil.inflate(activity.getLayoutInflater(), setContent(), null, false);
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
bindingView.getRoot().setLayoutParams(params);
RelativeLayout mContainer = inflate.findViewById(R.id.container);
mContainer.addView(bindingView.getRoot());
bindingView.getRoot().setVisibility(View.GONE);
return inflate;
}
use of androidx.annotation.Nullable in project Parse-SDK-Android by ParsePlatform.
the class ParseObject method getList.
/**
* Access a {@link List} value.
*
* @param key The key to access the value for
* @return {@code null} if there is no such key or if the value can't be converted to a {@link
* List}.
*/
@Nullable
public <T> List<T> getList(String key) {
synchronized (mutex) {
Object value = estimatedData.get(key);
if (!(value instanceof List)) {
return null;
}
@SuppressWarnings("unchecked") List<T> returnValue = (List<T>) value;
return returnValue;
}
}
use of androidx.annotation.Nullable in project Parse-SDK-Android by ParsePlatform.
the class ParseObject method getParsePolygon.
/**
* Access a {@link ParsePolygon} value.
*
* @param key The key to access the value for
* @return {@code null} if there is no such key or if it is not a {@link ParsePolygon}.
*/
@Nullable
public ParsePolygon getParsePolygon(@NonNull String key) {
synchronized (mutex) {
checkGetAccess(key);
Object value = estimatedData.get(key);
if (!(value instanceof ParsePolygon)) {
return null;
}
return (ParsePolygon) value;
}
}
use of androidx.annotation.Nullable in project Parse-SDK-Android by ParsePlatform.
the class ParseObject method get.
/**
* Access a value. In most cases it is more convenient to use a helper function such as {@link
* #getString(String)} or {@link #getInt(String)}.
*
* @param key The key to access the value for.
* @return {@code null} if there is no such key.
*/
@Nullable
public Object get(@NonNull String key) {
synchronized (mutex) {
if (key.equals(KEY_ACL)) {
return getACL();
}
checkGetAccess(key);
Object value = estimatedData.get(key);
// Either way, make sure it's consistent.
if (value instanceof ParseRelation) {
((ParseRelation<?>) value).ensureParentAndKey(this, key);
}
return value;
}
}
use of androidx.annotation.Nullable in project CloudReader by youlookwhat.
the class BaseHeaderActivity method setImgHeaderBg.
/**
* 加载titlebar背景
*/
private void setImgHeaderBg(String imgUrl) {
if (!TextUtils.isEmpty(imgUrl)) {
// 高斯模糊背景 原来 参数:12,5 23,4
Glide.with(this).load(imgUrl).error(R.drawable.stackblur_default).transform(new BlurTransformation(40, 8)).listener(new RequestListener<Drawable>() {
@Override
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
return false;
}
@Override
public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
bindingTitleView.tbBaseTitle.setBackgroundColor(Color.TRANSPARENT);
bindingTitleView.ivBaseTitlebarBg.setImageAlpha(0);
bindingTitleView.ivBaseTitlebarBg.setVisibility(View.VISIBLE);
return false;
}
}).into(bindingTitleView.ivBaseTitlebarBg);
}
}
Aggregations