Exemplo n.º 1
0
 @Override
 public void onStart() {
   Log.d(TAG, "Starting fragment");
   super.onStart();
   dynamicBacklogAmount =
       Integer.parseInt(
           preferences.getString(getString(R.string.preference_dynamic_backlog), "10"));
   autoCompleteButton.setEnabled(false);
   inputField.setEnabled(false);
   BusProvider.getInstance().register(this);
   setUserVisibleHint(true);
 }
Exemplo n.º 2
0
  @Override
  public void onStart() {
    super.onStart();
    if (preferences.getBoolean("enable_server_on_app_startup", false)) {

      Context context = getSherlockActivity();
      context.startService(new Intent(context, ServerService.class));

      final boolean enableSU = preferences.getBoolean("run_as_root", false);
      final String execName = preferences.getString("use_server_httpd", "lighttpd");
      final String bindPort = preferences.getString("server_port", "8080");

      CommandTask task = CommandTask.createForConnect(context, execName, bindPort);
      task.enableSU(enableSU);
      task.execute();
    }
    new ConnectionListenerTask().execute();
  }
Exemplo n.º 3
0
  @Override
  public void onStart() {
    super.onStart();

    try {
      float mWindowAnimation =
          Settings.System.getFloat(
              getActivity().getContentResolver(), Settings.System.WINDOW_ANIMATION_SCALE);
      mLyricsScrollView.setSmoothScrollingEnabled(mWindowAnimation > 0.0);

    } catch (SettingNotFoundException e) {
      e.printStackTrace();
    }

    IntentFilter screenstatusfilter = new IntentFilter();
    screenstatusfilter.addAction(Intent.ACTION_SCREEN_ON);
    screenstatusfilter.addAction(Intent.ACTION_SCREEN_OFF);
    getActivity().registerReceiver(mScreenTimeoutListener, screenstatusfilter);
  }
Exemplo n.º 4
0
  @Override
  public void onStart() {
    super.onStart();

    res = getSherlockActivity().getResources();

    listView = (ListView) getSherlockActivity().findViewById(R.id.comment_list2); // 自分で用意したListView
    waitBar = (ProgressBar) getSherlockActivity().findViewById(R.id.ProgressBarInCommentList);

    calendar = Calendar.getInstance();

    // IPPログインチェック
    loginChecked = new CountDownLatch(2);
    ippLoginCheck();

    // 位置情報が利用できるか否かをチェック
    prepareLocation();

    // アダプタの準備
    try {
      loginChecked.await(); // ログインが終わるまで待つ
      // adapter = new CohesiveCommentAdapter(getSherlockActivity(), new ArrayList<CommentItem>(),
      // team_resource_id, role_self);
      adapter =
          new CommentAdapter(
              getSherlockActivity(),
              new ArrayList<CommentItem>(),
              team_resource_id,
              role_self,
              ipp_auth_key,
              mNowLocation);

    } catch (InterruptedException e1) {

      Log.d(TAG, e1.toString());
    }
    // アダプタのインスタンス作成時にteam_resource_idがないと困る

    // コメント投稿ボタンを押したら
    prapareCommentSend();

    // ツイートする チェックボックスをタップしたら
    /*
    tweetCheckBox = (CheckBox) getSherlockActivity().findViewById(R.id.check_tweet);
    tweetCheckBox.setOnClickListener(new View.OnClickListener() {
    	@Override
    	public void onClick(View v) {
    		if (tweetCheckBox.isChecked()) { //「ツイートする」にチェックが入っていたら
    			//ログインチェックとログイン画面への自動遷移
    			checkLoginTwitter();
    		}
    	}
    });
    */

    prepareChangeMonth();

    // アクションバー右上のメニュー切り替え
    switch (MainActivity.mMenuType) {
      case MainActivity.SummaryFragmentMenu:
        MainActivity.mMenuType = MainActivity.CommentFragmentMenu;
        break;
      default:
        break;
    }
    this.getSherlockActivity().supportInvalidateOptionsMenu();

    // IPPからコメント読み込む
    // 更に読みこむ機能の実装
    showCommentList(target_year, target_month, 0, near);
  }
 @Override
 public void onStart() {
   super.onStart();
   EasyTracker.getTracker().sendView(mTopicLeaf.getName() + " Guides");
 }
Exemplo n.º 6
0
 @Override
 public void onStart() {
   super.onStart();
 }
 @Override
 public void onStart() {
   super.onStart();
   startRefresh();
 }
 @Override
 public void onStart() {
   Log.v(DetailsFragment.TAG, String.format("in DetailsFragment onStart", mIndex));
   super.onStart();
 }
  @SuppressWarnings("deprecation")
  @Override
  public void onStart() {
    super.onStart();
    evento = new Evento();
    eId = new EventoId();
    date = new Date();
    mPickDate = (EditText) fview.findViewById(R.id.myDatePickerButton);
    mPickTime = (EditText) fview.findViewById(R.id.myTimePickerButton);
    mPickDate.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            showDatePickerDialog(fview);
          }
        });

    mPickTime.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            showTimePickerDialog(fview);
          }
        });
    // get the current date
    final Calendar c = Calendar.getInstance();
    mYear = c.get(Calendar.YEAR);
    mMonth = c.get(Calendar.MONTH);
    mDay = c.get(Calendar.DAY_OF_MONTH);
    // get the current Time
    hour = c.get(Calendar.HOUR_OF_DAY);
    minute = c.get(Calendar.MINUTE);
    // display the current date
    updateDisplay();

    int customYear = mYear - 1900;
    date.setYear(customYear);
    date.setMonth(mMonth);
    date.setDate(mDay);
    eId.setStart(new Time(hour, minute, 0));
    eId.setStop(new Time(hour, minute, 0));
    title = (EditText) fview.findViewById(R.id.editTextTitle);
    description = (EditText) fview.findViewById(R.id.editTextDescription);
    coursesSpinner = (Spinner) fview.findViewById(R.id.spinnerCorsi);
    new CoursesLoader().execute();
    Button button_ok = (Button) fview.findViewById(R.id.button_ok);
    Button button_cancel = (Button) fview.findViewById(R.id.button_annulla);
    button_cancel.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            getSherlockActivity().onBackPressed();
          }
        });
    button_ok.setOnClickListener(
        new OnClickListener() {

          @Override
          public void onClick(View v) {
            evento.setType(title.getText().toString());
            evento.setTitle(cC.get(coursesSpinner.getSelectedItemPosition()).getName());
            // evento.setTeacher("IO");
            evento.setPersonalDescription(description.getText().toString());
            evento.setEventoId(eId);
            evento.setAdCod(
                Long.parseLong(cC.get(coursesSpinner.getSelectedItemPosition()).getCod()));
            long dateR = 10000 * (date.getTime() / 10000);
            eId.setDate(new Date(dateR));

            new PostEvent(getSherlockActivity(), evento).execute();
            Toast.makeText(
                    getSherlockActivity(),
                    getSherlockActivity().getResources().getString(R.string.toast_event_added),
                    Toast.LENGTH_SHORT)
                .show();
            getSherlockActivity().onBackPressed();
          }
        });
  }
Exemplo n.º 10
0
 @Override
 public void onStart() {
   super.onStart();
   listenForTransferProgress();
 }