android provider 包下自带的BaseColumn

/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package android.provider;public interface BaseColumns{    /**     * The unique ID for a row.     * <P>Type: INTEGER (long)</P>     */    public static final String _ID = "_id";    /**     * The count of rows in a directory.     * <P>Type: INTEGER</P>     */    public static final String _COUNT = "_count";}

基于basecolumn自定义自己表的Column

public static final class PhoneLabelColumns implements BaseColumns {
//必要的部分 ---begin-----
public static final String TABLE = "phone_label"; public static final String COUNT = "count"; public static final String NUMBER = "number"; public static final String LABEL = "label";
//必要的部分 ----end-----
private static final String[] PROJECTION = { _ID, // 0 NUMBER, // 1 LABEL, // 2 COUNT, // 3 }; public static int COLUMN_NUMBER = 1; public static final int COLUMN_LABEL = 2; public static final int COLUMN_COUNT = 3; }

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. [Android]转-Android 中的拿来主义(编译,
  2. android UI进阶之可延伸的图像
  3. 浅入浅出 Android 安全 (四) Android 框架
  4. Android Overdraw
  5. Android 敏感词过滤实现
  6. 2012移动开发者大会上海站Android专场
  7. 图解 Android 系列(一)揭秘 Android 系统启
  8. Android APK 签名、打包笔记
  9. Android:自定义PopupMenu的样式(显示图标/
  10. android的优点与不足