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();