Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP san122

30th January 2014, 08:32 AM   |  #1  
san122's Avatar
OP Senior Member
Flag Unavailable.
Thanks Meter: 1,569
 
1,231 posts
Join Date:Joined: Jan 2013
More
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, 2890 views)
The Following 10 Users Say Thank You to san122 For This Useful Post: [ View ]
30th January 2014, 08:01 PM   |  #2  
Aleemk9's Avatar
Member
Flag Mahrashtra,aurangabad
Thanks Meter: 16
 
50 posts
Join Date:Joined: Jan 2014
More
Quote:
Originally Posted by san122

Hello Guys,Hope everyone is fine


recompiling problem after add ur smali files
31st January 2014, 01:54 AM   |  #3  
san122's Avatar
OP Senior Member
Flag Unavailable.
Thanks Meter: 1,569
 
1,231 posts
Join Date:Joined: Jan 2013
More
Quote:
Originally Posted by Aleemk9

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: [ View ]
2nd February 2014, 10:07 PM   |  #4  
Ticklefish's Avatar
Recognized Themer
Flag UK
Thanks Meter: 4,022
 
4,284 posts
Join Date:Joined: Oct 2011
More
Quote:
Originally Posted by Aleemk9

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
The Following User Says Thank You to Ticklefish For This Useful Post: [ View ]
3rd March 2014, 04:37 PM   |  #5  
Senior Member
Flag visakhapatnam
Thanks Meter: 56
 
224 posts
Join Date:Joined: Sep 2013
More
Question
Got only switch but no quickpanel buttons ............ do i did some thing worng.
Attached Thumbnails
Click image for larger version

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

Name:	222.jpg
Views:	695
Size:	27.4 KB
ID:	2611029  
Attached Files
File Type: apk SystemUI.apk - [Click for QR Code] (1.58 MB, 92 views)
Last edited by princemouli; 3rd March 2014 at 04:43 PM.
The Following User Says Thank You to princemouli For This Useful Post: [ View ]
3rd March 2014, 06:05 PM   |  #6  
Ticklefish's Avatar
Recognized Themer
Flag UK
Thanks Meter: 4,022
 
4,284 posts
Join Date:Joined: Oct 2011
More
Quote:
Originally Posted by princemouli

Got only switch but no quickpanel buttons ............ do i did some thing worng.

That depends...what two views were you trying to switch between?
The Following User Says Thank You to Ticklefish For This Useful Post: [ View ]
3rd March 2014, 07:02 PM   |  #7  
Senior Member
Flag visakhapatnam
Thanks Meter: 56
 
224 posts
Join Date:Joined: Sep 2013
More
Question
Quote:
Originally Posted by Ticklefish

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...
4th March 2014, 05:27 AM   |  #8  
san122's Avatar
OP Senior Member
Flag Unavailable.
Thanks Meter: 1,569
 
1,231 posts
Join Date:Joined: Jan 2013
More
Quote:
Originally Posted by princemouli

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: [ View ]
4th March 2014, 02:06 PM   |  #9  
Senior Member
Flag visakhapatnam
Thanks Meter: 56
 
224 posts
Join Date:Joined: Sep 2013
More
Question
Quote:
Originally Posted by san122

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>
4th March 2014, 02:18 PM   |  #10  
san122's Avatar
OP Senior Member
Flag Unavailable.
Thanks Meter: 1,569
 
1,231 posts
Join Date:Joined: Jan 2013
More
Quote:
Originally Posted by princemouli

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: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes