當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。