Loading packages/SystemUI/res/anim/tv_pip_overlay_fade_in_animation.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2016 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" android:propertyName="alpha" android:valueTo="1" android:interpolator="@android:interpolator/fast_out_slow_in" android:duration="350" /> packages/SystemUI/res/anim/tv_pip_overlay_fade_out_animation.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2016 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" android:propertyName="alpha" android:valueTo="0" android:interpolator="@android:interpolator/fast_out_slow_in" android:duration="500" /> packages/SystemUI/src/com/android/systemui/tv/pip/PipOverlayActivity.java +12 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui.tv.pip; import android.animation.Animator; import android.animation.AnimatorInflater; import android.app.Activity; import android.app.ActivityOptions; import android.content.Context; Loading Loading @@ -50,9 +52,11 @@ public class PipOverlayActivity extends Activity implements PipManager.Listener private ImageView mGuideButtonPlayPauseImageView; private final Runnable mHideGuideOverlayRunnable = new Runnable() { public void run() { mGuideOverlayView.setVisibility(View.GONE); mFadeOutAnimation.start(); } }; private Animator mFadeInAnimation; private Animator mFadeOutAnimation; /** * Shows PIP overlay UI only if it's not there. Loading @@ -74,11 +78,18 @@ public class PipOverlayActivity extends Activity implements PipManager.Listener setContentView(R.layout.tv_pip_overlay); mGuideOverlayView = findViewById(R.id.guide_overlay); mPipManager.addListener(this); mFadeInAnimation = AnimatorInflater.loadAnimator( this, R.anim.tv_pip_overlay_fade_in_animation); mFadeInAnimation.setTarget(mGuideOverlayView); mFadeOutAnimation = AnimatorInflater.loadAnimator( this, R.anim.tv_pip_overlay_fade_out_animation); mFadeOutAnimation.setTarget(mGuideOverlayView); } @Override protected void onResume() { super.onResume(); mFadeInAnimation.start(); mHandler.removeCallbacks(mHideGuideOverlayRunnable); mHandler.postDelayed(mHideGuideOverlayRunnable, SHOW_GUIDE_OVERLAY_VIEW_DURATION_MS); } Loading Loading
packages/SystemUI/res/anim/tv_pip_overlay_fade_in_animation.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2016 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" android:propertyName="alpha" android:valueTo="1" android:interpolator="@android:interpolator/fast_out_slow_in" android:duration="350" />
packages/SystemUI/res/anim/tv_pip_overlay_fade_out_animation.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2016 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" android:propertyName="alpha" android:valueTo="0" android:interpolator="@android:interpolator/fast_out_slow_in" android:duration="500" />
packages/SystemUI/src/com/android/systemui/tv/pip/PipOverlayActivity.java +12 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.systemui.tv.pip; import android.animation.Animator; import android.animation.AnimatorInflater; import android.app.Activity; import android.app.ActivityOptions; import android.content.Context; Loading Loading @@ -50,9 +52,11 @@ public class PipOverlayActivity extends Activity implements PipManager.Listener private ImageView mGuideButtonPlayPauseImageView; private final Runnable mHideGuideOverlayRunnable = new Runnable() { public void run() { mGuideOverlayView.setVisibility(View.GONE); mFadeOutAnimation.start(); } }; private Animator mFadeInAnimation; private Animator mFadeOutAnimation; /** * Shows PIP overlay UI only if it's not there. Loading @@ -74,11 +78,18 @@ public class PipOverlayActivity extends Activity implements PipManager.Listener setContentView(R.layout.tv_pip_overlay); mGuideOverlayView = findViewById(R.id.guide_overlay); mPipManager.addListener(this); mFadeInAnimation = AnimatorInflater.loadAnimator( this, R.anim.tv_pip_overlay_fade_in_animation); mFadeInAnimation.setTarget(mGuideOverlayView); mFadeOutAnimation = AnimatorInflater.loadAnimator( this, R.anim.tv_pip_overlay_fade_out_animation); mFadeOutAnimation.setTarget(mGuideOverlayView); } @Override protected void onResume() { super.onResume(); mFadeInAnimation.start(); mHandler.removeCallbacks(mHideGuideOverlayRunnable); mHandler.postDelayed(mHideGuideOverlayRunnable, SHOW_GUIDE_OVERLAY_VIEW_DURATION_MS); } Loading