コード例 #1
0
ファイル: TimeBarBase.java プロジェクト: nsdb/NSDBLibrary
 // updater
 @Override
 protected void onAttachedToWindow() {
   Log.i(TAG, "onAttachedToWindow");
   super.onAttachedToWindow();
   updaterDismissed = false;
   post(updater);
 }
コード例 #2
0
 @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;
 }
コード例 #3
0
  @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();
  }
コード例 #4
0
ファイル: Panel.java プロジェクト: KrishnaAmbili/micandroid
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   ViewParent parent = getParent();
   if (parent != null && parent instanceof FrameLayout) {
     mBringToFront = true;
   }
 }
コード例 #5
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   if (!mAttached) {
     getContext().registerReceiver(mBroadcastReceiver, mIntentFilter);
     mAttached = true;
   }
 }
コード例 #6
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   Configuration config = getResources().getConfiguration();
   if (config.orientation != mCreationOrientation
       || config.hardKeyboardHidden != mCreationHardKeyboardHidden) {
     mCallback.recreateMe(config);
   }
 }
コード例 #7
0
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

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

    this.lmenu.setVisibility(View.GONE);
  }
コード例 #8
0
ファイル: PlayingIndicator.java プロジェクト: vovs/GMusic
 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();
 }
コード例 #9
0
ファイル: ZenModePanel.java プロジェクト: BvbKoala/SourceCode
 @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);
 }
コード例 #10
0
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

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

      addView(mLoadMoreFooterView, getChildCount());

      mIsInitedContentViewScrollListener = true;
    }
  }
コード例 #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();
 }
コード例 #12
0
  @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());
              }
            });
      }
    }
  }
コード例 #13
0
  @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
  }
コード例 #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();
 }
コード例 #15
0
  @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();
  }
コード例 #17
0
ファイル: DigitalClock.java プロジェクト: aharisu/SimpleAlarm
  @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();
  }
コード例 #18
0
ファイル: MapLayout.java プロジェクト: realjune/androidCode
  @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();
  }
コード例 #19
0
 @Override
 protected void onAttachedToWindow() {
   // TODO Auto-generated method stub
   super.onAttachedToWindow();
   mIsAttached = true;
 }
コード例 #20
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   mHandler.sendEmptyMessage(MSG_START);
 }
コード例 #21
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   startCoverAnimation();
 }
コード例 #22
0
  @Override
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    Tabs.registerOnTabsChangedListener(this);
  }
コード例 #23
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   Log.d(TAG, "onAttachedToWindow ");
 }
コード例 #24
0
 @Override
 public void onAttachedToWindow() {
   super.onAttachedToWindow();
   mTheme.addListener(this);
 }
コード例 #25
0
 @Override
 protected void onDetachedFromWindow() {
   if (mBindTask != null) mBindTask.cancel(false);
   mBindTask = null;
   super.onAttachedToWindow();
 }
コード例 #26
0
  protected void onAttachedToWindow() {
    super.onAttachedToWindow();

    this.tnContainer.dispatchDisplayChanged(true);
  }
コード例 #27
0
ファイル: eib.java プロジェクト: FabianTerhorst/Hangouts
 protected void onAttachedToWindow() {
   if (b != null) {
     b.a();
   }
   super.onAttachedToWindow();
 }
コード例 #28
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
 }
コード例 #29
0
ファイル: BlurLinearLayout.java プロジェクト: pahanez/blurout
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   mBlurRenderer.onAttachedToWindow();
 }
コード例 #30
0
 @Override
 protected void onAttachedToWindow() {
   super.onAttachedToWindow();
   ButterKnife.inject(this);
 }