@SuppressLint("InflateParams")
ImageFolderPopupWindow(Context context, Callback callback) {
super(LayoutInflater.from(context).inflate(R.layout.popup_window_folder, null),
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
mCallback = callback;
// init
setAnimationStyle(R.style.popup_anim_style_alpha);
setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
setOutsideTouchable(true);
setFocusable(true);
// content
View content = getContentView();
content.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
}
});
content.addOnAttachStateChangeListener(this);
mFolderView = (RecyclerView) content.findViewById(R.id.rv_popup_folder);
mFolderView.setLayoutManager(new LinearLayoutManager(context));
}
ImageFolderPopupWindow.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:OSchina_resources_android
作者:
评论列表
文章目录