Esempio n. 1
0
  /*

   	public void helppdf() {
  	Intent intent = new Intent(Intent.ACTION_VIEW,
  	        Uri.parse("H:\\GitHub\\StaTap\\StaTapAlpha\\"));
  	intent.setType("application/pdf");
  	PackageManager pm = getPackageManager();
  	List<ResolveInfo> activities = pm.queryIntentActivities(intent, 0);
  	if (activities.size() > 0) {
  	    startActivity(intent);
  	} else {
  	    // Do something else here. Maybe pop up a Dialog or Toast
  	}

  }

  */
  public void getGames() {
    Cursor cursor = db.getGameIDs();
    values = new ArrayList<HomeListData>();
    if (cursor != null && cursor.getCount() != 0) {
      cursor.moveToFirst();
      while (!cursor.isAfterLast()) {
        HomeListData data = new HomeListData();
        int gid = cursor.getInt(0);
        data.gametitle = db.getGameTitle(gid);
        data.team1 = db.getGameT1(gid);
        data.team2 = db.getGameT2(gid);

        values.add(data);
        cursor.moveToNext();
      }
    }
    cursor.close();
  }