robert_hly

踩坑填坑记录...

导航

2017年3月4日 #

Activity中通过标签获取当前Fragment

摘要: 初始化完成之后才有数据,否则获取不到 String tag = "android:switcher:"+viewPager.getId()+":"+viewPager.getCurrentItem(); Fragment fg = getSupportFragmentManager().findFr 阅读全文

posted @ 2017-03-04 08:56 robert_hly 阅读(376) 评论(0) 推荐(0)

android 获取Asset中Properties文件配置的键值对

摘要: 1 获取 AssetManager AssetManager assetManager = context.getApplicationContext().getAssets(); 2 获取流 String confFile = "abc.properties"; Properties conf = 阅读全文

posted @ 2017-03-04 08:35 robert_hly 阅读(331) 评论(0) 推荐(0)

2017年3月2日 #

android 广播 接收短信

摘要: public class MyBroad extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { private String actions = intent.get 阅读全文

posted @ 2017-03-02 16:37 robert_hly 阅读(331) 评论(0) 推荐(0)

2017年2月20日 #

设置checkBox不拦截焦点

摘要: android:clickable="false"android:focusableInTouchMode="false"android:focusable="false" 阅读全文

posted @ 2017-02-20 22:32 robert_hly 阅读(228) 评论(0) 推荐(0)

android 自定义命名空间 http://schemas.android.com/apk/res-auto

摘要: XML中用 xmlns="http://schemas.android.com/apk/res-auto"获取自定义属性值: public static String NAMESPACE = "http://schemas.android.com/apk/res-auto"; String test 阅读全文

posted @ 2017-02-20 22:11 robert_hly 阅读(534) 评论(0) 推荐(0)

2017年2月16日 #

Android 删除图片等资源文件 通知系统更新,重新扫描

摘要: public void delPic(String path){ File delFile = new File(path); if (delFile.exists()) { delFile.delete(); //delPic(path); } MediaScannerConnection.sca 阅读全文

posted @ 2017-02-16 09:50 robert_hly 阅读(762) 评论(0) 推荐(0)

2017年1月8日 #

安装ubuntu不能引导win7

摘要: 台式机安装了ubuntu导致进不了win7了,2系统在同一硬盘。 win7引导需要bootmgr和boot文件夹中的文件,2个东东在winows引导分区根目录下。 我的笔记本安装windows系统分区和引导分区是同一分区,于是尝试把这2个东东(隐藏的系统文件)拷贝到台式电脑上的windows 系统分 阅读全文

posted @ 2017-01-08 22:07 robert_hly 阅读(247) 评论(0) 推荐(0)

UBUNTU安装 Rabbitvsc可视化版本控制客户端软件

摘要: sudo add-apt-repository ppa:rabbitvcs/ppa sudo apt-get update sudo apt-get install rabbitvcs-core rabbitvcs-nautilus rabbitvcs-cli 阅读全文

posted @ 2017-01-08 18:02 robert_hly 阅读(219) 评论(0) 推荐(0)

2017年1月2日 #

Linux 终端常用快捷键

摘要: Tab 自动补全 Ctrl+L 清屏 Ctrl+A 移动到头 Ctrl+E 移动到尾 Ctrl+左键头 左移一个单词 Ctrl+右箭头 右移一个单词 Ctrl+U 删除左边所有字符 Ctrl+K 删除右边的所有字符 Ctrl+Y 粘贴删除的字符 Shift+Ctrl+C 复制光标所选 Shift+C 阅读全文

posted @ 2017-01-02 13:14 robert_hly 阅读(190) 评论(0) 推荐(0)

2016年12月31日 #

Android Activity中获取当前焦点的控件,自动化输入EditText

摘要: 获取焦点的view对象 View view=getWindow().getDecorView().findFocus(); 如果是EditText if(view instanceof EditText) { ((EditText) view).setText("当前焦点"); }以上来自网络 阅读全文

posted @ 2016-12-31 12:57 robert_hly 阅读(1454) 评论(0) 推荐(0)