[Android Themes] akash akya:
Who want 4.2 quick panel :D

Credits :

* 4.2 quickpanel was originally made by RT [MENTION=3862405]SpaceCaker[/MENTION] Here without him no-quickpanel

* Wonderful guide for AOSP ROMs about Lidroid... which helped me lot, its by [MENTION=5204709]Adi Aisiteru Reborn[/MENTION] his guide here

* [MENTION=5016056]XDA.AGM[/MENTION] for this... toggles in panel view was not possible if didnt supported by giving his mod

* Lidroid Toggls for samsung Lidroid & for jb Wanam

* Lidroid Toggls port for non-samsung roms is made by Recognized themer [MENTION=3989065]serajr[/MENTION] for grid view

* [MENTION=4396693]bsuhas[/MENTION] for new method for quick panel mod

* My friend [MENTION=4987653]BOND1987[/MENTION] is also encouraged me

* My friend [MENTION=4915946]Akhilendra1711[/MENTION] for animate collapse methods

* My friend [MENTION=4333809]khan_frd2002[/MENTION] for helping me in updating thread

* Tested with MTK 4.1.1 must work with AOSP based 4.1.1 roms *

Q : there is already a guide for quickpanel and lidroid, why you made new thread ??

A : well, combining both is different from doing them separately... also lidroid files and quick panel files i have given is different from given in those guides...

more screenshots :

If you have any questions or suggestions feel free to ask... If you get any part working, post back with screenshots and device name

Things needed :

* You MUST know how to decompile & compile .jar files and .apk files

* Text editor

* SystemUI.apk

PART 1 : setup 4.2 quick panel view

if you already followed guide by Spaecaker and got it working, skip this step and follow 2nd step

Step 1 :

decompile systemui.apk and open ststus_bar.xml... for MTK devices its gemini_status_bar.xml..... find

xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">

add this code below it..

<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">

find

<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="2.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">

add this code above it..

</com.android.systemui.statusbar.StatusBarServiceLRPull>

Step 2 :

Open status_bar_expanded (for MTK gemini_status_bar_expanded.xml),

Delete this line :

<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />

find

<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">

add this line above it..

<com.spacecaker.SpaceLayOut 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_space" />
</LinearLayout>

find, this

<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="115.0dip" android:layout_marginBottom="8.0dip" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:layout_gravity="bottom" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</FrameLayout>

add this lines below it

</com.spacecaker.SpaceLayOut>

find :

<com.spacecaker.SpaceLayOut android:layout_width="fill_parent"

add this above it :

<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
</LinearLayout>

Step 3 :

open StatusBar_Expanded_Header.xml search for

<ImageView android:id="@id/settings_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_quicksettings" android:scaleType="center" android:contentDescription="@string/accessibility_settings_button" />

add this below it :

<com.spacecaker.ButtonBurst android:id="@id/spacebuttonburst" android:layout_width="30.0dip" android:layout_height="30.0dip" android:layout_alignParentRight="true" />

Step 4 :

open res/values/ids.xml add these at the end

<item type="id" name="spacebuttonburst">false</item>

save all and add these files in corresponding folders :

Download files here

Step 5 :

compile and decompile compiled systemui.apk , open smali/com/spacecaker/ButtonBurst.smali

find const v3, 0x7f020180 replce with your id found in public.xml, search for <public type="drawable" name="btn_toggles_normal" next to it you will find id..

same way find const v3, 0x7f02017f replace id found in public.xml, search for <public type="drawable" name="btn_tg"

Step 6 :

open smali/com/android/systemui/SystemUIService.smali

add this at the end :

.method public onClickPanelMethod(Landroid/view/View;)V
.locals 11
.parameter "v"

.prologue
new-instance v0, Landroid/content/Intent;

invoke-direct {v0}, Landroid/content/Intent;-><init>()V

invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

move-result-object v5

check-cast v5, Ljava/lang/String;

:try_start_0
const-string v3, ","

invoke-virtual {v5, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

move-result-object v6

const/4 v4, 0x0

aget-object v4, v6, v4

const/4 v7, 0x1

aget-object v7, v6, v7

invoke-virtual {v0, v4, v7}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

const/high16 v2, 0x1000

invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

move-result-object v0

invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

:goto_0
const-string v1, "statusbar"

invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v0

check-cast v0, Landroid/app/StatusBarManager;

invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V

return-void

:catch_0
move-exception v0

.local v0, e:Ljava/lang/Exception;
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

const-string v10, "Failed to execute action :\n"

invoke-virtual {v10, v5}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

move-result-object v5

const/16 v9, 0x7d0

invoke-static {p0, v5, v9}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

move-result-object v8

invoke-virtual {v8}, Landroid/widget/Toast;->show()V

goto :goto_0
.end method

Step 7 :

save and compile.... flash/push test whether its working before adding toggles...