摘要: public static void setEditTextReadOnly(TextView view){ view.setTextColor(R.color.read_only_color); //设置只读时的文字颜色 if (view instanceof android.widget.EditText){ view.setCursorVisible(false); //设置输入框中的光标不可见 view.setFocusable(false); ... 阅读全文
posted @ 2012-04-17 19:27 Jun14 阅读(1389) 评论(0) 推荐(0)
摘要: 第一步:在布局文件中指定layout_width与layout_height在xml文件中设置的ImageButton的宽和高为:android:layout_width="100dp"android:layout_height="100dp"第二步:设置属性android:scaleTypeImageView的属性android:scaleType,即 ImageView.setScaleType(ImageView.ScaleType)。android:scaleType是控制图片如何 resized/moved来匹对ImageView的size。I 阅读全文
posted @ 2012-04-17 08:51 Jun14 阅读(1267) 评论(0) 推荐(0)