/* (non-Javadoc)
   * @see android.app.Activity#onCreate(android.os.Bundle)
   */
  @SuppressWarnings("unchecked")
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.listofappswithicons);
    appListView = (ListView) findViewById(android.R.id.list);

    Bundle extras = getIntent().getExtras();

    itemSkelArrayList = new ArrayList<ItemSkel>();

    ptype = extras.getInt("position");

    if (savedInstanceState != null) {
      iconsReceived = (boolean) savedInstanceState.getBoolean("iconsReceived");
      if (iconsReceived) {
        pHolder = (ParcelableHolder) savedInstanceState.getParcelable("parcel");
        iconArrayList = (ArrayList<Bitmap>) pHolder.get("iconArrayList");
        appNameArrayList = (ArrayList<String>) pHolder.get("appNameArrayList");
        itemSkelArrayList = (ArrayList<ItemSkel>) pHolder.get("itemSkelArrayList");
        iconAdapter = new IconicAdapter();
        setUpAppListView();
      } else {
        iconAdapter = new IconicAdapter();
        dataUrl = (extras.getString("repo") != null) ? extras.getString("repo") : dataUrl;
        new GetListTask().execute();
        LoadData();
      }
    } else {
      iconAdapter = new IconicAdapter();
      dataUrl = (extras.getString("repo") != null) ? extras.getString("repo") : dataUrl;
      new GetListTask().execute();
      LoadData();
    }
  }
  @Override
  public void onSaveInstanceState(Bundle outState) {
    pHolder.put("iconArrayList", iconArrayList);
    pHolder.put("appNameArrayList", appNameArrayList);
    pHolder.put("itemSkelArrayList", itemSkelArrayList);
    outState.putParcelable("parcel", pHolder);
    outState.putBoolean("iconsReceived", iconsReceived);

    super.onSaveInstanceState(outState);
  }