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
Code:
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
Code:
<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">
Code:
<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">
Code:
</com.android.systemui.statusbar.StatusBarServiceLRPull>
Step 2 : Open status_bar_expanded (for MTK gemini_status_bar_expanded.xml),
Delete this line :
Code:
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
Code:
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
Code:
<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>
Code:
<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>
Code:
</com.spacecaker.SpaceLayOut>
Code:
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent"
Code:
<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
Code:
<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" />
Code:
<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
Code:
<item type="id" name="spacebuttonburst">false</item>
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 :
Code:
.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...
0 comments:
Post a Comment