Пример #1
0
  /**
   * **********************************************
   *
   * @return void 返回类型
   * @throws @Title: init @Description: TODO(初始化数据) 设定文件
   * @date 2014-11-19 ***********************************************
   */
  @InjectInit
  public void init() {
    db = Ioc.getIoc().getDb("/sdcard/MTM/", Constants.APP_DATABASE);
    dataList = new ArrayList<HashMap<String, String>>();
    initView();
    mImageFetcher = new ImageDownloader(getActivity(), 300);
    mImageFetcher.setLoadingImage(R.drawable.default_load_image);
    eventBus.register(this, "onEventPostRoomList");

    // 设置list列表间距
    srla =
        new ConditionsRoomAdapter(
            activity, listview_roomlist, dataList, R.layout.reservation_screeningroom_item);
    listview_roomlist.setAdapter(srla);
    // 这里是设置里面的文字 可以不设置 默认有
    PullToRefreshManager.getInstance().setRelease_label("松开后刷新");
    PullToRefreshManager.getInstance()
        .setUpdateTime(org.apache.http.impl.cookie.DateUtils.formatDate(new Date(), "yyyy-MM-dd"));
    showDialog();
    ajaxRoomList(1);
    ajaxPOST();
    gallery_hotel.setOnItemClickListener(
        new OnItemClickListener() {

          @Override
          public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            startActivity(new Intent(getActivity(), HotelViewPagerActivity.class));
          }
        });
    search_layout.setVisibility(View.GONE);
  }
Пример #2
0
 private void getDrawable(String url, ImageView imageView) {
   imageFetcher.setLoadingImage(R.drawable.default_load_image);
   imageFetcher.loadImage(url, imageView);
 }