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

    // init joda date time
    JodaTimeAndroid.init(this);
  }
  @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
 @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
  @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();
  }