Tuesday, September 2, 2014

[GUIDE][CM10.1/JB4.2] HOW TO 3 TAB SYSTEMUI WITH VIEW FLIPPER

How to 3 tab systemui with view flipper, Hallo droiders kali ini ane mau ngeshare guide nih, yaitu HOW TO 3 TAB SYSTEMUI WITH VIEW FLIPPER jadi bikin UI di JB jadi 3 tab naahhh abis itu ada efeknya tiap pindah tab, dan 3 tabnya bisa di hide, keren lah pokoknya, dan biasanya agak lag kan yah kalo banyak2 tabnya, tapi ini ngga kok, oiya disini 3 tabnya udah di isi yah, layout pertama notification, kedua CM Musik dan info yang ketiga recent apps, thanks buat um no more buat guidenya hehe :-)

Ok langsung aja yah :

Bahan-bahan :
  1. APK MULTI TOOLS, APK TOOLS, alat untuk compile/decompile lainnya.
  2. SystemUI.apk
  3. Settings.apk
  4. Niat

Langkah-langkahnya :
  • Decompile SystemUI.apk
  • Buka res/layout/status_bar_expanded.xml atau gemini_status_bar_expanded.xml
  • Rubah seluruh line dari seperti ini :
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/notification_panel_margin_left"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <View android:id="@id/handle" android:background="@drawable/status_bar_close" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" />
    <include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" layout="@layout/carrier_label" />
    <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/close_handle_underlap" android:animateLayoutChanges="false">
        <include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
        <FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
            <include layout="@layout/toolbar_view" />
            <include layout="@layout/toolbar_indicator" />
            <include layout="@layout/toolbar_divider" />
        </FrameLayout>
        <TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:padding="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
        <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
            <ViewStub android:id="@id/flip_settings_stub" android:layout="@layout/flip_settings" android:layout_width="fill_parent" android:layout_height="wrap_content" />
            <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.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
            </ScrollView>
        </FrameLayout>
    </LinearLayout>
</com.android.systemui.statusbar.phone.NotificationPanelView>
  • Menjadi seperti ini :
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/notification_panel_margin_left"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <View android:id="@id/handle" android:background="@drawable/status_bar_close" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" />
    <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
        <ViewStub android:id="@+id/flip_settings_stub" android:layout="@layout/flip_settings" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_height" />
    </LinearLayout>
    <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:animateLayoutChanges="false">
        <include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
        <View android:background="#ff1ac31a" android:layout_width="fill_parent" android:layout_height="2.0dip" />
        <FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
            <include layout="@layout/toolbar_view" />
            <include layout="@layout/toolbar_indicator" />
            <include layout="@layout/toolbar_divider" />
        </FrameLayout>
        <ViewFlipper android:id="@+id/expanded_flipper" android:layout_width="fill_parent" android:layout_height="wrap_content"
          xmlns:android="http://schemas.android.com/apk/res/android">
            <FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
                <TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:padding="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
                <ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" 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_row_min_height" />
                    </LinearLayout>
                </ScrollView>
                <ImageView android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
            </FrameLayout>
            <include android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/flip_to_expanded_weather" />
            <include android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/flip_to_expanded_music" />
            <include android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/flip_to_expanded_recents" />
        </ViewFlipper>
    </LinearLayout>
    <LinearLayout android:layout_gravity="bottom" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
        <include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" layout="@layout/gemini_carrier_label" />
        <com.fiqih.anaknya.mbol.HideableLayout android:layout_marginBottom="35.0dip" android:id="@+id/hideable_layout" android:layout_width="fill_parent" android:layout_height="wrap_content">
            <LinearLayout android:layout_gravity="bottom" android:orientation="horizontal" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="40.0dip" android:layout_weight="1.0">
                <TextView android:textSize="16.0dip" android:textStyle="italic" android:textColor="@color/tab_text_color" android:ellipsize="marquee" android:gravity="center" android:id="@+id/flip_to_notifications_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="menu" android:layout_weight="1.0" />
                <LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" />
                <TextView android:textSize="16.0dip" android:textStyle="italic" android:textColor="@color/tab_text_color" android:ellipsize="marquee" android:gravity="center" android:id="@+id/flip_to_sliders_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="music" android:layout_weight="1.0" />
                <LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" />
                <TextView android:textSize="16.0dip" android:textStyle="italic" android:textColor="@color/tab_text_color" android:ellipsize="marquee" android:gravity="center" android:id="@+id/flip_to_recents_button" android:background="@drawable/tw_recent_panel_button_forphone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="task" android:layout_weight="1.0" />
            </LinearLayout>
        </com.fiqih.anaknya.mbol.HideableLayout>
    </LinearLayout>
</com.android.systemui.statusbar.phone.NotificationPanelView>
  • Buka status_bar_expanded_header.xml, lalu tambahkan line ini tepat dibawah "@id/date" :
<com.fiqih.anaknya.mbol.LayoutExpandedView android:id="@+id/music_button" android:background="@drawable/tw_recent_panel_button_forphone" android:paddingTop="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toRightOf="@id/date" android:paddingStart="4.0dip" />
  • Buka values/colors.xml, lalu tambahkan :
    <color name="tab_text_color_off">#ffffffff</color>
    <color name="tab_text_color_on">#ff1ac31a</color>
    <color name="tab_text_color">#ff1ac31a</color>
  • Buka strings.xml, lalu tambahkan :
    <string name="status_bar_recent_launch_task_manager_title">Task manager</string>
    <string name="status_bar_recent_remove_all_button">Remove all</string>
  • Download Bahan-bahan tambahannya disini 
  • Extrak, taroh di tempat masing-masing
  • Lalu recompile, lalu decompile lagi
  • Buka public.xml ente
  • INGAT SETIAP ROM PUNYA VARIABLE DI BELAKANG IPUT, INVOKE ATAU IGET YANG BERBEDA, JADI HATI2
  • Buka PhoneStatusBar.smali, lalu cari (ctrl+f) .field mFlipSettingsViewAnim:Landroid/animation/Animator; lalu tambahkan tepat di bawahnya :
.field mFlipToMusicLayoutButton:Landroid/view/View;

    .field private mFlipToMusicLayoutButtonListener:Landroid/view/View$OnClickListener;

    .field mFlipToNotificationsButton:Landroid/view/View;

    .field private mFlipToNotificationsButtonListener:Landroid/view/View$OnClickListener;

    .field mFlipToRecentsButton:Landroid/view/View;

    .field private mFlipToRecentsButtonListener:Landroid/view/View$OnClickListener;
  • Lalu cari (ctrl+f) .field mExpandedContents:Landroid/view/View; lalu tambahkan tepat di bawahnya :
.field mExpandedFlipper:Landroid/widget/ViewFlipper;
  • Lalu cari (ctrl+f) .field private mCarrierLabelVisible:Z lalu tambahkan tepat di bawahnya :
.field mClearAllRecentAppsButton:Landroid/widget/ImageButton;
  • Lalu cari (ctrl+f) .field mSystemUiVisibility:I lalu tambahkan tepat di bawahnya :
     .field mTaskManagerButton:Landroid/widget/ImageButton;
  
    .field mRecents:Lcom/fiqih/anaknya/mbol/RecentApplicationsList;
  • Lalu cari (ctrl+f) .field private mRecentsClickListener:Landroid/view/View$OnClickListener; lalu tambahkan tepat di bawahnya :
.field mRecentsContents:Landroid/view/View;
  • Lalu cari (ctrl+f) .field mMoreIcon:Landroid/view/View; lalu tambahkan tepat di bawahnya :
.field private mMusicControls:Lcom/fiqih/anaknya/mbol/MusicControls;

   .field mMusicLayoutContents:Landroid/view/View;
  • Lalu cari (ctrl+f) .method static synthetic access$700 lalu tambahkan tepat di atasnya :
.method static synthetic access$6900(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Landroid/view/View;
    .locals 1
    .parameter

    .prologue
    .line 22
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedContents:Landroid/view/View;

    return-object v0
.end method 
  • Lalu cari (ctrl+f)
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;
  • Lalu tambahkan tepat di bawahnya :
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$38;

    invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$38;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToRecentsButtonListener:Landroid/view/View$OnClickListener;

    new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$39;

    invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$39;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButtonListener:Landroid/view/View$OnClickListener;

    new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$40;

    invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$40;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToMusicLayoutButtonListener:Landroid/view/View$OnClickListener;
  • Lalu cari (ctrl+f) .method private setPileLayers(I)V lalu tambahkan tepat di atasnya :
.method private setMusicControlsLayout()V
    .locals 2

    .prologue
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v1, 0x7f08014b

    invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/fiqih/anaknya/mbol/MusicControls;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMusicControls:Lcom/fiqih/anaknya/mbol/MusicControls;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMusicControls:Lcom/fiqih/anaknya/mbol/MusicControls;

    invoke-virtual {v0}, Lcom/fiqih/anaknya/mbol/MusicControls;->setupControls()V

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMusicControls:Lcom/fiqih/anaknya/mbol/MusicControls;

    invoke-virtual {v0}, Lcom/fiqih/anaknya/mbol/MusicControls;->updateControls()V

    return-void
.end method

Ganti code di .method di atas :

0x7f08014b  ----------------------->   <public type="id" name="exp_music_controls"
  • Lalu cari (ctrl+f) .method private showAlwaysAskOrInternetCall(J)V lalu tambahkan tepat di atasnya :
.method private setUpAllExpandedTabs()V
    .locals 2

    .prologue
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v1, 0x7f080143

    invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButton:Landroid/view/View;

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButton:Landroid/view/View;

    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButtonListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 183
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v1, 0x7f080145

    invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToMusicLayoutButton:Landroid/view/View;

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToMusicLayoutButton:Landroid/view/View;

    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToMusicLayoutButtonListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v1, 0x7f080146

    invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToRecentsButton:Landroid/view/View;

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToRecentsButton:Landroid/view/View;

    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToRecentsButtonListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method

 Ganti code di .method di atas :

0x7f080143   -----------------------> <public type="id" name="flip_to_notifications_button"
0x7f080145   -----------------------> <public type="id" name="flip_to_sliders_button"
0x7f080146   -----------------------> <public type="id" name="flip_to_recents_button"
  • Lalu cari (ctrl+f) .method public disable(I)V lalu tambahkan tepat di atasnya :
.method public deselectAllTabs()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButton:Landroid/view/View;

    invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToMusicLayoutButton:Landroid/view/View;

    invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToRecentsButton:Landroid/view/View;

    invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V

    return-void
.end method
  • Lalu cari (ctrl+f) .method public flipToNotifications()V lalu tambahkan tepat di atasnya :
.method flipToMusicControl()V
    .locals 3

    .prologue
    .line 2255
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMusicLayoutContents:Landroid/view/View;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedContents:Landroid/view/View;

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedFlipper:Landroid/widget/ViewFlipper;

    iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    const v2, 0x7f050018

    invoke-virtual {v0, v1, v2}, Landroid/widget/ViewFlipper;->setInAnimation(Landroid/content/Context;I)V

    iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    const v2, 0x7f050019

    invoke-virtual {v0, v1, v2}, Landroid/widget/ViewFlipper;->setOutAnimation(Landroid/content/Context;I)V

    const/4 v2, 0x2

    invoke-virtual {v0, v2}, Landroid/widget/ViewFlipper;->setDisplayedChild(I)V

    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->deselectAllTabs()V

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToMusicLayoutButton:Landroid/view/View;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V

    return-void
.end method

Ganti code di .method di atas :

0x7f050018   -----------------------> <public type="anim" name="flip_grow_from_middle"
0x7f050019   -----------------------> <public type="anim" name="flip_shrink_to_middle"
  • Di .method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView; 
  • Lalu cari (ctrl+f) iput-object v14, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedContents:Landroid/view/View; lalu tambahkan tepat di bawahnya :
move-object/from16 v0, p0

    iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v2, 0x7f080147

    invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v1

    move-object/from16 v0, p0

    iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMusicLayoutContents:Landroid/view/View;

    move-object/from16 v0, p0

    iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v2, 0x7f080148

    invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v1

    move-object/from16 v0, p0

    iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mRecentsContents:Landroid/view/View;

Ganti code di .method di atas :

0x7f080147   -----------------------> <public type="id" name="music_contents"
0x7f080148   -----------------------> <public type="id" name="recents_contents"
  • Lalu cari (ctrl+f) invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V lalu tambahkan tepat di bawahnya :
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setMusicControlsLayout()V

    invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupRecents()V

    invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setUpAllExpandedTabs()V

    invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->selectInitialTab()V

    invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setUpTaskManagerButton()V
  • Lalu cari (ctrl+f) .method private showAlwaysAskOrInternetCall(J)V lalu tambahkan tepat di atasnya :
.method private setUpTaskManagerButton()V
    .locals 2

    .prologue
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v1, 0x7f08014e

    invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageButton;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTaskManagerButton:Landroid/widget/ImageButton;

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTaskManagerButton:Landroid/widget/ImageButton;

    new-instance v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$49;

    invoke-direct {v1, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$49;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method

.method private setupClearAllButton()V
    .locals 3

    .prologue
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v1, 0x7f08014f

    invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageButton;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mClearAllRecentAppsButton:Landroid/widget/ImageButton;

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mClearAllRecentAppsButton:Landroid/widget/ImageButton;

    new-instance v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$37;

    invoke-direct {v1, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$37;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method

.method private setupRecents()V
    .locals 2

    .prologue
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v1, 0x7f08014d

    invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/fiqih/anaknya/mbol/RecentApplicationsList;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mRecents:Lcom/fiqih/anaknya/mbol/RecentApplicationsList;

    return-void
.end method

Ganti code di .method di atas :

0x7f08014e   ------------> <public type="id" name="expanded_recents_launch_button"
0x7f08014f   ------------> <public type="id" name="expanded_recents_RemoveAll_button"
0x7f08014d   ------------> <public type="id" name="recents"
  • Lalu cari (ctrl+f) .method public createAndAddWindows()V lalu tambahkan tepat di atasnya :
.method clearAllRecentApps()V
    .locals 1

    .prologue
    .line 2255
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mRecents:Lcom/fiqih/anaknya/mbol/RecentApplicationsList;

    invoke-virtual {v0}, Lcom/fiqih/anaknya/mbol/RecentApplicationsList;->clearAllTasksFromSystemRecentTaskList()V

    .line 2275
    return-void
.end method
  • Lalu cari (ctrl+f) .method public flipToSettings()V lalu tambahkan tepat di atasnya :
.method flipToNotificationsMod()V
    .locals 3

    .prologue
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPile:Lcom/android/systemui/statusbar/policy/NotificationRowLayout;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedContents:Landroid/view/View;

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedFlipper:Landroid/widget/ViewFlipper;

    iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    const v2, 0x7f050018

    invoke-virtual {v0, v1, v2}, Landroid/widget/ViewFlipper;->setInAnimation(Landroid/content/Context;I)V

    iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    const v2, 0x7f050019

    invoke-virtual {v0, v1, v2}, Landroid/widget/ViewFlipper;->setOutAnimation(Landroid/content/Context;I)V

    const/4 v2, 0x0

    invoke-virtual {v0, v2}, Landroid/widget/ViewFlipper;->setDisplayedChild(I)V

    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->deselectAllTabs()V

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButton:Landroid/view/View;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V

    return-void
.end method

.method flipToRecents()V
    .locals 3

    .prologue
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mRecents:Lcom/fiqih/anaknya/mbol/RecentApplicationsList;

    invoke-virtual {v0}, Lcom/fiqih/anaknya/mbol/RecentApplicationsList;->setupRecentApplicationsList()V

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mRecentsContents:Landroid/view/View;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedContents:Landroid/view/View;

    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedFlipper:Landroid/widget/ViewFlipper;

    iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    const v2, 0x7f050018

    invoke-virtual {v0, v1, v2}, Landroid/widget/ViewFlipper;->setInAnimation(Landroid/content/Context;I)V

    iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

    const v2, 0x7f050019

    invoke-virtual {v0, v1, v2}, Landroid/widget/ViewFlipper;->setOutAnimation(Landroid/content/Context;I)V

    .line 2269
    const/4 v2, 0x3

    invoke-virtual {v0, v2}, Landroid/widget/ViewFlipper;->setDisplayedChild(I)V

    .line 2271
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->deselectAllTabs()V

    .line 2273
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToRecentsButton:Landroid/view/View;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V

    .line 2275
    return-void
.end method

Ganti code di .method di atas :

0x7f050018   -----------------------> <public type="anim" name="flip_grow_from_middle"
0x7f050019   -----------------------> <public type="anim" name="flip_shrink_to_middle"
  • Lalu cari (ctrl+f) .method private setIntruderAlertVisibility(Z)V lalu tambahkan tepat di atasnya :
.method private selectInitialTab()V
    .locals 2

    .prologue
    .line 69
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mFlipToNotificationsButton:Landroid/view/View;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/view/View;->setSelected(Z)V

    return-void
.end method
  • Lalu cari di public ente <public type="id" name="scroll", ambil codenya lalu cari di PhoneStatusBar.smali code tersebut, maka akan terdapat line seperti ini :
move-object/from16 v0, p0

>>> iget-object v14, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

>>> const v15, 0x7f080044 cari line buat mempermudah  <public type="id" name="scroll"
  • Nah lalu tambahkan tepat di atas line move-object/from16 v0, p0 di atas, line berikut :
move-object/from16 v0, p0

    iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

    const v2, 0x7f08011e

    invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ViewFlipper;

    move-object/from16 v0, p0

    iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedFlipper:Landroid/widget/ViewFlipper;

Ganti code di .method di atas :

0x7f08011e   -----------------------> <public type="id" name="expanded_flipper"
  • Buka com/fiqih/anaknya/mbol/HideableLayout.smali :
search di smali   ---------------------->  search di public ente
0x7f080142       -----------------------> <public type="id" name="hideable_layout"
  • Buka com/fiqih/anaknya/mbol/LayoutExpandedView.smali :
search di smali   ---------------------->  search di public ente
0x7f080164       -----------------------> <public type="id" name="music_button"
0x7f020329       -----------------------> <public type="drawable" name="tab_music"
  • Buka com/fiqih/anaknya/mbol/MusicControls.smali :
search di smali   ---------------------->  search di public ente
0x7f040061       ----------------------> <public type="layout" name="fiqih_status_bar_music_controls"
0x7f08015e       -----------------------> <public type="id" name="musicControlPause"
0x7f08015f       -----------------------> <public type="id" name="musicControlPlay"
0x7f08015d       -----------------------> <public type="id" name="musicControlPrevious"
0x7f080160       -----------------------> <public type="id" name="musicControlNext"
0x7f08015c       -----------------------> <public type="id" name="musicNowPlayingInfo"
0x7f080167       -----------------------> <public type="id" name="albumArt"
0x7f0202f0       -----------------------> <public type="drawable" name="default_artwork"
  • Buka com/fiqih/anaknya/mbol/RecentApplicationsList.smali :
search di smali   ---------------------->  search di public ente
0x7f0800ac       -----------------------> <public type="id" name="recents_no_apps"
  • Buka com/fiqih/anaknya/mbol/RecentApplicationsListAdapter.smali :
search di smali   ---------------------->  search di public ente
0x7f040060       ----------------------> <public type="layout" name="fiqih_recents_row"
0x7f080130       -----------------------> <public type="id" name="applist_icon"
0x7f080131       -----------------------> <public type="id" name="applist_name"
0x7f080132       -----------------------> <public type="id" name="applist_package"
  • Save lalu recompile
  • Done :-)
  • Kalo ada yg FC biasakan pake Catlog biar tau dimana errornya, bisa liat di Cara memakai CatLog

SS :
yg di tutor ini cuma 3 tab yg di SS yah hehe :-)




Thanks To :
ALLAH SWT
Om No More
Om Adi Sukahadi
You

27 komentar

gan ane request tutorial menambah menu reboot dan recovery pada Expanded Power Menu gan :-D

Buat kitkat bisa ga????

wkwkw ane belom nyoba um, coming soon yah hehe :v

wkwkw maaf um ane ga ada device kitkat, jadi blm coba :v

terimkasih om ditunggu kunjungan baliknya http://idsmk.com/

Nice OM BAGUS TIO
ditunggu kunjungan dan Komentarnya disini http://frendmovie.blogspot.com/2014/08/up-bluray-720p.html

gan,buat JB 4.1.2 bisa ga?

om bagus share phonestatus bar 45 yg blm include viewpage. yg om bagus bagi diatas include viewpage om

bisa um, untuk smalinya tapi kudu compare sama UInya um adi di xda um hehe

di pake ga masalah kok um, ga bakal FC um.

kalo FC coba kirim logcatnya aja

maksudnya tutor pake yang ini,smali pake pnya om adi di xda...pengen coba di galcore duos..

iya, smali sama linenya sama kan sama di UInya um adi peletakannya :-)

Bahan" systemUI,,settings.apk,,,settings.apk di apain gak ad d tutor..?

di masukin aja um, perhatikan stepnya um.
ga mungkin ane upload kalo ga ada gunanya kan ?? :-)

Udh sya prhatikan tutor omm,,bhan udh d download tp gak ad yg brhubungan dgn settings.apk

ohh di tutor ini emng ga butuh edit settings um, maaf salah mahamin komenan ente hehe

Cara menambah tab baru gmana om caranya

modifikasi smalinya aja um, atau ga liat tutsnya um adi yg nambah lidroid 27 for jb4.2 disana ada tuts nambah tab, lumayan buat patokan aja

ane coba di jb 412 bingung om gk ada resetuserobservernya :-(

coba compare sama ui om adi di xda yg buat cm10 buat peletakannya um

um,ane coba compare yg recent apps nya.sukses..tp pas di pencet task.app nya fc ya um.lainya ga da masalah..ni logcatnya
11-06 10:54:58.034 E/AndroidRuntime(737): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.adi.TASKMANAGER_PREFERENCES flg=0x10000000 }
kira2 di mana salahnya?ma'ksh ...

Ane newby.. Pengen blajar.. DC/RC uda bisa.. Cm pngen blajar xml n smali. Posisi pnempatan ny..

fc gan, pencerahannya dong. perasaan dah bner ane ngerjainnya..
catlog :
01-24 22:28:42.650 E/Trace ( 4793): error opening trace file: No such file or directory (2)
01-24 22:28:43.187 W/dalvikvm( 4801): VFY: execution can walk off end of code area (from 0x9)
01-24 22:28:43.187 W/dalvikvm( 4801): Verifier rejected class Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
01-24 22:28:43.194 E/AndroidRuntime( 4801): FATAL EXCEPTION: main
01-24 22:28:43.194 E/AndroidRuntime( 4801): java.lang.VerifyError: com/android/systemui/statusbar/phone/PhoneStatusBar

Berkomentarlah yang baik, tidak mencela postingan :-) . Gunakan bahasa yang sopan dan mudah di mengerti.

TERIMA KASIH TELAH BERKOMENTAR, karena pengunjung yang baik adalah pengunjung yang berkomentar :-) :v
EmoticonEmoticon