Example #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    DisplayMetrics dm = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(dm);
    this.SCREEN_WIDTH = dm.widthPixels; // 获取分辨率宽度
    this.SCREEN_HEIGHT = dm.heightPixels;

    viewGroup = new MyViewGroup(this);
    viewGroup.setScrollListener(this);
    setContentView(viewGroup);

    for (int i = 0; i < 11; i++) {
      this.addFooterWeek();
    }
  }
Example #2
0
  private void addFooterWeek() {

    viewGroup.addFooterView(this.addWeek());
  }
Example #3
0
 private void addHeaderWeek() {
   viewGroup.addHeaderView(this.addWeek());
 }