- 博客(10)
- 收藏
- 关注
原创 android 中关于输入法的一些小tips
1.进有edittext控件的activity自动弹出输入法在清单文件对应的activity中加入 android:windowSoftInputMode="stateAlwaysVisible" 就行了2.设置edittext不自动弹出输入法在edittext的父布局加 android:focusable="true"android:focusa...
2017-02-28 10:28:27 532
原创 怎么查看keystore文件内容
首先,我们要通过控制台(win+R输入cmd打开)进入jdk的jre的bin目录下然后输入keytool -list -v -keystore keystore文件路径 -storepass keystore密码就行了
2017-02-24 16:25:13 11715
原创 android 设置activity启动模式为singleTask时,intent的传值问题
小tips:当安卓设置activity的启动模式为singleTask时,如果再次启动这个activity,它的intent是不会变得,还是之前你启动是的intent,这时我们就需要这么写然后你再用getIntent()就会发现intent改变了。
2017-02-23 16:39:58 1545
原创 android studio如何导入其他keystore文件
首先在build.gradle文件中,在原先使用debug.keystore的地方改成你的key.store文件例: signingConfigs {// debug {// storeFile file('debug.keystore')// storePassword "android"//
2017-02-23 08:49:54 1775
原创 android 获取屏幕的长宽
int screenHeight = getResources().getDisplayMetrics().heightPixels;int screenWidth = getResources().getDisplayMetrics().widthPixels;
2017-02-18 15:36:56 293
原创 设置radiobutton中drawable图片的大小,checkBox应该也可以
Drawable[] personDraws = radiobutton_personal.getCompoundDrawables();personDraws[0].setBounds(0,0, DensityUtil.dpToPx(this,20),DensityUtil.dpToPx(this,20));radiobutton_personal.setCompoundDrawables(
2017-02-16 14:12:06 1564
原创 android dp跟px相互转换
/** * 根据手机的分辨率从 dp 的单位 转成为 px(像素) */public static int dpToPx(Context context, float dpValue) { final float scale = context.getResources().getDisplayMetrics().density; return (int) (dpValue
2017-02-16 14:10:00 262
原创 设置edittext不默认选中
只需要在edittext的父布局中加入android:focusable="true"android:focusableInTouchMode="true"即可
2017-02-16 14:07:00 2180
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人