コード例 #1
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    GroceryListAdapter adapter = new GroceryListAdapter(this.getActivity());

    db = DataAccessStub.getInstance();
    db.open("GroceryList");
    groceryList = db.getGroceriesByDepartment();

    Set<String> departments = groceryList.keySet();
    ArrayList<Grocery> departmentGroceries;

    for (String department : departments) {
      adapter.addHeaderItem(department);

      departmentGroceries = groceryList.get(department);

      for (Grocery grocery : departmentGroceries) {
        adapter.addGroceryItem(grocery.getName());
      }
    }

    setListAdapter(adapter);
  }
コード例 #2
0
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getActivity().setTitle(R.string.family_members_title);

    FamilyMemberAdapter adapter = new FamilyMemberAdapter(mFamily.returnFamilyArray());
    setListAdapter(adapter);
  }
コード例 #3
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   PDroidAppListLoader appListLoader =
       new PDroidAppListLoader(getActivity(), new LoadTaskCompleteHandler());
   appListLoader.execute();
 }
コード例 #4
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setHasOptionsMenu(true);

    getActivity().getActionBar().setHomeButtonEnabled(true);
  }
コード例 #5
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   mNsdHelper = new NsdHelper(this.getActivity());
   initializeListAdapter();
   this.setListAdapter(mListAdapter);
 }
コード例 #6
0
ファイル: ListFragment.java プロジェクト: rycus86/TweetWear
  @Override
  public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    listAdapter = new ListAdapter();
    setListAdapter(listAdapter);
  }
コード例 #7
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   adapter = new AlbumAdapter(this);
   loadData();
   setListAdapter(adapter);
 }
コード例 #8
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   mApplication = (WifiExporterApplication) getActivity().getApplication();
   mNetworkAdapter = new NetworkAdapter(getActivity(), mApplication.getNetworks());
   setListAdapter(mNetworkAdapter);
   mApplication.registerWigleDbUpdateCallback(this);
 }
コード例 #9
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   if (getArguments() != null) {
     this.galleriesUrl = getArguments().getString(ARG_GALLERIES_LIST_URL);
   }
   fetchGalleryList();
 }
コード例 #10
0
  // Initialize data fields
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    favoriteList = new ArrayList<JSONObject>();
    favoriteAdapter = new FavoriteAdapter(favoriteList);
    setListAdapter(favoriteAdapter);
  }
コード例 #11
0
ファイル: ToDoListFragment.java プロジェクト: xuhaohao/ToDo
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (getArguments() != null) {
      tag = getArguments().getString(TAG);
      name = getArguments().getString(Name);
    }
  }
コード例 #12
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    String[] lsa = new String[] {"Downloading..."};
    setListAdapter(
        new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, lsa));

    new DownloadCourses().execute();
  }
コード例 #13
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // TODO: replace with a real list adapter.
    setListAdapter(
        new ArrayAdapter<DummyContent.DummyItem>(
            getActivity(),
            android.R.layout.simple_list_item_activated_1,
            android.R.id.text1,
            DummyContent.ITEMS));
  }
コード例 #14
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    TapchatApp.get().inject(this);

    setHasOptionsMenu(true);

    mConnectionId = getArguments().getLong(ARG_CONNECTION_ID);
    mBufferId = getArguments().getLong(ARG_BUFFER_ID);

    mStatusBar = new ConnectionStatusBar(this, mConnectionId);
  }
コード例 #15
0
ファイル: ItemFragment.java プロジェクト: zhutao2015/GTD
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // TODO: Change Adapter to display your content
    setListAdapter(
        new ArrayAdapter<DummyContent.DummyItem>(
            getActivity(),
            android.R.layout.simple_list_item_1,
            android.R.id.text1,
            DummyContent.ITEMS));
  }
コード例 #16
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (savedInstanceState != null) {
      ArrayList<MovieItem> checkItems =
          savedInstanceState.getParcelableArrayList(STATE_CAB_CHECKED_ITEMS);
      mCheckedItems.addAll(checkItems);
      ArrayList<MovieItem> list = savedInstanceState.getParcelableArrayList(STATE_LIST);
      setListAdapter(new MovieArrayAdapter(getActivity(), list));
    } else {
      setListAdapter(new MovieArrayAdapter(getActivity()));
    }
  }
コード例 #17
0
ファイル: MailboxFragment.java プロジェクト: PiotrG2015/Run
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    pDialog = new ProgressDialog(getActivity());
    db = new SQLiteHandler(getActivity().getApplicationContext());
    HashMap<String, String> user = db.getUserDetails();
    user_id = user.get("uid");
    user_pid = user.get("id");
    getMailboxList();
    adapter = new MailboxListAdapter(getActivity());
    setListAdapter(adapter);
    hideDialog();
  }
コード例 #18
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    int roomId = getActivity().getIntent().getExtras().getInt(MainTabActivity.EXTRA_ROOM_ID);
    market = (Market) GameApplication.getDefaultGameApplication().getServer().getRoomWithID(roomId);
    adapter =
        new ArrayAdapter<Person>(
            getActivity(),
            android.R.layout.simple_list_item_activated_1,
            android.R.id.text1,
            market.getAvailableSlave());
    setListAdapter(adapter);
  }
コード例 #19
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (getArguments() != null) {
      mParam1 = getArguments().getString(ARG_PARAM1);
      mParam2 = getArguments().getString(ARG_PARAM2);
    }

    // TODO: Change Adapter to display your content
    setListAdapter(
        new ArrayAdapter<RecommendFriendContent.RecommendFriend>(
            getActivity(),
            android.R.layout.simple_list_item_1,
            android.R.id.text1,
            RecommendFriendContent.ITEMS));
  }
コード例 #20
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    final TapManager tapManager = KegbotCore.getInstance(getActivity()).getTapManager();
    mTaps.addAll(tapManager.getTaps());

    mAdapter =
        new KegTapAdapter(
            getActivity(),
            android.R.layout.simple_list_item_activated_1,
            android.R.id.text1,
            mTaps);

    mBus = KegbotCore.getInstance(getActivity()).getBus();

    mBus.register(this);
  }
コード例 #21
0
  /** ************************ ListFragment Overrides * ************************ */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Bundle arguments = getArguments();
    if (arguments.containsKey(ARG_ITEM_ID)) {
      chatId = (String) arguments.get(ARG_ITEM_ID);
      Optional<Chat> chat = userProfile.getChat(chatId);
      if (chat.isPresent() && !chat.get().messages.isEmpty()) {
        messageAdapter =
            new MessageListArrayAdapter(getActivity(), new ArrayList<>(chat.get().messages));
      } else {
        messageAdapter = new MessageListArrayAdapter(getActivity());
        worker.getChatMessages(chatId);
      }
      setListAdapter(messageAdapter);
    }
  }
コード例 #22
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (savedInstanceState != null) {
      mCheckedCount = savedInstanceState.getInt(STATE_CAB_CHECKED_COUNT);
      try {
        JSONArray list = new JSONArray(savedInstanceState.getString(STATE_LIST));
        setListAdapter(new MovieJSONAdapter(getActivity(), list));
      } catch (JSONException e) {
        Log.e(JSONAdapterFragment.class.getSimpleName(), "OnRestore Error", e);
        mCheckedCount = 0;
        setListAdapter(new MovieJSONAdapter(getActivity()));
      }
    } else {
      setListAdapter(new MovieJSONAdapter(getActivity()));
    }
  }
コード例 #23
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Activity activity = getActivity();

    Intent gattServiceIntent = new Intent(activity, BluetoothLeService.class);
    getActivity()
        .getApplicationContext()
        .bindService(gattServiceIntent, mServiceConnection, activity.BIND_AUTO_CREATE);

    alarmList = new AlarmArrayAdapter(getActivity(), getFragmentManager(), this);

    pdialog = new ProgressDialog(activity);
    pdialog.setCancelable(true);
    pdialog.setMessage(getResources().getString(R.string.loading));
    pdialog.show();
  }
コード例 #24
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    dao = new TroubDAO(this.getActivity());
    try {
      dao.open();
    } catch (SQLException e) {
      String error = "Unable to open TroubDAO" + e.getStackTrace();
      Log.e(SongListFragment.class.getName(), error);
    }

    List<Song> songs = dao.getAllSongs();

    // use the SimpleCursorAdapter to show the
    // elements in a ListView
    ArrayAdapter<Song> adapter =
        new ArrayAdapter<Song>(this.getActivity(), android.R.layout.simple_list_item_1, songs);
    setListAdapter(adapter);
    setHasOptionsMenu(true);
  }
コード例 #25
0
ファイル: RssFragment.java プロジェクト: allister0098/Matome
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mItems = new ArrayList<>();
    adapter = new ListAdapter(mActivity, mItems);
    rdfTask = new RdfParserTask(mActivity, this, adapter);
    atomTask = new AtomParserTask(mActivity, this, adapter);

    if (url == null) {
      rdfTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, Content.MIND_MATOME);
    } else if (url.contains("atom")) {
      switch (url) {
        case Content.PHILOSOPHY_NEWS:
          atomTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, Content.PHILOSOPHY_NEWS);
          break;
      }
    } else if (url.contains(".rdf")) {
      switch (url) {
        case Content.MIND_MATOME:
          rdfTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, Content.MIND_MATOME);
          break;

        case Content.ALFA_MOSAIC:
          rdfTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, Content.ALFA_MOSAIC);
          break;

        case Content.GAME_NEWS_JIN:
          rdfTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, Content.GAME_NEWS_JIN);
          break;

        case Content.BIP_BLOG:
          rdfTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, Content.BIP_BLOG);
          break;

        case Content.HACHIMA_BLOG:
          rdfTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, Content.HACHIMA_BLOG);
          break;
      }
    }
  }
コード例 #26
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // TODO: replace with a real list adapter.
    Activity activity = getActivity();
    ContentAdapterString content = null;
    try {
      content = (ContentAdapterString) activity;
    } catch (ClassCastException e) {
      e.printStackTrace();
    }
    setListAdapter(
        new ListContentAdapter(
            activity, content, android.R.layout.simple_list_item_activated_1, android.R.id.text1));

    /*new ArrayAdapter<DummyContent.DummyItem>(
    getActivity(),
    android.R.layout.simple_list_item_activated_1,
    android.R.id.text1,
    DummyContent.ITEMS));*/
  }
コード例 #27
0
  @Override
  public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    String[] uiBindFrom = {
      RestoDatabase.COL_ETAB,
      RestoDatabase.COL_INFO,
      RestoDatabase.COL_MONTANT,
      RestoDatabase.COL_ADR,
      RestoDatabase.COL_DATE_JUGE
    };
    int[] uiBindTo = {R.id.Etablissement, R.id.Exploitant, R.id.Montant, R.id.Adresse, R.id.Date};
    adapter =
        new MyCursorAdapter(
            getActivity(),
            R.layout.rownew,
            null,
            uiBindFrom,
            uiBindTo,
            CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);
    setListAdapter(adapter);
  }
コード例 #28
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // getActivity().setTitle(R.string.app_name);
    this.mContext = getActivity();
    mSharedPrefs = getActivity().getSharedPreferences("cyathen_references", Activity.MODE_PRIVATE);
    mSharedPrefsEditor = mSharedPrefs.edit();
    mSharedPrefsEditor.putInt("ListMode", mListMode);
    mSharedPrefsEditor.commit();
    // Log.d(TAG, "EventListFragment:onCreate- mListMode = " + mListMode);
    if (mEvents == null) {
      // Log.d(TAG, "mEvents was null; will grab from inventory");
      mEvents = EventInventory.get(getActivity()).getEvents();
      // Log.d(TAG, mEvents.size() + " events found in mEvents");
    } else {
      // Log.d(TAG, mEvents.size() + " from setEvents() method");
    }

    mAdapter = new EventAdapter(mEvents);
    this.setListAdapter(mAdapter);

    // retrieveAllEventImages();
  }
コード例 #29
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   super.onCreate(savedInstanceState);
   setHasOptionsMenu(true);
 }
コード例 #30
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setListAdapter(new FrameAdapter(getActivity(), FrameContent.ITEMS));
  }