Пример #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mContext = this;
    setContentView(R.layout.activity_customized2);

    // 获取屏幕宽高度(像素)设置背景高度
    metric = new DisplayMetrics();
    this.getWindowManager().getDefaultDisplay().getMetrics(metric);
    width = metric.widthPixels; // 屏幕宽度(像素)
    height = metric.heightPixels; // 屏幕高度(像素)

    initview();
    setListener();
  }
Пример #2
0
 @Override
 public void onDestroy() {
   super.onDestroy();
 }