Exemplo n.º 1
0
 @Override
 public void onStart() {
   super.onStart();
   if (!mLocationClient.isStarted()) {
     mLocationClient.start();
   }
 }
Exemplo n.º 2
0
  @Override
  public void onStart() {
    Log.i("fragment生命周期", this.toString() + " onStart()");

    // TODO Auto-generated method stub
    super.onStart();
  }
  @Override
  public void onStart() {
    super.onStart();

    layoutCustomer();
    updateHideControls();
  }
Exemplo n.º 4
0
    @Override
    public void onStart() {
      super.onStart();

      Button mLostButton = (Button) getActivity().findViewById(R.id.lost_artifact);
      mLostButton.setOnClickListener(
          new OnClickListener() {
            @Override
            public void onClick(View view) {
              Intent activityIntent = new Intent(view.getContext(), ArtifactListScreen.class);
              startActivity(activityIntent);
            }
          });

      Button mFoundButton = (Button) getActivity().findViewById(R.id.found_artifact);
      mFoundButton.setOnClickListener(
          new OnClickListener() {
            @Override
            public void onClick(View view) {
              Toast.makeText(
                      view.getContext(),
                      getString(R.string.found_artifact_button),
                      Toast.LENGTH_LONG)
                  .show();
            }
          });
    }
Exemplo n.º 5
0
 @Override
 public void onStart() {
   super.onStart();
   calculateButton()
       .setOnClickListener(
           new View.OnClickListener() {
             @Override
             public void onClick(View v) {
               hideKeypad();
               Chit chit = null;
               try {
                 chit =
                     new Chit(chitValue(), totalMonths(), completedMonths(), dividendReceived());
                 bidText().setText(chitCalculator.bidSummary(chit, rateOfInterest()));
               } catch (ProfitableBidNotFoundException e) {
                 long minBid = chitCalculator.minBid(chit);
                 bidText()
                     .setText(
                         "No bid can fetch profit.\n"
                             + chitCalculator.bidSummary(chit, rateOfInterest(), minBid));
               } catch (RuntimeException e) {
                 bidText().setText("Invalid inputs.\n" + e.getMessage());
               }
             }
           });
   clearButton()
       .setOnClickListener(
           new View.OnClickListener() {
             @Override
             public void onClick(View v) {
               hideKeypad();
               clear();
             }
           });
 }
Exemplo n.º 6
0
 @Override
 public void onStart() {
   super.onStart();
   // Bind to LocalService
   Intent intent = new Intent(getActivity(), MsgService.class);
   getActivity().bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
 }
Exemplo n.º 7
0
  @Override
  public void onStart() {
    super.onStart();
    mRecyclerView = (RecyclerView) view.findViewById(R.id.my_recycler_view);
    mRecyclerView.setHasFixedSize(true);
    mLayoutManager = new LinearLayoutManager(getContext());
    mRecyclerView.setLayoutManager(mLayoutManager);
    mAdapter = new MyRecyclerViewAdapter(profileDataset());
    mRecyclerView.setAdapter(mAdapter);
    initiatizeViews();

    //        RecyclerView.ItemDecoration itemDecoration =  new DividerItemDecoration(getContext(),
    // LinearLayoutManager.VERTICAL);
    //        mRecyclerView.addItemDecoration(itemDecoration);

    // Code to Add an item with default animation
    // ((MyRecyclerViewAdapter) mAdapter).addItem(obj, index);

    // Code to remove an item with default animation
    // ((MyRecyclerViewAdapter) mAdapter).deleteItem(index);
    ((MyRecyclerViewAdapter) mAdapter)
        .setOnItemClickListener(
            new MyRecyclerViewAdapter.MyClickListener() {
              @Override
              public void onItemClick(int position, View v) {
                Log.i(LOG_TAG, " Clicked on Item " + position);
              }
            });
  }
 @Override
 public void onStart() {
   super.onStart();
   if (settings.getBoolean(BeemApplication.PROXY_USE_KEY, false)) {
     mSettingsWarningLabel.setVisibility(View.VISIBLE);
   } else mSettingsWarningLabel.setVisibility(View.GONE);
 }
 @Override
 public void onStart() {
   super.onStart();
   if (mGoogleApiClient != null) {
     mGoogleApiClient.connect();
   }
 }
  @Override
  public void onStart() {
    super.onStart();

    // on starting the app get the camera params
    getCamera();
  }
 @Override
 public void onStart() {
   super.onStart();
   if (mMoviesAdapter.isEmpty()) {
     updateMovieGallery();
   }
 }
Exemplo n.º 12
0
  @Override
  public void onStart() {
    super.onStart();

    TouchImageView mapPanView =
        (TouchImageView) getActivity().findViewById(R.id.TrailBreakdownView);
    // set max zoom a user can zoom into the map when double tapping or
    // pinching
    mapPanView.setMaxZoom(10);

    Bitmap bitmap1 =
        BitmapFactory.decodeResource(getActivity().getResources(), R.drawable.trails_breakdown);

    Bitmap drawnBitmap = null;

    try {
      drawnBitmap = Bitmap.createBitmap(1447, 1966, Bitmap.Config.RGB_565);

      // canvas for painting onto the map view
      Canvas canvas = new Canvas(drawnBitmap);
      // JUST CHANGE TO DIFFERENT Bitmaps and coordinates .
      int mapX = 0;
      int mapY = 0;
      int mapWidth = 1447;
      int mapHeight = 1966;
      canvas.drawBitmap(bitmap1, null, new Rect(mapX, mapY, mapWidth, mapHeight), null);

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

    // first map has no points marked
    mapPanView.setImageBitmap(drawnBitmap);
  }
Exemplo n.º 13
0
 @Override
 public void onStart() {
   // TODO Auto-generated method stub
   super.onStart();
   appState.getDB();
   updateUI();
 }
Exemplo n.º 14
0
  @Override
  public void onStart() {
    super.onStart();

    // Log current Fragment name;
    LogUtil.i(TAG, getClass().getSimpleName() + " : onStart ");
  }
Exemplo n.º 15
0
  @Override
  public void onStart() {
    super.onStart();
    IntentFilter intentFilter = new IntentFilter();

    intentFilter.addAction("history");
    LocalBroadcastManager.getInstance(getActivity()).registerReceiver(receiver, intentFilter);
  }
 @Override
 public void onStart() {
   super.onStart();
   if (mMovie != null) {
     new FetchTrailersTask().execute(Integer.toString(mMovie.getId()));
     new FetchReviewsTask().execute(Integer.toString(mMovie.getId()));
   }
 }
  /** Appends HTML Dom to webkit */
  @Override
  public void onStart() {

    super.onStart();

    new Browser(
        getActivity(), R.id.fragment_red_webview, "file:///android_asset/fragment_red.html", null);
  }
Exemplo n.º 18
0
 @Override
 public void onStart() {
   super.onStart();
   // 初始化数据
   initData();
   brainAdapter = new BrainAdapter(context, brainItems);
   xListView.setAdapter(brainAdapter);
 }
 public void onStart() {
   super.onStart();
   getLoaderManager().restartLoader(0, null, this);
   myPreferences = getActivity().getSharedPreferences("myPreferences", Context.MODE_PRIVATE);
   if (myPreferences.getBoolean("musicON", true)) {
     music.start();
   }
 }
 @Override
 public void onStart() {
   super.onStart();
   // Make sure GoogleApiClient is connected, if available
   if (mGoogleApiClient != null && !mGoogleApiClient.isConnected()) {
     mGoogleApiClient.connect();
   }
 }
  @Override
  public void onStart() {
    super.onStart();
    spiceManager.start(getActivity());
    spiceManagerBinary.start(getActivity());

    loadListSmartHMA();
  }
 @Override
 public void onStart() {
   super.onStart();
   IntentFilter intentFilter = new IntentFilter();
   intentFilter.addAction(LocalBroadcastConstants.INTENT_BRAND_MODEL_CHANGED);
   LocalBroadcastManager.getInstance(getActivity())
       .registerReceiver(broadcastReceiver, intentFilter);
 }
 @Override
 public void onStart() {
   super.onStart();
   if (mMovies != null) {
     new LoadMoviesTrailers().execute(Integer.toString(mMovies.getId()));
     new LoadMoviesReviews().execute(Integer.toString(mMovies.getId()));
   }
 }
Exemplo n.º 24
0
 @Override
 public void onStart() {
   super.onStart();
   HMT2 = new HttpMethodTask2(getActivity().getApplicationContext());
   if (HMT2.getStatus() != AsyncTask.Status.RUNNING) {
     HMT2.execute(testURL2);
   }
 }
Exemplo n.º 25
0
  @Override
  public void onStart() {
    super.onStart();

    if (this.webView == null) {
      return;
    }
    this.webView.handleStart();
  }
Exemplo n.º 26
0
 @Override
 public void onStart() {
   if (DEBUG_LIFECYCLE) logger.warn("{} onStart()", fullName);
   super.onStart();
   started = true;
   activity.bind(this);
   //noinspection deprecation
   uiLines.setBackgroundColor(0xFF000000 | ColorScheme.get().defaul[ColorScheme.OPT_BG]);
 }
Exemplo n.º 27
0
 @Override
 public void onStart() {
   super.onStart();
   //        if (mSpeech == null) {
   //            if (!sharedPreferences.getBoolean(IS_TTS_ENABLED, false)) {
   //                enableTTS();
   //            }
   //        }
 }
 @Override
 public void onStart() {
   super.onStart();
   BaseApplication.getBus().register(mActivityResultSubscriber);
   BaseApplication.getBus().post(new FragmentOnStartEvent());
   Timber.tag(TAG);
   Timber.d("onStart");
   initOnStartBody();
 }
Exemplo n.º 29
0
 @Override
 public void onStart() {
   super.onStart();
   LoaderManager lm = getLoaderManager();
   if (lm.getLoader(1) != null) {
     lm.initLoader(1, null, this);
   }
   getLoaderManager().initLoader(1, null, this);
 }
Exemplo n.º 30
0
  @Override
  public void onStart() {
    super.onStart();

    TomahawkMainActivity activity = (TomahawkMainActivity) getActivity();
    activity.hideActionbar();

    EventBus.getDefault().register(this);
  }