获取当前系统版本等级
Buidl.VERSION.SDK_INT
获取当前系统内存容量
File path = Enviroment.getExternalStorageDirectory();
StatFs stat = new StatFs(path.getPath());
blockSize = stat.getBlockSizeLong();
totalBlocks = stat.getBlockCountLong();
availableBlocks = stat.getAvailablesBocksLong();
//在Manifest.xml 中配置测试框架
<>
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.itheima.day03_sqlite"
>
- ctrl + shift + o 导包
- ctrl + shift + t 快速查找某个类
- 先按ctrl + 2 ,再点L, 创建变量并命名
- ctrl + o , 在当前类中,快速查找某个方法
- ctrl + k, 向下查找某个字符串
- ctrl + shift + k, 向上查找某个字符串
- alt + 左方向键 跳转上一个页面
-ctrl+shift+f, 代码格式化
禁用点击事件三连发:
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false" />
常用第三方:
xutils 来下载网络资源
TextUtils
android.text.TextUtils的类,主要的功能如下:
是否为空字符 boolean
android.text.TextUtils.
isEmpty(CharSequence str)
拼接字符串 String android.text.TextUtils.join(CharSequence delimiter, Object[] tokens)
拆分字符串 String[]
android.text.TextUtils.
split(String text, String expression)