Search in sources :

Example 1 with KeyguardStatusView

use of com.android.keyguard.KeyguardStatusView in project android_frameworks_base by ResurrectionRemix.

the class NotificationPanelView method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    mKeyguardStatusBar = (KeyguardStatusBarView) findViewById(R.id.keyguard_header);
    mKeyguardStatusView = (KeyguardStatusView) findViewById(R.id.keyguard_status_view);
    mClockView = (TextView) findViewById(R.id.clock_view);
    mNotificationContainerParent = (NotificationsQuickSettingsContainer) findViewById(R.id.notification_container_parent);
    mNotificationStackScroller = (NotificationStackScrollLayout) findViewById(R.id.notification_stack_scroller);
    mNotificationStackScroller.setOnHeightChangedListener(this);
    mNotificationStackScroller.setOverscrollTopChangedListener(this);
    mNotificationStackScroller.setOnEmptySpaceClickListener(this);
    mKeyguardBottomArea = (KeyguardBottomAreaView) findViewById(R.id.keyguard_bottom_area);
    mQsNavbarScrim = findViewById(R.id.qs_navbar_scrim);
    mAfforanceHelper = new KeyguardAffordanceHelper(this, getContext());
    mKeyguardBottomArea.setAffordanceHelper(mAfforanceHelper);
    mLastOrientation = getResources().getConfiguration().orientation;
    mServices = (ImageButton) findViewById(R.id.tm_services);
    mClearall = (ImageButton) findViewById(R.id.tm_clear_all);
    mServices.setOnClickListener(this);
    mClearall.setOnClickListener(this);
    mQsAutoReinflateContainer = (AutoReinflateContainer) findViewById(R.id.qs_auto_reinflate_container);
    mQsAutoReinflateContainer.addInflateListener(new InflateListener() {

        @Override
        public void onInflated(View v) {
            mQsContainer = (QSContainer) v.findViewById(R.id.quick_settings_container);
            mQsContainer.setPanelView(NotificationPanelView.this);
            mQsContainer.getHeader().findViewById(R.id.expand_indicator).setOnClickListener(NotificationPanelView.this);
            // recompute internal state when qspanel height changes
            mQsContainer.addOnLayoutChangeListener(new OnLayoutChangeListener() {

                @Override
                public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
                    final int height = bottom - top;
                    final int oldHeight = oldBottom - oldTop;
                    if (height != oldHeight) {
                        onQsHeightChanged();
                    }
                }
            });
            mNotificationStackScroller.setQsContainer(mQsContainer);
        }
    });
    mNotificationPanelView = this;
    mBlurUtils = new BlurUtils(mNotificationPanelView.getContext());
    mAlphaAnimation = new AlphaAnimation(0.0f, 1.0f);
    mAlphaAnimation.setDuration(75);
    mAlphaAnimation.setAnimationListener(mAnimationListener);
    mBlurredView = new FrameLayout(mNotificationPanelView.getContext());
    mInnerBlurredView = new FrameLayout(mNotificationPanelView.getContext());
    FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
    mBlurredView.addView(mInnerBlurredView, lp);
    mNotificationPanelView.addView(mBlurredView, 0, lp);
    mNotificationPanelView.requestLayout();
    mBlurredView.setTag("ready_to_blur");
    mBlurredView.setVisibility(View.INVISIBLE);
    setQSStroke();
    handleQuickSettingsBackround();
}
Also used : QSContainer(com.android.systemui.qs.QSContainer) InflateListener(com.android.systemui.AutoReinflateContainer.InflateListener) FrameLayout(android.widget.FrameLayout) KeyguardStatusView(com.android.keyguard.KeyguardStatusView) View(android.view.View) ExpandableView(com.android.systemui.statusbar.ExpandableView) TextView(android.widget.TextView) KeyguardAffordanceView(com.android.systemui.statusbar.KeyguardAffordanceView) Paint(android.graphics.Paint)

Example 2 with KeyguardStatusView

use of com.android.keyguard.KeyguardStatusView in project android_frameworks_base by DirtyUnicorns.

the class NotificationPanelView method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    mKeyguardStatusBar = (KeyguardStatusBarView) findViewById(R.id.keyguard_header);
    mKeyguardStatusView = (KeyguardStatusView) findViewById(R.id.keyguard_status_view);
    mClockView = (TextView) findViewById(R.id.clock_view);
    mNotificationContainerParent = (NotificationsQuickSettingsContainer) findViewById(R.id.notification_container_parent);
    mNotificationStackScroller = (NotificationStackScrollLayout) findViewById(R.id.notification_stack_scroller);
    mNotificationStackScroller.setOnHeightChangedListener(this);
    mNotificationStackScroller.setOverscrollTopChangedListener(this);
    mNotificationStackScroller.setOnEmptySpaceClickListener(this);
    mKeyguardBottomArea = (KeyguardBottomAreaView) findViewById(R.id.keyguard_bottom_area);
    mQsNavbarScrim = findViewById(R.id.qs_navbar_scrim);
    mAfforanceHelper = new KeyguardAffordanceHelper(this, getContext());
    mKeyguardBottomArea.setAffordanceHelper(mAfforanceHelper);
    mLastOrientation = getResources().getConfiguration().orientation;
    mQsAutoReinflateContainer = (AutoReinflateContainer) findViewById(R.id.qs_auto_reinflate_container);
    mQsAutoReinflateContainer.addInflateListener(new InflateListener() {

        @Override
        public void onInflated(View v) {
            mQsContainer = (QSContainer) v.findViewById(R.id.quick_settings_container);
            mQsContainer.setPanelView(NotificationPanelView.this);
            mQsContainer.getHeader().findViewById(R.id.expand_indicator).setOnClickListener(NotificationPanelView.this);
            // recompute internal state when qspanel height changes
            mQsContainer.addOnLayoutChangeListener(new OnLayoutChangeListener() {

                @Override
                public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
                    final int height = bottom - top;
                    final int oldHeight = oldBottom - oldTop;
                    if (height != oldHeight) {
                        onQsHeightChanged();
                    }
                }
            });
            mNotificationStackScroller.setQsContainer(mQsContainer);
        }
    });
    mSettingsObserver = new SettingsObserver(mHandler);
}
Also used : QSContainer(com.android.systemui.qs.QSContainer) InflateListener(com.android.systemui.AutoReinflateContainer.InflateListener) KeyguardStatusView(com.android.keyguard.KeyguardStatusView) View(android.view.View) ExpandableView(com.android.systemui.statusbar.ExpandableView) TextView(android.widget.TextView) KeyguardAffordanceView(com.android.systemui.statusbar.KeyguardAffordanceView) Paint(android.graphics.Paint)

Example 3 with KeyguardStatusView

use of com.android.keyguard.KeyguardStatusView in project platform_frameworks_base by android.

the class NotificationPanelView method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    mKeyguardStatusBar = (KeyguardStatusBarView) findViewById(R.id.keyguard_header);
    mKeyguardStatusView = (KeyguardStatusView) findViewById(R.id.keyguard_status_view);
    mClockView = (TextView) findViewById(R.id.clock_view);
    mNotificationContainerParent = (NotificationsQuickSettingsContainer) findViewById(R.id.notification_container_parent);
    mNotificationStackScroller = (NotificationStackScrollLayout) findViewById(R.id.notification_stack_scroller);
    mNotificationStackScroller.setOnHeightChangedListener(this);
    mNotificationStackScroller.setOverscrollTopChangedListener(this);
    mNotificationStackScroller.setOnEmptySpaceClickListener(this);
    mKeyguardBottomArea = (KeyguardBottomAreaView) findViewById(R.id.keyguard_bottom_area);
    mQsNavbarScrim = findViewById(R.id.qs_navbar_scrim);
    mAfforanceHelper = new KeyguardAffordanceHelper(this, getContext());
    mKeyguardBottomArea.setAffordanceHelper(mAfforanceHelper);
    mLastOrientation = getResources().getConfiguration().orientation;
    mQsAutoReinflateContainer = (AutoReinflateContainer) findViewById(R.id.qs_auto_reinflate_container);
    mQsAutoReinflateContainer.addInflateListener(new InflateListener() {

        @Override
        public void onInflated(View v) {
            mQsContainer = (QSContainer) v.findViewById(R.id.quick_settings_container);
            mQsContainer.setPanelView(NotificationPanelView.this);
            mQsContainer.getHeader().findViewById(R.id.expand_indicator).setOnClickListener(NotificationPanelView.this);
            // recompute internal state when qspanel height changes
            mQsContainer.addOnLayoutChangeListener(new OnLayoutChangeListener() {

                @Override
                public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
                    final int height = bottom - top;
                    final int oldHeight = oldBottom - oldTop;
                    if (height != oldHeight) {
                        onQsHeightChanged();
                    }
                }
            });
            mNotificationStackScroller.setQsContainer(mQsContainer);
        }
    });
}
Also used : QSContainer(com.android.systemui.qs.QSContainer) InflateListener(com.android.systemui.AutoReinflateContainer.InflateListener) KeyguardStatusView(com.android.keyguard.KeyguardStatusView) View(android.view.View) KeyguardAffordanceView(com.android.systemui.statusbar.KeyguardAffordanceView) ExpandableView(com.android.systemui.statusbar.ExpandableView) TextView(android.widget.TextView) Paint(android.graphics.Paint)

Example 4 with KeyguardStatusView

use of com.android.keyguard.KeyguardStatusView in project android_frameworks_base by crdroidandroid.

the class NotificationPanelView method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    mKeyguardStatusBar = (KeyguardStatusBarView) findViewById(R.id.keyguard_header);
    mKeyguardStatusView = (KeyguardStatusView) findViewById(R.id.keyguard_status_view);
    mClockView = (TextView) findViewById(R.id.clock_view);
    mNotificationContainerParent = (NotificationsQuickSettingsContainer) findViewById(R.id.notification_container_parent);
    mNotificationStackScroller = (NotificationStackScrollLayout) findViewById(R.id.notification_stack_scroller);
    mNotificationStackScroller.setOnHeightChangedListener(this);
    mNotificationStackScroller.setOverscrollTopChangedListener(this);
    mNotificationStackScroller.setOnEmptySpaceClickListener(this);
    mKeyguardBottomArea = (KeyguardBottomAreaView) findViewById(R.id.keyguard_bottom_area);
    mQsNavbarScrim = findViewById(R.id.qs_navbar_scrim);
    mAfforanceHelper = new KeyguardAffordanceHelper(this, getContext());
    mKeyguardBottomArea.setAffordanceHelper(mAfforanceHelper);
    mLastOrientation = getResources().getConfiguration().orientation;
    mQsAutoReinflateContainer = (AutoReinflateContainer) findViewById(R.id.qs_auto_reinflate_container);
    mQsAutoReinflateContainer.addInflateListener(new InflateListener() {

        @Override
        public void onInflated(View v) {
            mQsContainer = (QSContainer) v.findViewById(R.id.quick_settings_container);
            mQsContainer.setPanelView(NotificationPanelView.this);
            mQsContainer.getHeader().findViewById(R.id.expand_indicator).setOnClickListener(NotificationPanelView.this);
            // recompute internal state when qspanel height changes
            mQsContainer.addOnLayoutChangeListener(new OnLayoutChangeListener() {

                @Override
                public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
                    final int height = bottom - top;
                    final int oldHeight = oldBottom - oldTop;
                    if (height != oldHeight) {
                        onQsHeightChanged();
                    }
                }
            });
            mNotificationStackScroller.setQsContainer(mQsContainer);
        }
    });
    mKeyguardWeatherInfo = (TextView) mKeyguardStatusView.findViewById(R.id.current_temp);
    mNotificationPanelView = this;
    mBlurUtils = new BlurUtils(mNotificationPanelView.getContext());
    mAlphaAnimation = new AlphaAnimation(0.0f, 1.0f);
    mAlphaAnimation.setDuration(75);
    mAlphaAnimation.setAnimationListener(mAnimationListener);
    mBlurredView = new FrameLayout(mNotificationPanelView.getContext());
    mInnerBlurredView = new FrameLayout(mNotificationPanelView.getContext());
    FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
    mBlurredView.addView(mInnerBlurredView, lp);
    mNotificationPanelView.addView(mBlurredView, 0, lp);
    mNotificationPanelView.requestLayout();
    mBlurredView.setTag("ready_to_blur");
    mBlurredView.setVisibility(View.INVISIBLE);
    setQSStroke();
    if (mTranslucentQuickSettings) {
        handleQuickSettingsBackround();
    } else {
        setQSBackgroundAlpha();
    }
}
Also used : QSContainer(com.android.systemui.qs.QSContainer) InflateListener(com.android.systemui.AutoReinflateContainer.InflateListener) FrameLayout(android.widget.FrameLayout) KeyguardStatusView(com.android.keyguard.KeyguardStatusView) View(android.view.View) ExpandableView(com.android.systemui.statusbar.ExpandableView) TextView(android.widget.TextView) KeyguardAffordanceView(com.android.systemui.statusbar.KeyguardAffordanceView) Paint(android.graphics.Paint)

Example 5 with KeyguardStatusView

use of com.android.keyguard.KeyguardStatusView in project android_frameworks_base by AOSPA.

the class NotificationPanelView method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    mKeyguardStatusBar = (KeyguardStatusBarView) findViewById(R.id.keyguard_header);
    mKeyguardStatusView = (KeyguardStatusView) findViewById(R.id.keyguard_status_view);
    mClockView = (TextView) findViewById(R.id.clock_view);
    mNotificationContainerParent = (NotificationsQuickSettingsContainer) findViewById(R.id.notification_container_parent);
    mNotificationStackScroller = (NotificationStackScrollLayout) findViewById(R.id.notification_stack_scroller);
    mNotificationStackScroller.setOnHeightChangedListener(this);
    mNotificationStackScroller.setOverscrollTopChangedListener(this);
    mNotificationStackScroller.setOnEmptySpaceClickListener(this);
    mKeyguardBottomArea = (KeyguardBottomAreaView) findViewById(R.id.keyguard_bottom_area);
    mQsNavbarScrim = findViewById(R.id.qs_navbar_scrim);
    mAfforanceHelper = new KeyguardAffordanceHelper(this, getContext());
    mKeyguardBottomArea.setAffordanceHelper(mAfforanceHelper);
    mLastOrientation = getResources().getConfiguration().orientation;
    mQsAutoReinflateContainer = (AutoReinflateContainer) findViewById(R.id.qs_auto_reinflate_container);
    mQsAutoReinflateContainer.addInflateListener(new InflateListener() {

        @Override
        public void onInflated(View v) {
            mQsContainer = (QSContainer) v.findViewById(R.id.quick_settings_container);
            mQsContainer.setPanelView(NotificationPanelView.this);
            mQsContainer.getHeader().findViewById(R.id.expand_indicator).setOnClickListener(NotificationPanelView.this);
            // recompute internal state when qspanel height changes
            mQsContainer.addOnLayoutChangeListener(new OnLayoutChangeListener() {

                @Override
                public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
                    final int height = bottom - top;
                    final int oldHeight = oldBottom - oldTop;
                    if (height != oldHeight) {
                        onQsHeightChanged();
                    }
                }
            });
            mNotificationStackScroller.setQsContainer(mQsContainer);
        }
    });
}
Also used : QSContainer(com.android.systemui.qs.QSContainer) InflateListener(com.android.systemui.AutoReinflateContainer.InflateListener) KeyguardStatusView(com.android.keyguard.KeyguardStatusView) View(android.view.View) ExpandableView(com.android.systemui.statusbar.ExpandableView) TextView(android.widget.TextView) KeyguardAffordanceView(com.android.systemui.statusbar.KeyguardAffordanceView) Paint(android.graphics.Paint)

Aggregations

View (android.view.View)6 TextView (android.widget.TextView)6 KeyguardStatusView (com.android.keyguard.KeyguardStatusView)6 InflateListener (com.android.systemui.AutoReinflateContainer.InflateListener)6 QSContainer (com.android.systemui.qs.QSContainer)6 Paint (android.graphics.Paint)5 ExpandableView (com.android.systemui.statusbar.ExpandableView)5 KeyguardAffordanceView (com.android.systemui.statusbar.KeyguardAffordanceView)5 FrameLayout (android.widget.FrameLayout)2 ChaosLab (android.annotation.ChaosLab)1 PendingIntent (android.app.PendingIntent)1 StatusBarManager.windowStateToString (android.app.StatusBarManager.windowStateToString)1 BroadcastReceiver (android.content.BroadcastReceiver)1 Context (android.content.Context)1 Intent (android.content.Intent)1 IntentFilter (android.content.IntentFilter)1 Point (android.graphics.Point)1 Uri (android.net.Uri)1 HandlerThread (android.os.HandlerThread)1 IPowerManager (android.os.IPowerManager)1