1

i would try to change the system recent app layout in a custom rom. Actually, in android stock, we have a simple vertical scrollable column with recent apps.. I would change it and make a gridview like LG --> http://www.androidcentral.com/sites/androidcentral.com/files/styles/large_wm_brw/public/article_images/2014/07/task-switchers.jpg?itok=DQwWAMpQ it's not so easy and i need help.. i have some question;

1) Change the xml only is enought? 2) Have i to change the adapter too in java or something else in java code?

The xml is this one:

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.recent.RecentsPanelView 
    android:id="@id/recents_root" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:foreground="@drawable/bg_protect" 
    systemui:recentItemLayout="@layout/status_bar_recent_item"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">

    <FrameLayout android:id="@id/recents_bg_protect" 
        android:background="@drawable/status_bar_recents_background" 
        android:fitsSystemWindows="true" 
        android:layout_width="fill_parent" 
        android:layout_height="fill_parent" 
        android:layout_alignParentBottom="true">

        <com.android.systemui.recent.RecentsVerticalScrollView 
            android:layout_gravity="top|left|center" 
            android:id="@id/recents_container" 
            android:scrollbars="none"
            android:fadingEdge="vertical" 
            android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" 
            android:clipChildren="false" 
            android:clipToPadding="false" 
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" 
            android:stackFromBottom="true" 
            android:divider="@null" 
            android:layout_marginEnd="0.0dip">

            <LinearLayout 
                android:id="@id/recents_linear_layout" 
                android:fitsSystemWindows="true" 
                android:clipChildren="false" 
                android:clipToPadding="false" 
                android:layout_width="fill_parent" 
                android:layout_height="wrap_content" />

        </com.android.systemui.recent.RecentsVerticalScrollView>
        <ImageView 
            android:layout_gravity="bottom|left|center" 
            android:id="@id/recents_clear" 
            android:clickable="true" 
            android:layout_width="50.0dip" 
            android:layout_height="50.0dip" 
            android:src="@drawable/ic_notify_clear" 
            android:scaleType="center" />
    </FrameLayout>
    <include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" />
</com.android.systemui.recent.RecentsPanelView>

The class RecentsPanelView extends a FrameLayout.. i tried simple change and extends a gridview but without any changes.. i think it was too much easy just change this point.. However, actually with this xml i can display in horizontal the recent apps but only in one row.. Any idea? Maybe adding a gridview in this layout?

Atlas91
  • 5,754
  • 17
  • 69
  • 141

0 Answers0