Example #1
0
 /** 初始化Foot */
 private void initFootView(Context context) throws Exception {
   //		footView = LayoutInflater.from(context).inflate(R.layout.foot_view, null);
   footView =
       LayoutInflater.from(context)
           .inflate(MResource.getIdByName(context, "layout", "foot_view"), null);
   list_foot_view_show_msg =
       (TextView)
           footView.findViewById(MResource.getIdByName(context, "id", "list_foot_view_show_msg"));
   load_more_progressbar =
       (ProgressBar)
           footView.findViewById(MResource.getIdByName(context, "id", "load_more_progressbar"));
 }
Example #2
0
  /** 初始化Head */
  private void initHeadView(Context context) throws Exception {
    headView =
        LayoutInflater.from(context)
            .inflate(MResource.getIdByName(context, "layout", "head_view"), null);
    head_load_progressbar =
        (ProgressBar)
            headView.findViewById(MResource.getIdByName(context, "id", "head_load_progressbar"));
    head_load_status_icon =
        (ImageView)
            headView.findViewById(MResource.getIdByName(context, "id", "head_load_status_icon"));
    head_load_time =
        (TextView) headView.findViewById(MResource.getIdByName(context, "id", "head_load_time"));
    head_load_msg =
        (TextView) headView.findViewById(MResource.getIdByName(context, "id", "head_load_msg"));

    measureView(headView);

    headTotalHeight = headView.getMeasuredHeight();
    setHeadTopPadding(-headTotalHeight);
    addHeaderView(headView);
  }