5,594,151 Members 47,346 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE][MOD]Add Quickpanel Button In Statusbar To Switch Layouts>>

Tip us?
 
san122
Old
#1  
san122's Avatar
Senior Member - OP
Thanks Meter 1423
Posts: 1,172
Join Date: Jan 2013
Location: Unavailable.
Default [GUIDE][MOD]Add Quickpanel Button In Statusbar To Switch Layouts>>

Hello Guys,Hope everyone is fine

Quote:
Today iam going to guide you how to add quickpanel button on statusbar to change layouts with cool sliding animation.

First of all this is not my work I would like to thank XDA Recognized Themer @b16h22 For allowing me to make this guide.


So lets start..


1. First of all download the attached files and merge with your SystemUI.apk
2. Now open statusbar.expanded and add these codes on the top lines anywhere where you want the switching button.
Code:
 
  <com.panel.Button android:id="@id/button" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
3 And then add this code anywhere..


Code:
  
                
       <com.panel.Panel android:id="@id/panel" android:layout_width="fill_parent" android:layout_height="fill_parent">
                   <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent">
                             Your First layout
             </LinearLayout>
                        <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent">
                  Your Second Layout
 </LinearLayout>
</com.panel.Panel>

4.Now open ids.xml and add these in the last above resources .

Code:
  <item type="id" name="panel">false</item>
    <item type="id" name="button">false</item>
5.Recompile your SystemUI.apk.
6.Decompile it again.
7.Now open public.xml in values folder
8.Search for panel and copy its id
11.Now open Panel.smali in smali/com/panel/panel and search for 0x7f09004d and replace it with panel id .
12.Similarly,
13.Open public.xml in values folder
14.Search for button and copy its id
15.Now open Button.smali in smali/com/panel/Button and search for 0x7f09004e and replace it with Button id .
16.Also,
17.Open public.xml in values folder
18.Search for btn drawable and copy its id.
19.Now open Button.smali in smali/com/panel/Button and search for 0x7f020190 and replace it with btn id .


20.Now compile your SystemUI.apk
And done.


Screenshots
Attached Files
File Type: rar quickpanel_btn.rar - [Click for QR Code] (5.8 KB, 459 views)
The Following 7 Users Say Thank You to san122 For This Useful Post: [ Click to Expand ]
 
Aleemk9
Old
#2  
Aleemk9's Avatar
Member
Thanks Meter 12
Posts: 44
Join Date: Jan 2014
Location: Mahrashtra,aurangabad
Quote:
Originally Posted by san122 View Post
Hello Guys,Hope everyone is fine


recompiling problem after add ur smali files
 
san122
Old
#3  
san122's Avatar
Senior Member - OP
Thanks Meter 1423
Posts: 1,172
Join Date: Jan 2013
Location: Unavailable.
Quote:
Originally Posted by Aleemk9 View Post
recompiling problem after add ur smali files
Make sure u have placed ids in the ids.xml in values folder.
The Following 2 Users Say Thank You to san122 For This Useful Post: [ Click to Expand ]
 
Ticklefish
Old
#4  
Ticklefish's Avatar
Recognized Themer
Thanks Meter 2444
Posts: 2,927
Join Date: Oct 2011
Quote:
Originally Posted by Aleemk9 View Post
recompiling problem after add ur smali files
If you still have a recompiling problem, it helps if you share what the error message is that you get. Then we can say what's going wrong.

Sent from my C6603 using Tapatalk


- Tickle My Android 9.0 -

The Greatest Theming Tool In The World!


Decompile Files, Change Icons, Change Fonts,
Change Boot Animations, Create Flashable Zips, Deodex Roms
..And More!


http://forum.xda-developers.com/showthread.php?t=1633333
The Following User Says Thank You to Ticklefish For This Useful Post: [ Click to Expand ]
 
princemouli
Old
(Last edited by princemouli; 3rd March 2014 at 03:43 PM.)
#5  
Senior Member
Thanks Meter 27
Posts: 141
Join Date: Sep 2013
Location: visakhapatnam
Got only switch but no quickpanel buttons ............ do i did some thing worng.
Attached Thumbnails
Click image for larger version

Name:	111.PNG
Views:	348
Size:	164.3 KB
ID:	2611028   Click image for larger version

Name:	222.jpg
Views:	315
Size:	27.4 KB
ID:	2611029  
Attached Files
File Type: apk SystemUI.apk - [Click for QR Code] (1.58 MB, 20 views)
The Following User Says Thank You to princemouli For This Useful Post: [ Click to Expand ]
 
Ticklefish
Old
#6  
Ticklefish's Avatar
Recognized Themer
Thanks Meter 2444
Posts: 2,927
Join Date: Oct 2011
Quote:
Originally Posted by princemouli View Post
Got only switch but no quickpanel buttons ............ do i did some thing worng.
That depends...what two views were you trying to switch between?


- Tickle My Android 9.0 -

The Greatest Theming Tool In The World!


Decompile Files, Change Icons, Change Fonts,
Change Boot Animations, Create Flashable Zips, Deodex Roms
..And More!


http://forum.xda-developers.com/showthread.php?t=1633333
The Following User Says Thank You to Ticklefish For This Useful Post: [ Click to Expand ]
 
princemouli
Old
#7  
Senior Member
Thanks Meter 27
Posts: 141
Join Date: Sep 2013
Location: visakhapatnam
Quote:
Originally Posted by Ticklefish View Post
That depends...what two views were you trying to switch between?
i got a icon for qucikpanal buttuns but no quickicons as shown in the screen shoots provided in the guide...
for clear understanding see the screen shots i uploaded...
 
san122
Old
#8  
san122's Avatar
Senior Member - OP
Thanks Meter 1423
Posts: 1,172
Join Date: Jan 2013
Location: Unavailable.
Quote:
Originally Posted by princemouli View Post
i got a icon for qucikpanal buttuns but no quickicons as shown in the screen shoots provided in the guide...
for clear understanding see the screen shots i uploaded...
Place to linearlayouts bw com.pane....
And
</com.panel.....>

Sent from my GT-S5360 using Tapatalk 2
The Following 2 Users Say Thank You to san122 For This Useful Post: [ Click to Expand ]
 
princemouli
Old
#9  
Senior Member
Thanks Meter 27
Posts: 141
Join Date: Sep 2013
Location: visakhapatnam
Quote:
Originally Posted by san122 View Post
Place to linearlayouts bw com.pane....
And
</com.panel.....>

Sent from my GT-S5360 using Tapatalk 2
brother still not working please check this....

Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
        <include layout="@layout/zzz_toolbar_view" />
        <include layout="@layout/zzz_toolbar_indicator" />
    </FrameLayout>
    <View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
    <RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
        <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
        <ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
        <ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
		<com.panel.Button android:id="@id/button" android:paddingRight="8.0dip" android:paddingLeft="8.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" />
    </RelativeLayout>
    <View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
    <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:paddingTop="20.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
        <in.jmkl.dcsms.statusbargreper.SlideBrightness android:layout_width="fill_parent" android:layout_height="wrap_content" />
    </LinearLayout>
	       <com.panel.Panel android:id="@id/panel" android:layout_width="fill_parent" android:layout_height="fill_parent">
                   <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent">
                             Your First layout
             </LinearLayout>
                        <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent">
                  Your Second Layout
 </LinearLayout>
</com.panel.Panel>
    <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
        <TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
        <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
            <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
            </LinearLayout>
        </ScrollView>
        <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
    </FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>
 
san122
Old
#10  
san122's Avatar
Senior Member - OP
Thanks Meter 1423
Posts: 1,172
Join Date: Jan 2013
Location: Unavailable.
Quote:
Originally Posted by princemouli View Post
brother still not working please check this....

Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
        <include layout="@layout/zzz_toolbar_view" />
        <include layout="@layout/zzz_toolbar_indicator" />
    </FrameLayout>
    <View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
    <RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
        <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
        <ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
        <ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
<com.panel.Button android:id="@id/button" android:paddingRight="8.0dip" android:paddingLeft="8.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" />
    </RelativeLayout>
    <View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
    <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:paddingTop="20.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
        <in.jmkl.dcsms.statusbargreper.SlideBrightness android:layout_width="fill_parent" android:layout_height="wrap_content" />
    </LinearLayout>
       <com.panel.Panel android:id="@id/panel" android:layout_width="fill_parent" android:layout_height="fill_parent">
                   <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent">
                             Your First layout
             </LinearLayout>
                        <LinearLayout android:layout_width="wrap_content" android:layout_height="fill_parent">
                  Your Second Layout
 </LinearLayout>
</com.panel.Panel>
    <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
        <TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
        <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
            <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
            </LinearLayout>
        </ScrollView>
        <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
    </FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>

Why dont you replaced Your first layout and your second layout.

Sent from my GT-S5360 using Tapatalk 2

The Following User Says Thank You to san122 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes