把setContentView(R.layout...)

换成

View contentView = LayoutInflater.from(this.getParent()).inflate(R.layout.search_activity, null);
  //setContentView(R.layout.search_activity);
  setContentView(contentView);

详细讲述请看:http://www.cnblogs.com/sober/archive/2011/03/21/1990814.html

posted on 2012-09-03 10:25  清沁  阅读(176)  评论(0编辑  收藏  举报