Ejemplo n.º 1
0
 // updater
 @Override
 protected void onAttachedToWindow() {
   Log.i(TAG, "onAttachedToWindow");
   super.onAttachedToWindow();
   updaterDismissed = false;
   post(updater);
 }
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   // Keep track of when the view is attached or detached from the window, so we know it's
   // safe to remove views (in case the user requests to delete this editor).
   mIsAttachedToWindow = true;
 }
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    mVpn = (ImageView) findViewById(R.id.vpn);
    mWifiGroup = (ViewGroup) findViewById(R.id.wifi_combo);
    mWifi = (ImageView) findViewById(R.id.wifi_signal);
    mWifiActivity = (ImageView) findViewById(R.id.wifi_inout);
    mMobileGroup = (ViewGroup) findViewById(R.id.mobile_combo);
    mMobile = (ImageView) findViewById(R.id.mobile_signal);
    mMobileActivity = (ImageView) findViewById(R.id.mobile_inout);
    mMobileType = (ImageView) findViewById(R.id.mobile_type);
    mNoSimSlot = (ImageView) findViewById(R.id.no_sim);
    // cdma and 1x
    mMobileCdmaGroup = (ViewGroup) findViewById(R.id.mobile_signal_cdma);
    mMobileCdma3g = (ImageView) findViewById(R.id.mobile_signal_3g);
    mMobileCdma1x = (ImageView) findViewById(R.id.mobile_signal_1x);
    mMobileCdma1xOnly = (ImageView) findViewById(R.id.mobile_signal_1x_only);

    // data & voice
    mMobileDataVoiceGroup = (ViewGroup) findViewById(R.id.mobile_data_voice);
    mMobileSignalData = (ImageView) findViewById(R.id.mobile_signal_data);
    mMobileSignalVoice = (ImageView) findViewById(R.id.mobile_signal_voice);

    // data
    mDataGroup = (ViewGroup) findViewById(R.id.data_combo);
    mDataActivity = (ImageView) findViewById(R.id.data_inout);
    mAirplane = (ImageView) findViewById(R.id.airplane);
    mWifiAirplaneSpacer = findViewById(R.id.wifi_airplane_spacer);
    mWifiSignalSpacer = findViewById(R.id.wifi_signal_spacer);

    apply();
  }
Ejemplo n.º 4
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   ViewParent parent = getParent();
   if (parent != null && parent instanceof FrameLayout) {
     mBringToFront = true;
   }
 }
Ejemplo n.º 5
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   if (!mAttached) {
     getContext().registerReceiver(mBroadcastReceiver, mIntentFilter);
     mAttached = true;
   }
 }
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   Configuration config = getResources().getConfiguration();
   if (config.orientation != mCreationOrientation
       || config.hardKeyboardHidden != mCreationHardKeyboardHidden) {
     mCallback.recreateMe(config);
   }
 }
Ejemplo n.º 7
0
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    this.lmenu = this.getChildAt(0);
    this.content = this.getChildAt(1);

    this.lmenu.setVisibility(View.GONE);
  }
Ejemplo n.º 8
0
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   this.mAttachedToWindow = true;
   if (this.mCurrentState == 0) return;
   registerReceiver();
   if (this.mCurrentState == 1) {
     stopAnimation();
     return;
   }
   if (this.mCurrentState != 2) return;
   startAnimation();
 }
Ejemplo n.º 9
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   if (DEBUG) Log.d(mTag, "onAttachedToWindow");
   mAttached = true;
   mAttachedZen = getSelectedZen(-1);
   mSessionZen = mAttachedZen;
   mTransitionHelper.clear();
   setSessionExitCondition(copy(mExitCondition));
   refreshExitConditionText();
   updateWidgets();
   setRequestingConditions(!mHidden);
 }
Ejemplo n.º 10
0
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    // 被添加到窗口后再设置监听器,这样开发者就不必烦恼先初始化RefreshLayout还是先设置自定义滚动监听器
    if (!mIsInitedContentViewScrollListener && mLoadMoreFooterView != null) {
      setRecyclerViewOnScrollListener();
      setAbsListViewOnScrollListener();

      addView(mLoadMoreFooterView, getChildCount());

      mIsInitedContentViewScrollListener = true;
    }
  }
Ejemplo n.º 11
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   if (LockPatternKeyguardView.DEBUG_CONFIGURATION) {
     Log.v(TAG, "***** LOCK ATTACHED TO WINDOW");
     Log.v(
         TAG,
         "Cur orient="
             + mCreationOrientation
             + ", new config="
             + getResources().getConfiguration());
   }
   updateConfiguration();
 }
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    DJIBaseProduct product = DJISampleApplication.getProductInstance();

    if (product == null || !product.isConnected()) {
      Utils.setResultToToast(mContext, "Disconnect");
      mMissionManager = null;
      mFlightController = null;
      return;
    } else {
      mMissionManager = product.getMissionManager();
      if (product instanceof DJIAircraft) {
        mFlightController = ((DJIAircraft) product).getFlightController();
      }

      if (mMissionManager != null) {
        // The callback method is implemented in the subclasses
        mMissionManager.setMissionProgressStatusCallback(this);
      }

      if (mFlightController != null) {

        mFlightController.setUpdateSystemStateCallback(
            new DJIFlightControllerDelegate.FlightControllerUpdateSystemStateCallback() {

              @Override
              public void onResult(
                  DJIFlightControllerDataType.DJIFlightControllerCurrentState state) {

                mHomeLatitude = state.getHomeLocation().getLatitude();
                mHomeLongitude = state.getHomeLocation().getLongitude();
                flightState = state.getFlightMode();

                Utils.setResultToText(
                    mContext,
                    mFCPushInfoTV,
                    "home point latitude: "
                        + mHomeLatitude
                        + "\nhome point longitude: "
                        + mHomeLongitude
                        + "\nFlight state: "
                        + flightState.name());
              }
            });
      }
    }
  }
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();
    init();
    mBatteryGroup = (ViewGroup) findViewById(R.id.battery_combo);
    mBatteryIcon = (ImageView) findViewById(R.id.battery);
    mBatteryText = (TextView) findViewById(R.id.battery_text);
    mBatteryCenterText = (TextView) findViewById(R.id.battery_text_center);
    mBatteryTextOnly = (TextView) findViewById(R.id.battery_text_only);
    addIconView(mBatteryIcon);

    SettingsObserver settingsObserver = new SettingsObserver(new Handler());
    settingsObserver.observe();
    updateSettings(); // to initialize values
  }
Ejemplo n.º 14
0
 @Override
 protected void onAttachedToWindow() {
   mTickerStopped = false;
   super.onAttachedToWindow();
   mHandler = new Handler();
   mTicker =
       new Runnable() {
         public void run() {
           if (mTickerStopped) return;
           updateClock();
           long now = SystemClock.uptimeMillis();
           long next = now + (1000 - now % 1000);
           mHandler.postAtTime(mTicker, next);
         }
       };
   mTicker.run();
 }
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    mObserver.observe();

    mWifiGroup = (ViewGroup) findViewById(R.id.wifi_combo);
    mWifi = (ImageView) findViewById(R.id.wifi_signal);
    mWifiActivity = (ImageView) findViewById(R.id.wifi_inout);
    mMobileGroup = (ViewGroup) findViewById(R.id.mobile_combo);
    mMobile = (ImageView) findViewById(R.id.mobile_signal);
    mMobileActivity = (ImageView) findViewById(R.id.mobile_inout);
    mMobileType = (ImageView) findViewById(R.id.mobile_type);
    mSpacer = findViewById(R.id.spacer);
    mAirplane = (ImageView) findViewById(R.id.airplane);

    apply();
  }
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    mVpn = (ImageView) findViewById(R.id.vpn);
    mEthernetGroup = (ViewGroup) findViewById(R.id.ethernet_combo);
    mEthernet = (ImageView) findViewById(R.id.ethernet);
    mEthernetDark = (ImageView) findViewById(R.id.ethernet_dark);
    mWifiGroup = (ViewGroup) findViewById(R.id.wifi_combo);
    mWifi = (ImageView) findViewById(R.id.wifi_signal);
    mWifiDark = (ImageView) findViewById(R.id.wifi_signal_dark);
    mAirplane = (ImageView) findViewById(R.id.airplane);
    mNoSims = (ImageView) findViewById(R.id.no_sims);
    mNoSimsDark = (ImageView) findViewById(R.id.no_sims_dark);
    mWifiAirplaneSpacer = findViewById(R.id.wifi_airplane_spacer);
    mWifiSignalSpacer = findViewById(R.id.wifi_signal_spacer);
    mMobileSignalGroup = (LinearLayout) findViewById(R.id.mobile_signal_group);
    for (PhoneState state : mPhoneStates) {
      mMobileSignalGroup.addView(state.mMobileGroup);
    }

    apply();
    applyIconTint();
  }
Ejemplo n.º 17
0
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    if (mAttached) return;
    mAttached = true;

    if (mLive) {
      /* monitor time ticks, time changed, timezone */
      IntentFilter filter = new IntentFilter();
      filter.addAction(Intent.ACTION_TIME_TICK);
      filter.addAction(Intent.ACTION_TIME_CHANGED);
      filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
      getContext().registerReceiver(mIntentReceiver, filter);
    }

    /* monitor 12/24-hour display preference */
    mFormatChangeObserver = new FormatChangeObserver();
    getContext()
        .getContentResolver()
        .registerContentObserver(Settings.System.CONTENT_URI, true, mFormatChangeObserver);

    updateTime();
  }
Ejemplo n.º 18
0
  @Override
  protected void onAttachedToWindow() {
    LogManager.d("onattach");

    super.onAttachedToWindow();
    Location cache = getCachedLocation();
    if (isBetterLocation(cache, mCurrentLocation)) {
      setCurrentLocation(cache);
    }

    // Check status of GPS and NETWORK
    boolean gpsProviderFlag = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
    boolean networkProviderFlag =
        locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);

    if ((!gpsProviderFlag || !networkProviderFlag) && mFirstShow) {
      Log.d("Location", "No location provider is enabled");
      mFirstShow = false;
      buildAlertMessageNoLocationService();
    } else {
      if (gpsProviderFlag) {
        locationManager.requestLocationUpdates(
            LocationManager.GPS_PROVIDER, 10000, 0, mLocationListener1);
      }
      if (networkProviderFlag) {
        locationManager.requestLocationUpdates(
            LocationManager.NETWORK_PROVIDER, 10000, 0, mLocationListener2);
      }

      addCurrentLocationOverlay();
      // (int)(37 * 1000000), (int)(111.37 * 1000000)
      // for direction test
      // addBank(geoBeijing);
      mMapShowingForLocationUpdate = true;
      mapView.invalidate();
      Handler handler = new Handler();

      Runnable myRunnable =
          new Runnable() {
            public void run() {
              locationManager.removeUpdates(mLocationListener1);
              locationManager.removeUpdates(mLocationListener2);
            }
          };

      handler.postDelayed(myRunnable, 300000);

      httpSearchHandler =
          new Handler() {
            @Override
            public void handleMessage(Message msg) {
              if (HttpConnectionUtil.SUCCESS == msg.what) {
                String response = (String) msg.getData().get("response");
                Log.d("map", "response : " + response);
                GeocodeResult geocodeResult = new GeocodeResult();
                geocodeResult.setValues(response);

                mapCon.setZoom(defaultZoom);
                mapCon.setCenter(geocodeResult.getGeoPoint());

              } else {
                Toast.makeText(getContext(), "error", Toast.LENGTH_LONG).show();
              }
            }
          };
    }
    goToMyLocation();
  }
 @Override
 protected void onAttachedToWindow() {
   // TODO Auto-generated method stub
   super.onAttachedToWindow();
   mIsAttached = true;
 }
Ejemplo n.º 20
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   mHandler.sendEmptyMessage(MSG_START);
 }
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   startCoverAnimation();
 }
Ejemplo n.º 22
0
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    Tabs.registerOnTabsChangedListener(this);
  }
Ejemplo n.º 23
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   Log.d(TAG, "onAttachedToWindow ");
 }
Ejemplo n.º 24
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   mTheme.addListener(this);
 }
 @Override
 protected void onDetachedFromWindow() {
   if (mBindTask != null) mBindTask.cancel(false);
   mBindTask = null;
   super.onAttachedToWindow();
 }
Ejemplo n.º 26
0
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    this.tnContainer.dispatchDisplayChanged(true);
  }
Ejemplo n.º 27
0
 protected void onAttachedToWindow() {
   if (b != null) {
     b.a();
   }
   super.onAttachedToWindow();
 }
Ejemplo n.º 28
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
 }
Ejemplo n.º 29
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   mBlurRenderer.onAttachedToWindow();
 }
Ejemplo n.º 30
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   ButterKnife.inject(this);
 }