Loading packages/SystemUI/res/layout-land/status_bar_recent_panel.xml +9 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,15 @@ </com.android.systemui.recent.RecentsHorizontalScrollView> <ImageView android:id="@+id/recents_clear" android:clickable="true" android:layout_width="50dp" android:layout_height="50dp" android:scaleType="center" android:layout_gravity="top|right" android:src="@drawable/ic_notify_clear" /> </FrameLayout> <include layout="@layout/status_bar_no_recent_apps" Loading packages/SystemUI/res/layout/status_bar_recent_panel.xml +9 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,15 @@ </com.android.systemui.recent.RecentsVerticalScrollView> <ImageView android:id="@+id/recents_clear" android:clickable="true" android:layout_width="50dp" android:layout_height="50dp" android:scaleType="center" android:layout_gravity="top|right" android:src="@drawable/ic_notify_clear" /> </FrameLayout> <include layout="@layout/status_bar_no_recent_apps" Loading packages/SystemUI/res/layout/system_bar_recent_panel.xml +9 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,15 @@ </com.android.systemui.recent.RecentsVerticalScrollView> <ImageView android:id="@+id/recents_clear" android:clickable="true" android:layout_width="50dp" android:layout_height="50dp" android:scaleType="center" android:layout_gravity="bottom|left" android:src="@drawable/ic_notify_clear" /> <include layout="@layout/system_bar_no_recent_apps" android:id="@+id/recents_no_apps" android:layout_width="match_parent" Loading packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java +16 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import android.content.res.Configuration; import android.database.DataSetObserver; import android.graphics.Canvas; import android.os.Handler; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.FloatMath; Loading Loading @@ -176,6 +177,21 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView dismissChild(view); } @Override public void removeAllViewsInLayout() { smoothScrollTo(0, 0); int count = mLinearLayout.getChildCount(); for (int i = 0; i < count; i++) { final View child = mLinearLayout.getChildAt(i); postDelayed(new Runnable() { @Override public void run() { dismissChild(child); } }, i * 150); } } public boolean onInterceptTouchEvent(MotionEvent ev) { if (DEBUG) Log.v(TAG, "onInterceptTouchEvent()"); return mSwipeHelper.onInterceptTouchEvent(ev) || Loading packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +12 −1 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener private boolean mFitThumbnailToXY; private int mRecentItemLayoutId; private boolean mHighEndGfx; private ImageView mClearRecents; public static interface RecentsScrollView { public int numItemsInOneScreenful(); Loading Loading @@ -330,7 +331,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener && (mRecentTaskDescriptions.size() == 0); mRecentsNoApps.setAlpha(1f); mRecentsNoApps.setVisibility(noApps ? View.VISIBLE : View.INVISIBLE); mClearRecents.setVisibility(noApps ? View.GONE : View.VISIBLE); onAnimationEnd(null); setFocusable(true); setFocusableInTouchMode(true); Loading Loading @@ -434,6 +435,16 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener mRecentsScrim = findViewById(R.id.recents_bg_protect); mRecentsNoApps = findViewById(R.id.recents_no_apps); mClearRecents = (ImageView) findViewById(R.id.recents_clear); if (mClearRecents != null){ mClearRecents.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { mRecentsContainer.removeAllViewsInLayout(); } }); } if (mRecentsScrim != null) { mHighEndGfx = ActivityManager.isHighEndGfx(); if (!mHighEndGfx) { Loading Loading
packages/SystemUI/res/layout-land/status_bar_recent_panel.xml +9 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,15 @@ </com.android.systemui.recent.RecentsHorizontalScrollView> <ImageView android:id="@+id/recents_clear" android:clickable="true" android:layout_width="50dp" android:layout_height="50dp" android:scaleType="center" android:layout_gravity="top|right" android:src="@drawable/ic_notify_clear" /> </FrameLayout> <include layout="@layout/status_bar_no_recent_apps" Loading
packages/SystemUI/res/layout/status_bar_recent_panel.xml +9 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,15 @@ </com.android.systemui.recent.RecentsVerticalScrollView> <ImageView android:id="@+id/recents_clear" android:clickable="true" android:layout_width="50dp" android:layout_height="50dp" android:scaleType="center" android:layout_gravity="top|right" android:src="@drawable/ic_notify_clear" /> </FrameLayout> <include layout="@layout/status_bar_no_recent_apps" Loading
packages/SystemUI/res/layout/system_bar_recent_panel.xml +9 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,15 @@ </com.android.systemui.recent.RecentsVerticalScrollView> <ImageView android:id="@+id/recents_clear" android:clickable="true" android:layout_width="50dp" android:layout_height="50dp" android:scaleType="center" android:layout_gravity="bottom|left" android:src="@drawable/ic_notify_clear" /> <include layout="@layout/system_bar_no_recent_apps" android:id="@+id/recents_no_apps" android:layout_width="match_parent" Loading
packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java +16 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import android.content.res.Configuration; import android.database.DataSetObserver; import android.graphics.Canvas; import android.os.Handler; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.FloatMath; Loading Loading @@ -176,6 +177,21 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView dismissChild(view); } @Override public void removeAllViewsInLayout() { smoothScrollTo(0, 0); int count = mLinearLayout.getChildCount(); for (int i = 0; i < count; i++) { final View child = mLinearLayout.getChildAt(i); postDelayed(new Runnable() { @Override public void run() { dismissChild(child); } }, i * 150); } } public boolean onInterceptTouchEvent(MotionEvent ev) { if (DEBUG) Log.v(TAG, "onInterceptTouchEvent()"); return mSwipeHelper.onInterceptTouchEvent(ev) || Loading
packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +12 −1 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener private boolean mFitThumbnailToXY; private int mRecentItemLayoutId; private boolean mHighEndGfx; private ImageView mClearRecents; public static interface RecentsScrollView { public int numItemsInOneScreenful(); Loading Loading @@ -330,7 +331,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener && (mRecentTaskDescriptions.size() == 0); mRecentsNoApps.setAlpha(1f); mRecentsNoApps.setVisibility(noApps ? View.VISIBLE : View.INVISIBLE); mClearRecents.setVisibility(noApps ? View.GONE : View.VISIBLE); onAnimationEnd(null); setFocusable(true); setFocusableInTouchMode(true); Loading Loading @@ -434,6 +435,16 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener mRecentsScrim = findViewById(R.id.recents_bg_protect); mRecentsNoApps = findViewById(R.id.recents_no_apps); mClearRecents = (ImageView) findViewById(R.id.recents_clear); if (mClearRecents != null){ mClearRecents.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { mRecentsContainer.removeAllViewsInLayout(); } }); } if (mRecentsScrim != null) { mHighEndGfx = ActivityManager.isHighEndGfx(); if (!mHighEndGfx) { Loading