我想Activity
入驻FrameLayout
。这是我的代码:
FrameLayout fl = new FrameLayout(this);
fl = (FrameLayout ) findViewById(R.id.actioncontent);
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View myview =LayoutInflater.from(this).inflate(R.layout.wallpaper, null);
fl.removeAllViews();
fl.addView(myview);
我收到一个错误NullPointerException。