自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 android通过电源管理保持屏幕常亮

import android.app.Activity;import android.content.Context;import android.os.Bundle;import android.os.PowerManager;import android.os.PowerManager.WakeLock;public class MainActivity extends Activity {W

2016-03-22 10:36:19 484

原创 关于Android DialogPreference的使用

DialogPreference是抽象方法,所以要自定义一个MyDialogPreference去继承它才能使用。 public class MyDialogPreference extends DialogPreference{ public MyDialogPreference(Context context) { this(context,null); // TODO Aut

2016-03-10 11:07:53 5304

原创 控制输入法软键盘隐藏

//控制输入法软键盘隐藏 InputMethodManager inputMethodManager =(InputMethodManager)getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.hideSoftInputFromWindow(getCurrentFo

2016-01-27 15:36:03 393

原创 adb shell命令

1、adb devices  查看连接上的所有设备 2、adb reboot 重启设备 3、adb reboot bootloader 重启到刷机模式 4、adb reboot recovery 重启到恢复模式 5、adb install filename 安装apk  例如adb install ***.apk 6、adb install -r filename 重新安装apk并保留数

2016-01-09 17:36:21 1613 2

原创 Android 在EditText多行输入框中确定光标所在行

获取光标所在行:public int getCurrentCursorLine(EditText editText){ int selectionStart = Selection.getSelectionStart(editText.getText()); Layout layout = editText.getLayout(); if(-1 != selectionStart){

2016-01-09 14:58:06 897

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除