摘要: 仔细读官方的API: Returns true if the string is null or 0-length. 因为你从EditText返回的是一个变量。如果这个变量本身为null值,那么你掉它的equals方法是要报错的。但是如果你调用TextUtils.isEmpty() 把这个变量作为参 阅读全文
posted @ 2016-04-28 21:02 gentspy 阅读(1551) 评论(0) 推荐(0) 编辑
摘要: 【Android】ContentValues的用法 ContentValues 和HashTable类似都是一种存储的机制 但是两者最大的区别就在于,contenvalues只能存储基本类型的数据,像string,int之类的,不能存储对象这种东西,而HashTable却可以存储对象。 在忘数据库中 阅读全文
posted @ 2016-04-28 16:10 gentspy 阅读(211) 评论(0) 推荐(0) 编辑
摘要: public class CoolWeatherOpenHelper extends SQLiteOpenHelper { /** * Province表建表语句 */ public static final String CREATE_PROVINCE="create table Province 阅读全文
posted @ 2016-04-28 15:16 gentspy 阅读(141) 评论(0) 推荐(0) 编辑