5,605,835 Members 48,006 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE]SystemUI with 2 Layout Toggles

Tip us?
 
PineappleOwl
Old
(Last edited by PineappleOwl; 2nd September 2013 at 03:24 PM.)
#1  
PineappleOwl's Avatar
Senior Member - OP
Thanks Meter 489
Posts: 373
Join Date: Mar 2013
Location: La Union

 
DONATE TO ME
Default [GUIDE]SystemUI with 2 Layout Toggles

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,



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:
<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">
        <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>
    </com.android.systemui.statusbar.StatusBarServiceLRPull>
8. Download this and put it in your systemui.
https://www.dropbox.com/s/nz18cj7rqd...appleadd.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
Quote:
<public type="drawable" name="btn_tg"
<public type="drawable" name="btn_toggles_normal"
10. Go to /smali/com/pineapple/SecondLayout,open
ffind
Quote:
0x7f020180
and change to the public id of <public type="drawable" name="btn_toggles_normal". . .
and also find this,
Quote:
0x7f02017f
and chage it to public ID of <public type="drawable" name="btn_tg". . .

11. Go to /smali/com/android/systemui/statusbar/policy/DateView
find
Quote:
0x7f07002a
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
The Following 13 Users Say Thank You to PineappleOwl For This Useful Post: [ Click to Expand ]
 
nolinuxnoparty
Old
#2  
Account currently disabled
Thanks Meter 975
Posts: 603
Join Date: Jun 2013
Location: 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
Old
#3  
PineappleOwl's Avatar
Senior Member - OP
Thanks Meter 489
Posts: 373
Join Date: Mar 2013
Location: La Union

 
DONATE TO ME
Quote:
Originally Posted by nolinuxnoparty View Post
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.
The Following User Says Thank You to PineappleOwl For This Useful Post: [ Click to Expand ]
 
nolinuxnoparty
Old
#4  
Account currently disabled
Thanks Meter 975
Posts: 603
Join Date: Jun 2013
Location: XDA
Quote:
Originally Posted by 3r41nl33n View Post
Hi sir, I got permission from sir SpaceCaker to modify some smali, and he approved it.
Good Then
 
Omkar$
Old
(Last edited by Omkar$; 7th July 2013 at 01:14 PM.)
#5  
Omkar$'s Avatar
Senior Member
Thanks Meter 1512
Posts: 701
Join Date: Mar 2013
Location: mumbai

 
DONATE TO ME
@3r41nl33n

will this work on galaxy y dous stock deodexed systemui


EDIT= ERROR WHILE RECOMPILING
 
PineappleOwl
Old
#6  
PineappleOwl's Avatar
Senior Member - OP
Thanks Meter 489
Posts: 373
Join Date: Mar 2013
Location: La Union

 
DONATE TO ME
Quote:
Originally Posted by Omkar$ View Post
@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.
The Following User Says Thank You to PineappleOwl For This Useful Post: [ Click to Expand ]
 
PineappleOwl
Old
#7  
PineappleOwl's Avatar
Senior Member - OP
Thanks Meter 489
Posts: 373
Join Date: Mar 2013
Location: La Union

 
DONATE TO ME
Whats the problem sir? Can i see the log?

Sent from my GT-S5360 using Tapatalk 2
The Following User Says Thank You to PineappleOwl For This Useful Post: [ Click to Expand ]
 
PineappleOwl
Old
#8  
PineappleOwl's Avatar
Senior Member - OP
Thanks Meter 489
Posts: 373
Join Date: Mar 2013
Location: La Union

 
DONATE TO ME
Quote:
Originally Posted by Omkar$ View Post
@3r41nl33n

will this work on galaxy y dous stock deodexed systemui


EDIT= ERROR WHILE RECOMPILING
Whats the problem? Can I see your logs?

Sent from my GT-S5360 using Tapatalk 2
The Following User Says Thank You to PineappleOwl For This Useful Post: [ Click to Expand ]
 
AuliaYF
Old
#9  
AuliaYF's Avatar
Member
Thanks Meter 42
Posts: 58
Join Date: Jun 2013
Location: Bekasi, Indonesia
Default it a modifed method on LRPull

the Left-Right Pull method are modified from mainalin85's theme, which is i've made that method for marinalin, i still don't give him permission to share but my method now modified by SpaceCaker without my permission.
http://forum.xda-developers.com/show...315342&page=15
 
Omkar$
Old
#10  
Omkar$'s Avatar
Senior Member
Thanks Meter 1512
Posts: 701
Join Date: Mar 2013
Location: mumbai

 
DONATE TO ME
Quote:
Originally Posted by 3r41nl33n View Post
Whats the problem? Can I see your logs?

Sent from my GT-S5360 using Tapatalk 2
Lol statusbar gon

After flashing
Sent from my GT-S6102 using xda app-developers app

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes