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

    // init joda date time
    JodaTimeAndroid.init(this);
  }
コード例 #2
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_painel_active, container, false);

    ctx = container.getContext();

    sharedPrefs =
        this.getActivity().getSharedPreferences(TimeOption.PREFERENCE_NAME, Context.MODE_PRIVATE);

    btnReset = (Button) view.findViewById(R.id.btnReset);
    btnReset.setOnClickListener(this);

    fm = getFragmentManager();

    JodaTimeAndroid.init(view.getContext());

    time = (TextView) view.findViewById(R.id.timeRemaining);

    txtAlarmDone = (TextView) view.findViewById(R.id.textAlarmDone);

    txtAlarmPre = (TextView) view.findViewById(R.id.textAlarmPre);

    txtTimeSelected = (TextView) getActivity().findViewById(R.id.txtTimeSelected);

    txtTimeSelected.setText(
        " em "
            + TimeOption.getCodeTimeChosen(
                sharedPrefs.getString(TimeOption.TIME_CHOSEN, "00:00:00")));

    return view;
  }
コード例 #3
0
ファイル: YearlyApp.java プロジェクト: lweynant/Yearly
 @Override
 public void onCreate() {
   super.onCreate();
   if (BuildConfig.DEBUG) {
     // in integration tests onCreate will be called multiple times, we will
     // therefor first removed all planted trees (uprootAll()
     Timber.uprootAll();
     Timber.plant(new Timber.DebugTree());
   }
   Timber.d("onCreate");
   JodaTimeAndroid.init(this);
   component = null;
 }
コード例 #4
0
ファイル: App.java プロジェクト: nikunjkacha/twittererer
  @Override
  public void onCreate() {
    super.onCreate();

    JodaTimeAndroid.init(this);

    TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
    Fabric.with(this, new Crashlytics(), new Twitter(authConfig));

    applicationComponent =
        DaggerApp_ApplicationComponent.builder()
            .applicationModule(new ApplicationModule(this))
            .build();
  }