PopwdUtil.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:libtincent 作者:
/**
 * popwd显示 分享

 */
public static PopupWindow showShareByWeixin(final Context ctx, View parent, OnClickListener l) {
    LayoutInflater inflater = LayoutInflater.from(ctx);
    View view = inflater.inflate(R.layout.share_popwed_show, null);
    final PopupWindow sharePopwd = new PopupWindow(view, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
    view.findViewById(R.id.sendfrient).setOnClickListener(l);
    view.findViewById(R.id.sharefriend).setOnClickListener(l);
    view.findViewById(R.id.share_popwd).setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            sharePopwd.dismiss();
        }
    });
    sharePopwd.setFocusable(true);
    sharePopwd.setOutsideTouchable(true);
    sharePopwd.setBackgroundDrawable(new BitmapDrawable()); //
    sharePopwd.showAtLocation(parent, Gravity.CENTER, 0, 0);

    return sharePopwd;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号