当前位置: 首页>>代码示例>>Java>>正文


Java WorkspaceScreens.TABLE_NAME属性代码示例

本文整理汇总了Java中com.android.launcher3.LauncherSettings.WorkspaceScreens.TABLE_NAME属性的典型用法代码示例。如果您正苦于以下问题:Java WorkspaceScreens.TABLE_NAME属性的具体用法?Java WorkspaceScreens.TABLE_NAME怎么用?Java WorkspaceScreens.TABLE_NAME使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.android.launcher3.LauncherSettings.WorkspaceScreens的用法示例。


在下文中一共展示了WorkspaceScreens.TABLE_NAME属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkId

public void checkId(String table, ContentValues values) {
    long id = values.getAsLong(LauncherSettings.BaseLauncherColumns._ID);
    if (table == WorkspaceScreens.TABLE_NAME) {
        mMaxScreenId = Math.max(id, mMaxScreenId);
    }  else {
        mMaxItemId = Math.max(id, mMaxItemId);
    }
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:8,代码来源:LauncherProvider.java

示例2: removeOrphanedItems

private void removeOrphanedItems(SQLiteDatabase db) {
    // Delete items directly on the workspace who's screen id doesn't exist
    //  "DELETE FROM favorites WHERE screen NOT IN (SELECT _id FROM workspaceScreens)
    //   AND container = -100"
    String removeOrphanedDesktopItems = "DELETE FROM " + Favorites.TABLE_NAME +
            " WHERE " +
            LauncherSettings.Favorites.SCREEN + " NOT IN (SELECT " +
            LauncherSettings.WorkspaceScreens._ID + " FROM " + WorkspaceScreens.TABLE_NAME + ")" +
            " AND " +
            LauncherSettings.Favorites.CONTAINER + " = " +
            LauncherSettings.Favorites.CONTAINER_DESKTOP;
    db.execSQL(removeOrphanedDesktopItems);

    // Delete items contained in folders which no longer exist (after above statement)
    //  "DELETE FROM favorites  WHERE container <> -100 AND container <> -101 AND container
    //   NOT IN (SELECT _id FROM favorites WHERE itemType = 2)"
    String removeOrphanedFolderItems = "DELETE FROM " + Favorites.TABLE_NAME +
            " WHERE " +
            LauncherSettings.Favorites.CONTAINER + " <> " +
            LauncherSettings.Favorites.CONTAINER_DESKTOP +
            " AND "
            + LauncherSettings.Favorites.CONTAINER + " <> " +
            LauncherSettings.Favorites.CONTAINER_HOTSEAT +
            " AND "
            + LauncherSettings.Favorites.CONTAINER + " NOT IN (SELECT " +
            LauncherSettings.Favorites._ID + " FROM " + Favorites.TABLE_NAME +
            " WHERE " + LauncherSettings.Favorites.ITEM_TYPE + " = " +
            LauncherSettings.Favorites.ITEM_TYPE_FOLDER + ")";
    db.execSQL(removeOrphanedFolderItems);
}
 
开发者ID:TeamBrainStorm,项目名称:SimpleUILauncher,代码行数:30,代码来源:LauncherProvider.java


注:本文中的com.android.launcher3.LauncherSettings.WorkspaceScreens.TABLE_NAME属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。