Back to project page app_list_widget.
The source code is released under:
Apache License
If you think the Android project app_list_widget listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * Copyright 2013 acbelter// w w w . j a v a 2 s. c o m * * 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 com.acbelter.applistwidget.widget; import java.io.File; public class Pref { // This should be used when a widget call ConfigActivity public static final String FLAG_CONFIG_WIDGET = "com.acbelter.applistwidget.widget.FLAG_CONFIG_WIDGET"; public static final String PACKAGE_THIS = "com.acbelter.applistwidget"; public static final String APP_LIST_WIDGET_PREF_ = "app_list_widget_pref_"; public static final String WIDGET_ICONS_SIZE_ = "widget_icons_size_"; public static final String WIDGET_ICONS_ALIGN_ = "widget_icons_align_"; public static final String WIDGET_SHOW_SETTINGS_ICON_ = "widget_show_settings_icon_"; public static final String WIDGET_SHOW_BACKGROUND_ = "widget_show_background_"; public static final String WIDGET_COLOR_ = "widget_color_"; public static final String WIDGET_TRANSPARENCY_ = "widget_transparency_"; public static final String WIDGET_APPS_ = "widget_apps_"; public static boolean deletePref(int widgetId) { File f = new File("/data/data/com.acbelter.applistwidget/shared_prefs/" + APP_LIST_WIDGET_PREF_ + widgetId + ".xml"); return f.delete(); } public static boolean isPrefExists(int widgetId) { File f = new File("/data/data/com.acbelter.applistwidget/shared_prefs/" + APP_LIST_WIDGET_PREF_ + widgetId + ".xml"); return f.exists(); } }