@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initialize the loader to load the list of runs
    getLoaderManager().initLoader(R.id.component_list_fragment, getArguments(), this);
  }
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   fm = getActivity().getSupportFragmentManager();
   mTransactions = TransactionData.get(getActivity()).getTransactions();
   adapter = new TransactionAdapter(mTransactions);
   setListAdapter(adapter);
 } // onCreate
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   listItens =
       Arrays.asList(
           new ItemTO("Primeiro"),
           new ItemTO("Segundo"),
           new ItemTO("Terceiro"),
           new ItemTO("Quarto"),
           new ItemTO("Quinto"),
           new ItemTO("Sexto"),
           new ItemTO("Primeiro"),
           new ItemTO("Segundo"),
           new ItemTO("Terceiro"),
           new ItemTO("Quarto"),
           new ItemTO("Quinto"),
           new ItemTO("Sexto"),
           new ItemTO("Primeiro"),
           new ItemTO("Segundo"),
           new ItemTO("Terceiro"),
           new ItemTO("Quarto"),
           new ItemTO("Quinto"),
           new ItemTO("Sexto"));
   myListAdapter = new MyListAdapter();
   setListAdapter(myListAdapter);
 }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    ArtistListItem x = new ArtistListItem();
    x.Name = "qwww";

    mArtistsList = new ArrayList();

    mArtistsList.add(x);

    if (Settings.getInstance().ArtistList != null) {
      for (ArtistListItem a : Settings.getInstance().ArtistList) {
        mArtistsList.add(a);
      }
    }

    mArtistListAdapter = new ArtistAdapter(getActivity(), R.layout.list_item_artists, mArtistsList);

    setListAdapter(mArtistListAdapter);

    /*
    setListAdapter(new ArrayAdapter<DummyContent.DummyItem>(
            getActivity(),
            android.R.layout.simple_list_item_activated_1,
            android.R.id.text1,
            DummyContent.ITEMS));*/

    LocalBroadcastManager.getInstance(getActivity())
        .registerReceiver(mMessageReceiver, new IntentFilter("recieveArtistUpdate"));
  }
  @Override
  public void onCreate(@Nullable Bundle savedInstanceState) {
    Log.v(LOG_TAG, "onCreate(): ");
    super.onCreate(savedInstanceState);
    MyNetworkStatus.getNetworkConnection(getActivity(), TAG);
    context = getContext();
    mFragmentManager = getActivity().getSupportFragmentManager();
    MyNetworkStatus.getNetworkConnection(context, TAG);
    mSharedPreferences = getActivity().getPreferences(Context.MODE_PRIVATE);
    bookMarkHelper = new BookMarkHelper(getActivity());
    builder = new AlertDialog.Builder(getActivity());
    ((MainActivity) getActivity()).hideSearchMenuItem();
    mSiteItemList = bookMarkHelper.getBookMarks();
    if (mSiteItemList.size() < 0) {
      builder
          .setTitle("BookMark")
          .setMessage("Data is empty, please choose!")
          .setPositiveButton(
              "OK",
              new OnClickListener() {

                @Override
                public void onClick(DialogInterface dialog, int which) {
                  mFragmentManager
                      .beginTransaction()
                      .replace(R.id.container, new SiteListFragment())
                      .commit();
                }
              })
          .show();
      return;
    }
    preferences = getActivity().getSharedPreferences("config", Context.MODE_PRIVATE);
  }
  @Override
  public void onCreate(Bundle saveInstanceState) {
    super.onCreate(saveInstanceState);
    setHasOptionsMenu(true);

    getActivity().setTitle(R.string.crimes_title);

    /*
     * 调用 CrimeLab的静态方法get
     * 在get()内部创建CrimeLab对象,(单例)。同时返回对象
     * 在CrimeListFragment中使用此对象: mCrimes 进行工作
     */
    mCrimes = CrimeLab.get(getActivity()).getCrimes();

    // --显示 圆圈圈 的 运行图标,资源布局使用系统却省的:
    //              android.R.layout.simple_list_item_1
    // ArrayAdapter<Crime>adapter =
    //		new ArrayAdapter<Crime>(getActivity(),
    //				                android.R.layout.simple_list_item_1,
    //				                mCrimes);

    // 创建 控制器 对象 Adapter ----- 用于控制:模型与视图之间的交换控制
    /*
     * (1)创建必要的视图对象
     * (2)用模型层数据填充视图对象
     * (3)将准备好的视图对象返回给ListView
     */

    CrimeAdapter adapter = new CrimeAdapter(mCrimes);

    setListAdapter(adapter);
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mHandler = new NotifyingAsyncQueryHandler(getActivity().getContentResolver(), this);
    reloadFromArguments(getArguments());
  }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setRetainInstance(true);
   IntentFilter filter = new IntentFilter(HotelIntentService.ACAO_SINCRONIZAR);
   LocalBroadcastManager.getInstance(getActivity()).registerReceiver(mServiceReceiver, filter);
 }
Exemple #9
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    activity = (FormActivity) getActivity();
    fragmentTitles = activity.getFragmentTitles();
  }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setListAdapter(
       new ArrayAdapter<DummyContent.DummyItem>(
           getActivity(), R.layout.simple_list_item_activated_1, R.id.text1, DummyContent.ITEMS));
 }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mCurrentClass = ((MainActivity) getActivity()).getCurrentClass();
    ((MainActivity) getActivity()).toolbarChange(mCurrentClass);
  }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setHasOptionsMenu(true);
   setRetainInstance(true);
   mHandler = new NotifyingAsyncQueryHandler(getActivity().getContentResolver());
   mHandler.setDeleteListener(this);
 }
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    files = StorageManager.getImportedDataFiles(getActivity());
    adapter = new ImportedFileRowAdapter(getActivity(), files);
    setListAdapter(adapter);
  }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   getActivity().setTitle(R.string.foods_title);
   mFoods = FoodLab.get(getActivity()).getFoods();
   FoodAdapter adapter = new FoodAdapter(mFoods);
   setListAdapter(adapter);
 }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   super.onCreate(savedInstanceState);
   setListAdapter(
       new ArrayAdapter<String>(
           getActivity(), android.R.layout.simple_list_item_1, Ipsum.Headlines));
 }
Exemple #16
0
 /** Called when loading up the activity */
 @Override
 public void onCreate(Bundle savedInstanceState) {
   DependencyInjectionService.getInstance().inject(this);
   super.onCreate(savedInstanceState);
   extras = getArguments() != null ? getArguments().getBundle(TOKEN_EXTRAS) : null;
   if (extras == null)
     extras = new Bundle(); // Just need an empty one to prevent potential null pointers
 }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setHasOptionsMenu(true);
    initializeUserVariableAdapter();

    this.actionBarTitle = getArguments().getString(ACTION_BAR_TITLE_BUNDLE_ARGUMENT);
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setHasOptionsMenu(true);
    // Initialize the loader to load the list of runs
    getLoaderManager().initLoader(R.id.decoration_list_fragment, null, this);
  }
  /*
   * (non-Javadoc)
   *
   * @see android.app.Fragment#onCreate(android.os.Bundle)
   */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setListAdapter(
        ArrayAdapter.createFromResource(
            getActivity().getApplicationContext(), R.array.country_names, R.layout.list_item));
  }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   List<String> testNames = GdxTests.getNames();
   setListAdapter(
       new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, testNames));
   prefs = getActivity().getSharedPreferences("libgdx-tests", Context.MODE_PRIVATE);
 }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    location = SplashActivity.locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);

    SQLHelper = new SQLiteHelper(getActivity());
    db = SQLHelper.getReadableDatabase();
    System.out.println("in onCreate");
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mUiHelper = new UiLifecycleHelper(getActivity(), callback);
    mUiHelper.onCreate(savedInstanceState);

    setHasOptionsMenu(true);
  }
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   SQLHelper = new SQLiteHelper(getActivity());
   view = inflater.inflate(R.layout.fragment_main, container, false);
   // return view;
   return selectDisplayGroup(view, ParentPosition);
 }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getActivity().setTitle(R.string.crimes_title);
    mCrimes = CrimeLab.get(getActivity()).getCrimes();

    mAdapter = new CrimeAdapter(mCrimes);
    setListAdapter(mAdapter);
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Routine selectedRoutine = DataManager.getCurrentPatient().getSelectedRoutine();
    setListAdapter(
        new ExerciseAdapter(
            getActivity(), DataManager.getCurrentPatient().getExercises(selectedRoutine)));
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Check if this fragment is part of a two-pane set up or a single pane
    // by reading a
    // boolean from the application resource directories. This lets allows
    // us to easily specify
    // which screen sizes should use a two-pane layout by setting this
    // boolean in the
    // corresponding resource size-qualified directory.
    // mIsTwoPaneLayout = getResources().getBoolean(R.bool.has_two_panes);

    // Let this fragment contribute menu items
    setHasOptionsMenu(true);

    // Create the main contacts adapter
    mAdapter = new ContactsAdapter(getActivity());

    if (savedInstanceState != null) {
      // If we're restoring state after this fragment was recreated then
      // retrieve previous search term and previously selected search
      // result.
      mSearchTerm = savedInstanceState.getString(SearchManager.QUERY);
      mPreviouslySelectedSearchItem = savedInstanceState.getInt(STATE_PREVIOUSLY_SELECTED_KEY, 0);
    }

    /*
     * An ImageLoader object loads and resizes an image in the background
     * and binds it to the QuickContactBadge in each item layout of the
     * ListView. ImageLoader implements memory caching for each image, which
     * substantially improves refreshes of the ListView as the user scrolls
     * through it.
     *
     * To learn more about downloading images asynchronously and caching the
     * results, read the Android training class Displaying Bitmaps
     * Efficiently.
     *
     * http://developer.android.com/training/displaying-bitmaps/
     */
    mImageLoader =
        new ImageLoader(getActivity(), getListPreferredItemHeight()) {
          @Override
          protected Bitmap processBitmap(Object data) {
            // This gets called in a background thread and passed the data
            // from
            // ImageLoader.loadImage().
            return loadContactPhotoThumbnail((String) data, getImageSize());
          }
        };

    // Set a placeholder loading image for the image loader
    mImageLoader.setLoadingImage(R.drawable.ic_contact_picture_holo_light);

    // Add a cache to the image loader
    mImageLoader.addImageCache(getActivity().getSupportFragmentManager(), 0.1f);
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mArgs = getArguments();
    mContext = getActivity();

    mAdapter = new ScheduleAdapter(getActivity(), null, 0);
    setListAdapter(mAdapter);
  }
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    App.get(getActivity()).inject(this);

    sharedPref = PreferenceManager.getDefaultSharedPreferences(getActivity());

    setHasOptionsMenu(true);
  }
Exemple #29
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   ArrayAdapter<String> adapter =
       new ArrayAdapter<String>(
           getActivity(),
           android.R.layout.simple_list_item_1,
           getResources().getStringArray(R.array.headers));
   setListAdapter(adapter);
 }
Exemple #30
0
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
    metric =
        !prefs
            .getString(SettingsFragment.PREF_UNITS, SettingsFragment.PREF_UNITS_DEFAULT)
            .equals(SettingsFragment.VALUE_UNITS_IMPERIAL);
  }