Methods Summary |
---|
void | bind(FolderInfo info)
super.bind(info);
if (mLoadingTask != null && mLoadingTask.getStatus() == AsyncTask.Status.RUNNING) {
mLoadingTask.cancel(true);
}
mLoadingTask = new FolderLoadingTask(this).execute((LiveFolderInfo) info);
|
static com.android.launcher.LiveFolder | fromXml(android.content.Context context, FolderInfo folderInfo)
final int layout = isDisplayModeList(folderInfo) ?
R.layout.live_folder_list : R.layout.live_folder_grid;
return (LiveFolder) LayoutInflater.from(context).inflate(layout, null);
|
private static boolean | isDisplayModeList(FolderInfo folderInfo)
return ((LiveFolderInfo) folderInfo).displayMode ==
LiveFolders.DISPLAY_MODE_LIST;
|
void | onClose()
super.onClose();
if (mLoadingTask != null && mLoadingTask.getStatus() == AsyncTask.Status.RUNNING) {
mLoadingTask.cancel(true);
}
// The adapter can be null if onClose() is called before FolderLoadingTask
// is done querying the provider
final LiveFolderAdapter adapter = (LiveFolderAdapter) mContent.getAdapter();
if (adapter != null) {
adapter.cleanup();
}
|
public void | onItemClick(android.widget.AdapterView parent, android.view.View v, int position, long id)
LiveFolderAdapter.ViewHolder holder = (LiveFolderAdapter.ViewHolder) v.getTag();
if (holder.useBaseIntent) {
final Intent baseIntent = ((LiveFolderInfo) mInfo).baseIntent;
if (baseIntent != null) {
final Intent intent = new Intent(baseIntent);
Uri uri = baseIntent.getData();
uri = uri.buildUpon().appendPath(Long.toString(holder.id)).build();
intent.setData(uri);
mLauncher.startActivitySafely(intent);
}
} else if (holder.intent != null) {
mLauncher.startActivitySafely(holder.intent);
}
|
public boolean | onItemLongClick(android.widget.AdapterView parent, android.view.View view, int position, long id)
return false;
|
void | onOpen()
super.onOpen();
requestFocus();
|