Exemplo n.º 1
0
  public static ListMirakel getList(Context context, int widgetId) {

    int listId = getSettings(context).getInt(getKey(widgetId, "list_id"), 0);
    ListMirakel list = ListMirakel.getList(listId);
    if (list == null) {
      list = SpecialList.firstSpecial();
      if (list == null) {
        list = ListMirakel.first();
        if (list == null) {
          Toast.makeText(context, "You have no Lists!", Toast.LENGTH_SHORT).show();
          return null;
        }
      }
    }
    return list;
  }