Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43fc2d3c authored by Michael Jurka's avatar Michael Jurka Committed by Android Git Automerger
Browse files

am b0a1f197: Merge "Added "No recent apps" message on phones" into ics-factoryrom

* commit 'b0a1f197':
  Added "No recent apps" message on phones
parents a9390979 b0a1f197
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -69,6 +69,12 @@


    </FrameLayout>
    </FrameLayout>


    <include layout="@layout/status_bar_no_recent_apps"
        android:id="@+id/recents_no_apps"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="invisible" />

    <View android:id="@+id/recents_dismiss_button"
    <View android:id="@+id/recents_dismiss_button"
        android:layout_width="80px"
        android:layout_width="80px"
        android:layout_height="@*android:dimen/status_bar_height"
        android:layout_height="@*android:dimen/status_bar_height"
+6 −0
Original line number Original line Diff line number Diff line
@@ -67,6 +67,12 @@


    </FrameLayout>
    </FrameLayout>


    <include layout="@layout/status_bar_no_recent_apps"
        android:id="@+id/recents_no_apps"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="invisible" />

    <View android:id="@+id/recents_dismiss_button"
    <View android:id="@+id/recents_dismiss_button"
        android:layout_width="80px"
        android:layout_width="80px"
        android:layout_height="@*android:dimen/status_bar_height"
        android:layout_height="@*android:dimen/status_bar_height"
+36 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/* apps/common/assets/default/default/skins/StatusBar.xml
**
** Copyright 2011, 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.
*/
-->

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="match_parent"
    android:layout_width="match_parent"
    >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="24dp"
        android:textColor="#ffffffff"
        android:text="@string/status_bar_no_recent_apps"
        android:gravity="center_horizontal"
        android:layout_gravity="center"
    />
</FrameLayout>
+4 −0
Original line number Original line Diff line number Diff line
@@ -41,6 +41,10 @@
    <!-- Title shown in recents popup for inspecting an application's properties -->
    <!-- Title shown in recents popup for inspecting an application's properties -->
    <string name="status_bar_recent_inspect_item_title">App info</string>
    <string name="status_bar_recent_inspect_item_title">App info</string>


    <!-- Message shown in the middle of the screen after clicking on the recent apps button
         when there are no recent apps to show [CHAR LIMIT=45]-->
    <string name="status_bar_no_recent_apps">No recent apps</string>

    <!-- The label in the bar at the top of the status bar when there are no notifications
    <!-- The label in the bar at the top of the status bar when there are no notifications
         showing.  [CHAR LIMIT=40]-->
         showing.  [CHAR LIMIT=40]-->
    <string name="status_bar_no_notifications_title">No notifications</string>
    <string name="status_bar_no_notifications_title">No notifications</string>
+20 −1
Original line number Original line Diff line number Diff line
@@ -38,17 +38,20 @@ import android.view.View;
    View mRootView;
    View mRootView;
    View mScrimView;
    View mScrimView;
    View mContentView;
    View mContentView;
    View mNoRecentAppsView;
    AnimatorSet mContentAnim;
    AnimatorSet mContentAnim;
    Animator.AnimatorListener mListener;
    Animator.AnimatorListener mListener;


    // the panel will start to appear this many px from the end
    // the panel will start to appear this many px from the end
    final int HYPERSPACE_OFFRAMP = 200;
    final int HYPERSPACE_OFFRAMP = 200;


    public Choreographer(View root, View scrim, View content, Animator.AnimatorListener listener) {
    public Choreographer(View root, View scrim, View content,
            View noRecentApps, Animator.AnimatorListener listener) {
        mRootView = root;
        mRootView = root;
        mScrimView = scrim;
        mScrimView = scrim;
        mContentView = content;
        mContentView = content;
        mListener = listener;
        mListener = listener;
        mNoRecentAppsView = noRecentApps;
    }
    }


    void createAnimation(boolean appearing) {
    void createAnimation(boolean appearing) {
@@ -81,8 +84,24 @@ import android.view.View;
                : new android.view.animation.DecelerateInterpolator(1.0f));
                : new android.view.animation.DecelerateInterpolator(1.0f));
        glowAnim.setDuration(appearing ? OPEN_DURATION : CLOSE_DURATION);
        glowAnim.setDuration(appearing ? OPEN_DURATION : CLOSE_DURATION);


        Animator noRecentAppsFadeAnim = null;
        if (mNoRecentAppsView != null &&  // doesn't exist on large devices
                mNoRecentAppsView.getVisibility() == View.VISIBLE) {
            noRecentAppsFadeAnim = ObjectAnimator.ofFloat(mNoRecentAppsView, "alpha",
                    mContentView.getAlpha(), appearing ? 1.0f : 0.0f);
            noRecentAppsFadeAnim.setInterpolator(appearing
                    ? new android.view.animation.AccelerateInterpolator(1.0f)
                    : new android.view.animation.DecelerateInterpolator(1.0f));
            noRecentAppsFadeAnim.setDuration(appearing ? OPEN_DURATION : CLOSE_DURATION);
        }

        mContentAnim = new AnimatorSet();
        mContentAnim = new AnimatorSet();
        final Builder builder = mContentAnim.play(glowAnim).with(posAnim);
        final Builder builder = mContentAnim.play(glowAnim).with(posAnim);

        if (noRecentAppsFadeAnim != null) {
            builder.with(noRecentAppsFadeAnim);
        }

        Drawable background = mScrimView.getBackground();
        Drawable background = mScrimView.getBackground();
        if (background != null) {
        if (background != null) {
            Animator bgAnim = ObjectAnimator.ofInt(background,
            Animator bgAnim = ObjectAnimator.ofInt(background,
Loading