解决方案 »

  1.   

    自己做个layout,里面包含个webView 和一个closebutton。用addView直接盖在上面
      

  2.   

    自己做layout? 是自己写一个布局文件是吧? 但addview 怎么调用这个布局文件呢?
      

  3.   

    写个class继承自这个布局文件的layout。比如说布局文件是relativeLayout,class也继承relativelayout然后在构造方法中把这个layout给inflate了。然后new一个你自定义的文件就可以add了
      

  4.   


    public class TutorialView extends RelativeLayout {    private View baseView;    public TutorialView(Context context, AttributeSet attrs, int defStyle) {
            super(context, attrs, defStyle);
            mContext = context;
        }    public TutorialView(Context context, AttributeSet attrs) {
            this(context, attrs, 0);
            mContext = context;
        }    public TutorialView(Context context) {
            this(context, null);
            mContext = context;
        }    public TutorialView(Context context, int step) {
            this(context);
            this.step = step;
            mContext = context;
            init();
        }    private void init() {
            baseView = LayoutInflater.from(mContext).inflate(
                    R.layout.my_relative_view, this);
        }
    }
    这样就可以了。具体的逻辑你可以写到init里,比如webView的内容啊,closebutton的监听啊。或者加一些其他的方法。
      

  5.   

    还是不太明白,后来用新建一个Activity勉强达到要求了
      

  6.   

    请问楼主你处理好了吗? 我想问你是怎么能过哪里方法拦截window.open所触发的事件
      

  7.   

    同求哪里方法拦截window.open所触发的事件件