1.获取Android 手机屏幕宽度

1 DisplayMetrics dm = new DisplayMetrics();
2 this.getWindowManager().getDefaultDisplay().getMetrics(dm);
3 Toast.makeText(getApplicationContext(), dm.widthPixels + "-"
4         + dm.heightPixels, Toast.LENGTH_LONG).show();

 2. 获取图片宽度

int bmpW = BitmapFactory.decodeResource(getResources(),R.drawable.bottom_line).getWidth();

3.获取Android手机序列号

1 String str = Secure.getString(getContentResolver(), Secure.ANDROID_ID);
2 Toast.makeText(getApplicationContext(), str, Toast.LENGTH_LONG).show();

相关文章:

  • 2022-01-08
  • 2022-12-23
  • 2022-01-08
  • 2022-01-10
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-11
  • 2022-01-08
  • 2022-03-01
  • 2022-01-08
  • 2021-08-10
  • 2022-01-08
相关资源
相似解决方案