正好朋友项目里遇到了给写了个小Demo: 这个监听器看名字也知道了。就是在绘画完毕之前调用的,在这里面能够获取到行数。当然也能够获取到宽高等信息 package com.example.textviewtest; import android.annotation.SuppressLint; imp ...
分类:
移动开发 时间:
2017-06-25 17:03:40
阅读次数:
196
话不多说 直接上代码, @SuppressLint("NewApi") public static boolean isSupportFrontCamera() { if (!hasGingerbread()) { return false; } @SuppressWarnings("depreca ...
分类:
移动开发 时间:
2017-06-22 14:46:19
阅读次数:
238
自己建一个表,放在assets目录下 package mine; import android.annotation.SuppressLint;import android.content.ContentValues;import android.content.Context;import and ...
分类:
移动开发 时间:
2017-06-01 17:52:46
阅读次数:
257
package code.suibianchou.com.custormview2;import android.annotation.SuppressLint;import android.content.Context;import android.graphics.Rect;import an ...
分类:
移动开发 时间:
2017-05-18 13:23:15
阅读次数:
176
//ALT+Enter, 自行引入相应的包, 1 public class MainActivity extends Activity { 2 3 @SuppressLint("InlinedApi") 4 @Override 5 protected void onCreate(Bundle sav... ...
分类:
移动开发 时间:
2017-04-21 22:34:58
阅读次数:
211
// 将assets中的文件拷贝到系统databases目录下 publicclassDbUtils{ @SuppressLint("SdCardPath") publicstaticvoid packDataBase(Context context,String dbName){ File fil ...
分类:
数据库 时间:
2016-11-13 11:33:41
阅读次数:
604
转自:http://blog.csdn.NET/wbshuang09/article/details/44920549在Android代码中,我们有时会使用比我们在AndroidManifest中设置的android:minSdkVersion版本更高的方法,此时编译器会提示警告,解决方法是在方法上 ...
最近在项目中需要将读取的数据按照时间的降序进行排序。 具体的步骤如下: 1.读取数据,存入List中 2.取出数据中的时间戳,由String转换成Date 3.使用冒泡排序对List中元素按照Date进行排序 具体代码如下: //将List按照时间倒序排列 @SuppressLint("Simple ...
分类:
移动开发 时间:
2016-10-08 16:51:27
阅读次数:
201
现在网上比较流行的蓝牙工具类: @SuppressLint("NewApi") public class ClsUtils { public ClsUtils() { // TODO Auto-generated constructor stub } /** * /Settings/src/com/ ...
分类:
其他好文 时间:
2016-09-13 13:33:01
阅读次数:
625
@SuppressLint("NewApi") 在Android代码中,我们有时会使用比我们在AndroidManifest中设置的android:minSdkVersion版本更高的方法,此时编译器会提示警告,解决方法是在方法上加上@SuppressLint("NewApi")或者@TargetA ...
分类:
移动开发 时间:
2016-08-18 12:56:01
阅读次数:
192