
控件相关TextView、EditText
huwan.cn
我姓陈,儿子叫煦源,猜猜我是谁的爸爸?
展开
-
TextView相关
1、代码设置文本颜色xxx.setTextColor(Color.parseColor("#ff5a00")); xxx.setTextColor(getResources().getColor(R.color.my_color));原创 2017-03-17 14:58:33 · 332 阅读 · 0 评论 -
安卓一个TextView解决自身背景点击变暗效果
1、主界面 xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent"> an原创 2017-03-17 13:50:48 · 1481 阅读 · 0 评论 -
EditTex隐藏、可编辑等状态
1、在OnCreat()方法中写下面代码隐藏输入框getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);有可编辑键盘getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_原创 2017-03-17 14:05:56 · 517 阅读 · 0 评论 -
安卓TextView文本不满一行由于英文,标点符号等原因换行
1、String aaa = “随便复制一段文字,用于测试,大家自己写下。有特殊符号,然后标点,英文什么的。”2、转半角函数,因为实际看起来半角函数比较好看public static String ToDBC(String input) { char[] c = input.toCharArray(); for (int i = 0; ilength; i++)原创 2017-05-19 00:51:39 · 6028 阅读 · 2 评论