public void show_fbl_bt(View view) {
DisplayMetrics displaysMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displaysMetrics);
String showSize = "手机屏幕分辨率:" + displaysMetrics.widthPixels + "*"
+ displaysMetrics.heightPixels;
show_fbl_tv.setText(showSize);
}
//圆角 xml文件
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<!-- 按钮背景颜色(白色) -->
<solid android:color="#FFFFFF" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 圆角弧形的半径 -->
<corners android:radius="10dip" />
<!-- padding:Button里面的文字与Button四个边的间隔 -->
<padding
android:bottom="10dp"
android:left="10dp"
android:right="10dp"
android:top="10dp" />
<!-- stroke 描边。 -->
<stroke
android:dashGap="0.0dip"
android:dashWidth="3.0dip"
android:width="2.0dip"
android:color="#00ffff" />
</shape>