Example #1
0
  private void initUI() {
    xlistView = (XListView) findViewById(R.id.xlistview);
    xlistView.setPullRefreshEnable(false);
    xlistView.setPullLoadEnable(false);
    View mHeaderView = getLayoutInflater().inflate(R.layout.comment_detail_header, null);
    xlistView.addHeaderView(mHeaderView);
    xlistView.setAdapter(new TextAdapter(this, new ArrayList<String>()));

    photo = (ImageView) mHeaderView.findViewById(R.id.photo);
    titleTV = (TextView) mHeaderView.findViewById(R.id.titleTV);
    desTV = (TextView) mHeaderView.findViewById(R.id.desTV);
    marketPriceTV = (TextView) mHeaderView.findViewById(R.id.oripriceTV);
    teamPriceTV = (TextView) mHeaderView.findViewById(R.id.teampriceTV);
    marketPriceTV = (TextView) mHeaderView.findViewById(R.id.oripriceTV);

    starBar = (RatingBar) mHeaderView.findViewById(R.id.star);
    timeTV = (TextView) mHeaderView.findViewById(R.id.timeTV);
    contentTV = (TextView) mHeaderView.findViewById(R.id.contentTV);
    setDataOnView();
  }