Esempio n. 1
0
 /* update app into */
 private void updateAppList(boolean bool) {
   ApplicationListAdapter adapter = (ApplicationListAdapter) mAppInfoList.getAdapter();
   for (int i = 0; i < adapter.getCount(); i++) {
     AppListInfo tempAppListInfo = (AppListInfo) adapter.getItem(i);
     tempAppListInfo.checked = bool;
   }
   mAppInfoAdapter.updateList();
 }
Esempio n. 2
0
  @Override
  protected void onListItemClick(ListView l, View v, int position, long id) {
    ApplicationListAdapter adapter = (ApplicationListAdapter) mAppInfoList.getAdapter();
    AppListInfo tempAppInfo = (AppListInfo) adapter.getItem(position);

    /* change check of list item */
    tempAppInfo.checked = !tempAppInfo.checked;
    mAppInfoAdapter.updateList();
    return;
  }
Esempio n. 3
0
  /* update app into */
  private void updateAppList() {

    ArrayList<ApplicationInfo> appInfos = LauncherModel.mApplicationsAdapter.allItems;
    /* app info */
    final List<AppListInfo> savedAppInfos = new ArrayList<AppListInfo>();

    TextView t = (TextView) findViewById(R.id.left_title_text);

    mCatalogue.setTitleView(t);

    SharedPreferences curAppGrp = mCatalogue.getPreferences();

    for (int i = 0; i < appInfos.size(); i++) {
      AppListInfo tempAppListInfo = new AppListInfo();
      /* get App info */
      ApplicationInfo tempAppInfo = appInfos.get(i);

      tempAppListInfo.className = tempAppInfo.intent.getComponent().flattenToString();
      tempAppListInfo.icon = tempAppInfo.icon;

      tempAppListInfo.title = tempAppInfo.title.toString();
      if (curAppGrp != null)
        tempAppListInfo.checked = curAppGrp.getBoolean(tempAppListInfo.className, false);
      else tempAppListInfo.checked = false;

      savedAppInfos.add(tempAppListInfo);
      if (DBG) Log.d(TAG, tempAppListInfo.className + " " + tempAppListInfo.checked);
    }

    mAppInfoAdapter.updateList(savedAppInfos);
  }