Example #1
0
 private void initUI() {
   xlistView = (XListView) findViewById(R.id.xlistview);
   xlistView.setXListViewListener(this, 0);
   xlistView.setRefreshTime();
   datas = new ArrayList<CouponEntity>();
   mAdapter = new CouponAdapter(this, datas);
   xlistView.setAdapter(mAdapter);
   currentPage = 1;
   lvDataState = UIHelper.LISTVIEW_DATA_EMPTY;
   xlistView.startLoadMore();
   Button leftBar = (Button) findViewById(R.id.leftbar);
   accretionArea(leftBar);
   TextView titilBar = (TextView) findViewById(R.id.bartitle);
   titilBar.setText("乐购券");
   Button rightBar = (Button) findViewById(R.id.rightbar);
   rightBar.setVisibility(View.GONE);
 }
Example #2
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();
  }