摘要: 方法一:可以在layout xml中加上属性android:maxLength 比如: <EditText android:id="@+id/editTextShow" android:layout_width="fill_parent" android:layout_height="wrap_co 阅读全文
posted @ 2016-09-20 16:26 仲长可倾 阅读(2229) 评论(0) 推荐(0)
摘要: alertDialog.setOnKeyListener(new DialogInterface.OnKeyListener() { @Override public boolean onKey(DialogInterface dialog, int keyCode,KeyEvent event) 阅读全文
posted @ 2016-09-20 16:17 仲长可倾 阅读(1936) 评论(0) 推荐(0)
摘要: 方法一: public static int SCREEN_WIDTH; public static int SCREEN_HEIGHT; //获取屏幕 WindowManager wm = (WindowManager) getBaseContext().getSystemService( Con 阅读全文
posted @ 2016-09-20 16:15 仲长可倾 阅读(9795) 评论(0) 推荐(0)
摘要: 方法一: EditText中的文字在设定大小后, Hint文本由于太长导致在EditText中无法完整的显示, 所以问有没有单独设置Hint文本大小的选项. TextView的源码(EditText继承自TextView), 如下: Java Java 只要传入的hint是SpannedString 阅读全文
posted @ 2016-09-20 16:08 仲长可倾 阅读(3714) 评论(0) 推荐(1)