Ejemplo n.º 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();
    }
  }
Ejemplo n.º 2
0
  private void addFooterWeek() {

    viewGroup.addFooterView(this.addWeek());
  }
Ejemplo n.º 3
0
 private void addHeaderWeek() {
   viewGroup.addHeaderView(this.addWeek());
 }