android
文章平均质量分 50
jasdjf
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 · 1024 阅读 · 0 评论 -
控制输入法软键盘隐藏
//控制输入法软键盘隐藏 InputMethodManager inputMethodManager =(InputMethodManager)getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.hideSoftInputFromWindow(getCurrentFo原创 2016-01-27 15:36:03 · 465 阅读 · 0 评论 -
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 · 1738 阅读 · 2 评论 -
关于Android DialogPreference的使用
DialogPreference是抽象方法,所以要自定义一个MyDialogPreference去继承它才能使用。 public class MyDialogPreference extends DialogPreference{ public MyDialogPreference(Context context) { this(context,null); // TODO Aut原创 2016-03-10 11:07:53 · 5484 阅读 · 0 评论 -
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 · 584 阅读 · 0 评论
分享