[GUIDE]SystemUI with 2 Layout Toggles

Search This thread

PineappleOwl

Senior Member
Mar 22, 2013
525
968
Good day devs, I am making a guide here, it was like a 4.1.2 SystemUI. Partially I am not fond of tabbed ui so I made it with minimalizing sir SpaceCaker code.

Original Thread:

Like this,

968828_548662561861775_397669332_n.jpg
1013112_548662548528443_1801808569_n.jpg


1. Pull SystemUI.apk
2. Decompile
3. Now, go to /res/layout/statusbar_expanded.xml
4.After opening it, you will see some code like this,
Code:
xmlns:android="http://schemas.android.com/apk/res/android">
Add this code after it,
Code:
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">   
		<include layout="@layout/header" android:id="@id/headerid" android:layout_width="fill_parent" android:layout_height="48.0dip" />	
    </RelativeLayout>
  <com.pineapple.PineappleLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
        <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <include layout="@layout/quickpanel_quick_settings_secondlayout" />
        </LinearLayout>
and before
Code:
</com.android.systemui.statusbar.ExpandedView>
add this,
Code:
</com.pineapple.PineappleLayout>

It should be like this,
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <RelativeLayout android:orientation="horizontal" android:background="@drawable/quickpanel_plmn_background" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">
        <include android:id="@id/header" android:layout_width="fill_parent" android:layout_height="48.0dip" layout="@layout/header" />
    </RelativeLayout>
    <com.pineapple.PineappleLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
        <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <include layout="@layout/quickpanel_quick_settings_second" />
        </LinearLayout>
        <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
                <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:overScrollMode="ifContentScrolls">
                    <com.android.systemui.statusbar.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content">
                        <TextView android:textSize="17.0sp" android:textStyle="normal" android:textColor="#ffffffff" android:id="@id/noNotificationsTitle" android:background="@drawable/quickpanel_title_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="26.0dip" android:text="@string/status_bar_no_notifications_title" />
                        <TextView android:textSize="17.0sp" android:textStyle="normal" android:textColor="#ffffffff" android:id="@id/latestTitle" android:background="@drawable/quickpanel_title_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="26.0dip" android:text="@string/status_bar_latest_events_title" />
                        <LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
                    </com.android.systemui.statusbar.NotificationLinearLayout>
                </ScrollView>
            </FrameLayout>
        </LinearLayout>
    </com.pineapple.PineappleLayout>
</com.android.systemui.statusbar.ExpandedView>
5. Go to /res/values/id and add this
Code:
<item type="id" name="headerid">false</item>
    <item type="id" name="clock">false</item>
    <item type="id" name="panel">false</item>

6. We are finish at ID's. Now, at the string.xml, add this,
Code:
<string name="statusbardateformat">"%1$s
%2$s"</string>

7.Go back to /res/layout/statusbar.xml, add the blue ones to your statusbar.xml
Code:
[COLOR="Blue"]<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">[/COLOR]
        <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
            <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />            
            <com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textColor="#ffffffff" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
        </LinearLayout>
    [COLOR="Blue"]</com.android.systemui.statusbar.StatusBarServiceLRPull>[/COLOR]

8. Download this and put it in your systemui.
https://www.dropbox.com/s/nz18cj7rqdppuc7/pineappleadd.zip?m

8. Save everything and recompile it, wait, theres more. . .

9. After recompiling, decompile it again, go to /res/values/public.xml. Find these
<public type="drawable" name="btn_tg"
<public type="drawable" name="btn_toggles_normal"

10. Go to /smali/com/pineapple/SecondLayout,open
ffind
and change to the public id of <public type="drawable" name="btn_toggles_normal". . .
and also find this,
and chage it to public ID of <public type="drawable" name="btn_tg". . .

11. Go to /smali/com/android/systemui/statusbar/policy/DateView
find
and replace it with the public ID of <public type="string" name="statusbardateformat"

12. Save everything and recompile. Done.




Credits to:
SPACECAKER for his awesome guide
DCSMS
Marinalin85
Matz
AuliaYF
 
Last edited:

nolinuxnoparty

Senior Member
Jun 20, 2013
606
987
XDA
The code in your file is totally done by SpaceCaker so you have no right to rename the "spacecaker" smali file folder to "pineapple" this is called stealing others work

Even if you have given him credits that doesn't mean that you got the permission from him

I would recommend you to point to SpaceCaker's Guide Thread for the Smali Files

Though I find this guide simplistic as compared to SpaceCaker's One
 

PineappleOwl

Senior Member
Mar 22, 2013
525
968
The code in your file is totally done by SpaceCaker so you have no right to rename the "spacecaker" smali file folder to "pineapple" this is called stealing others work

Even if you have given him credits that doesn't mean that you got the permission from him

I would recommend you to point to SpaceCaker's Guide Thread for the Smali Files

Though I find this guide simplistic as compared to SpaceCaker's One

Hi sir, I got permission from sir SpaceCaker to modify some smali, and he approved it. :D
 
  • Like
Reactions: stratosk21

markmellarpes

Senior Member
Aug 2, 2012
906
524
Taguig
I think your guide is not perfect just like in your SS there is no notifications at the 2nd panel of your statusbar.. :confused:

btw my statusbar already has a statusbarheaderview. cAn you make a tut for it?

Sent from my GT-S5360 using xda premium
 
Last edited:

PineappleOwl

Senior Member
Mar 22, 2013
525
968
I think your guide is not perfect just like in your SS there is no notifications at the 2nd panel of your statusbar.. :confused:

btw my statusbar already has a statusbarheaderview. cAn you make a tut for it?

Sent from my GT-S5360 using xda premium

I moved the notification at the otherlayout. It works with someone. I saw some at fb groups.they made it.

Sent from my GT-S5360 using Tapatalk 2
 
  • Like
Reactions: ryan_joshua

PineappleOwl

Senior Member
Mar 22, 2013
525
968
I think your guide is not perfect just like in your SS there is no notifications at the 2nd panel of your statusbar.. :confused:

btw my statusbar already has a statusbarheaderview. cAn you make a tut for it?

Sent from my GT-S5360 using xda premium

It has? So I can say sir,

<RelativeLayOut>StatusBarHeaderView. . . . . . . .
. . . . . .
. . .<RelativeLayout> is equal to /res/layout/header.xml and delete the smali/com. . . /DateView* at my smali. Thats what I can teach now, its hard to explain sir. :D

Plz tell me, how to use it on my galaxy y because I'm a newbie.
Pardon sir, I cant understand what you are saying sir, can you make it clear?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    Good day devs, I am making a guide here, it was like a 4.1.2 SystemUI. Partially I am not fond of tabbed ui so I made it with minimalizing sir SpaceCaker code.

    Original Thread:

    Like this,

    968828_548662561861775_397669332_n.jpg
    1013112_548662548528443_1801808569_n.jpg


    1. Pull SystemUI.apk
    2. Decompile
    3. Now, go to /res/layout/statusbar_expanded.xml
    4.After opening it, you will see some code like this,
    Code:
    xmlns:android="http://schemas.android.com/apk/res/android">
    Add this code after it,
    Code:
    <RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">   
    		<include layout="@layout/header" android:id="@id/headerid" android:layout_width="fill_parent" android:layout_height="48.0dip" />	
        </RelativeLayout>
      <com.pineapple.PineappleLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
            <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <include layout="@layout/quickpanel_quick_settings_secondlayout" />
            </LinearLayout>
    and before
    Code:
    </com.android.systemui.statusbar.ExpandedView>
    add this,
    Code:
    </com.pineapple.PineappleLayout>

    It should be like this,
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <com.android.systemui.statusbar.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <RelativeLayout android:orientation="horizontal" android:background="@drawable/quickpanel_plmn_background" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">
            <include android:id="@id/header" android:layout_width="fill_parent" android:layout_height="48.0dip" layout="@layout/header" />
        </RelativeLayout>
        <com.pineapple.PineappleLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
            <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <include layout="@layout/quickpanel_quick_settings_second" />
            </LinearLayout>
            <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
                    <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:overScrollMode="ifContentScrolls">
                        <com.android.systemui.statusbar.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content">
                            <TextView android:textSize="17.0sp" android:textStyle="normal" android:textColor="#ffffffff" android:id="@id/noNotificationsTitle" android:background="@drawable/quickpanel_title_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="26.0dip" android:text="@string/status_bar_no_notifications_title" />
                            <TextView android:textSize="17.0sp" android:textStyle="normal" android:textColor="#ffffffff" android:id="@id/latestTitle" android:background="@drawable/quickpanel_title_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="26.0dip" android:text="@string/status_bar_latest_events_title" />
                            <LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
                        </com.android.systemui.statusbar.NotificationLinearLayout>
                    </ScrollView>
                </FrameLayout>
            </LinearLayout>
        </com.pineapple.PineappleLayout>
    </com.android.systemui.statusbar.ExpandedView>
    5. Go to /res/values/id and add this
    Code:
    <item type="id" name="headerid">false</item>
        <item type="id" name="clock">false</item>
        <item type="id" name="panel">false</item>

    6. We are finish at ID's. Now, at the string.xml, add this,
    Code:
    <string name="statusbardateformat">"%1$s
    %2$s"</string>

    7.Go back to /res/layout/statusbar.xml, add the blue ones to your statusbar.xml
    Code:
    [COLOR="Blue"]<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">[/COLOR]
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
                <com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
                <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />            
                <com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textColor="#ffffffff" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
            </LinearLayout>
        [COLOR="Blue"]</com.android.systemui.statusbar.StatusBarServiceLRPull>[/COLOR]

    8. Download this and put it in your systemui.
    https://www.dropbox.com/s/nz18cj7rqdppuc7/pineappleadd.zip?m

    8. Save everything and recompile it, wait, theres more. . .

    9. After recompiling, decompile it again, go to /res/values/public.xml. Find these
    <public type="drawable" name="btn_tg"
    <public type="drawable" name="btn_toggles_normal"

    10. Go to /smali/com/pineapple/SecondLayout,open
    ffind
    and change to the public id of <public type="drawable" name="btn_toggles_normal". . .
    and also find this,
    and chage it to public ID of <public type="drawable" name="btn_tg". . .

    11. Go to /smali/com/android/systemui/statusbar/policy/DateView
    find
    and replace it with the public ID of <public type="string" name="statusbardateformat"

    12. Save everything and recompile. Done.




    Credits to:
    SPACECAKER for his awesome guide
    DCSMS
    Marinalin85
    Matz
    AuliaYF
    3
    i made it :) im using hype2.5 ui..
    uploadfromtaptalk1373458759804.jpg
    uploadfromtaptalk1373458802985.jpg

    Sent from my GT-S5360 using xda premium
    2
    Should we follow this first http://xdaforums.com/showthread.php?t=1952943 before we could implement this guide ???

    You can directly do this sir but you cant move the lidroid.
    1
    The code in your file is totally done by SpaceCaker so you have no right to rename the "spacecaker" smali file folder to "pineapple" this is called stealing others work

    Even if you have given him credits that doesn't mean that you got the permission from him

    I would recommend you to point to SpaceCaker's Guide Thread for the Smali Files

    Though I find this guide simplistic as compared to SpaceCaker's One

    Hi sir, I got permission from sir SpaceCaker to modify some smali, and he approved it. :D
    1
    @3r41nl33n

    will this work on galaxy y dous stock deodexed systemui

    It will work sir. As what sir SpaceCaker did, it work with all GB Rom, thus this one too. Cause the codes are exactly the same as his work. :D