NPanel For Pure LP/CM12.1 By Jerson


N Panel Guide By Team BISP
- Jerson

Credits
- Jerson Carin
- BISP
- Patrick Leoncito

If the guide is working so give credits


Open Dimens.xml

Compare

<dimen name="status_bar_header_height">105.0dip</dimen>
<dimen name="status_bar_header_height_expanded">105.0dip</dimen>
    
Open Status_bar_expanded_header.xml

Find this

<LinearLayout android:id="@id/system_icons_super_container" android:background="@drawable/ripple_drawable" android:layout_width="wrap_content" android:layout_height="@dimen/status_bar_header_height" android:layout_alignWithParentIfMissing="true" android:paddingEnd="4.0dip" android:layout_marginStart="16.0dip" android:layout_toStartOf="@id/multi_user_switch">
        <FrameLayout android:layout_gravity="center_vertical" android:id="@id/system_icons_container" android:layout_width="wrap_content" android:layout_height="@dimen/status_bar_height">
            <include layout="@layout/system_icons" />
        </FrameLayout>
        <TextView android:textSize="@dimen/battery_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/battery_level" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="noHideDescendants" android:paddingEnd="@dimen/battery_level_padding_end" android:layout_marginStart="@dimen/header_battery_margin_expanded" />
    </LinearLayout>
    <com.android.keyguard.AlphaOptimizedImageButton android:id="@id/screenshot_button" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="15.0dip" android:src="@drawable/ic_qs_screenshot" android:layout_alignParentBottom="true" android:paddingStart="15.0dip" android:layout_toStartOf="@id/system_icons_super_container" style="@android:style/Widget.Material.Button.Borderless" />
    <TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.EmergencyCallsOnly" android:gravity="center_vertical" android:id="@id/header_emergency_calls_only" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="@dimen/status_bar_header_height" android:text="@android:string/emergency_calls_only" android:singleLine="true" android:paddingStart="16.0dip" android:paddingEnd="16.0dip" android:layout_toStartOf="@id/system_icons_super_container" android:layout_alignParentStart="true" />
    <FrameLayout android:id="@id/date_group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/clock_collapsed_bottom_margin" android:layout_alignParentBottom="true">
        <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date_collapsed" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_below="@id/clock" android:layout_marginStart="16.0dip" systemui:datePattern="@string/abbrev_wday_month_day_no_year_alarm" />
        <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date_expanded" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_below="@id/clock" android:layout_marginStart="16.0dip" systemui:datePattern="eeeeMMMMd" />
    </FrameLayout>
    <include android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@id/date_group" android:layout_marginStart="16.0dip" layout="@layout/split_clock_view" />
    <Button android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:textColor="#64ffffff" android:id="@id/alarm_status" android:background="?android:selectableItemBackground" android:paddingTop="16.0dip" android:paddingBottom="16.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="4.0dip" android:drawablePadding="6.0dip" android:layout_alignParentBottom="true" android:drawableStart="@drawable/ic_access_alarms_small" android:paddingStart="6.0dip" android:paddingEnd="6.0dip" android:layout_toEndOf="@id/date_group" />
    
 Then The Width and Height make 0.0dip the value and also the padding or margin

Find this

<com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@id/multi_user_switch" android:background="@drawable/ripple_drawable" android:layout_width="@dimen/multi_user_switch_width_collapsed" android:layout_height="@dimen/status_bar_header_height" android:layout_alignParentEnd="true">
        <ImageView android:layout_gravity="center" android:id="@id/multi_user_avatar" android:layout_width="@dimen/multi_user_avatar_expanded_size" android:layout_height="@dimen/multi_user_avatar_expanded_size" android:scaleType="centerInside" />
    </com.android.systemui.statusbar.phone.MultiUserSwitch>
    <com.android.keyguard.AlphaOptimizedImageButton android:id="@id/settings_button" android:background="@drawable/ripple_drawable" android:layout_width="48.0dip" android:layout_height="@dimen/status_bar_header_height" android:src="@drawable/ic_settings" android:contentDescription="@string/accessibility_desc_settings" android:layout_toStartOf="@id/multi_user_switch" style="@android:style/Widget.Material.Button.Borderless" />
    
 Then Replace with this

 <LinearLayout android:id="@+id/jerson_header_icon_group" android:layout_width="fill_parent" android:layout_height="48.0dip" android:layout_marginTop="4.0dip">
        <RelativeLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@+id/mel_header_icon" android:paddingTop="0.0dip" android:clickable="false" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="48.0dip" android:baselineAligned="false" android:layout_alignParentTop="true">
            <LinearLayout android:gravity="end" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginStart="16.0dip" android:layout_marginEnd="3.0dip">
                <com.android.systemui.statusbar.phone.MultiUserSwitch android:id="@id/multi_user_switch" android:background="@drawable/ripple_drawable" android:focusable="true" android:layout_width="48.0dip" android:layout_height="48.0dip" android:layout_alignParentEnd="true">
                    <ImageView android:layout_gravity="center" android:id="@id/multi_user_avatar" android:layout_width="@dimen/multi_user_avatar_expanded_size" android:layout_height="@dimen/multi_user_avatar_expanded_size" android:scaleType="centerInside" />
                </com.android.systemui.statusbar.phone.MultiUserSwitch>
                <com.android.systemui.statusbar.AlphaOptimizedFrameLayout android:id="@+id/settings_button_container" android:clipChildren="false" android:clipToPadding="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:layout_marginRight="6.0dip">
                    <com.android.keyguard.AlphaOptimizedImageButton android:id="@+id/settings_button" android:background="@drawable/ripple_drawable" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/ic_settings" android:tint="?android:colorForeground" android:contentDescription="@string/accessibility_desc_settings" style="@android:style/Widget.Material.Button.Borderless" />
                </com.android.systemui.statusbar.AlphaOptimizedFrameLayout>
            </LinearLayout>
        </RelativeLayout>
    </LinearLayout>
    <LinearLayout android:id="@+id/jerson_super_container" android:focusable="true" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="55.0dip">
        <FrameLayout android:layout_gravity="center_vertical" android:id="@+id/jerson_qs_container" android:layout_width="wrap_content" android:layout_height="wrap_content">
            <LinearLayout android:gravity="center_vertical" android:id="@+id/jerson_qs_holder" android:layout_width="fill_parent" android:layout_height="wrap_content">
                <include android:id="@+id/jerson_quick_toggles" android:layout_width="fill_parent" android:layout_height="wrap_content" layout="@layout/quick_settings_status_bar" />
            </LinearLayout>
        </FrameLayout>
    </LinearLayout>
    
Find This

<FrameLayout android:id="@id/date_group" android:layout_width="wrap_content" android:layout_height="0.0dip" android:layout_marginBottom="0.0dip" android:layout_alignParentBottom="true">
        <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date_collapsed" android:layout_width="0.0dip" android:layout_height="0.0dip" android:singleLine="true" android:layout_below="@id/clock" android:layout_marginStart="16.0dip" systemui:datePattern="@string/abbrev_wday_month_day_no_year_alarm" />
        <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:id="@id/date_expanded" android:layout_width="0.0dip" android:layout_height="0.0dip" android:singleLine="true" android:layout_below="@id/clock" android:layout_marginStart="16.0dip" systemui:datePattern="eeeeMMMMd" />
    </FrameLayout>
    
Add this Below

<com.android.systemui.statusbar.AlphaOptimizedFrameLayout android:layout_gravity="top" android:orientation="horizontal" android:id="@+id/jerson_timedate_container" android:layout_width="fill_parent" android:layout_height="50.0dip">
        <TextClock android:textSize="14.0dip" android:layout_gravity="center|left|top" android:orientation="horizontal" android:id="@+id/jerson_clock_view" android:paddingLeft="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:layout_alignParentLeft="true" />
        <com.android.systemui.statusbar.phone.DateView android:textSize="12.0dip" android:textColor="#ffffffff" android:layout_gravity="center|left" android:id="@+id/jerson_date_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="15.0dip" android:layout_marginBottom="-7.0dip" />
</com.android.systemui.statusbar.AlphaOptimizedFrameLayout>
    
Now Recompile - Decompile

Open StatusBarHeaderView.smali

Find this

.field private mMultiUserCollapsedMargin:I

.field private mMultiUserExpandedMargin:I

Delete that

Find this

.line 248
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0d008c

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    iput v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mMultiUserExpandedMargin:I

    .line 250
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0d008d

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    iput v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mMultiUserCollapsedMargin:I
    

 Delete that

 Find this

 .method private updateMultiUserSwitch()V

 Then Delete that whole methods

 Find this

 .method public updateEverything()V

 Then Scroll down

 Look for

 .line 310
    invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->updateMultiUserSwitch()V
    
  Then Delete that
  
Find This

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

Then Delete that

Find this

.line 634
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mSettingsButton:Landroid/view/View;

    iget v1, p1, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView$LayoutValues;->settingsTranslation:F

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

    .line 635
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mSettingsButton:Landroid/view/View;

    iget v1, p1, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView$LayoutValues;->settingsRotation:F

    invoke-virtual {v0, v1}, Landroid/view/View;->setRotation(F)V
    
Then Delete That

Find this

.line 644
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mSettingsButton:Landroid/view/View;

    iget v1, p1, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView$LayoutValues;->settingsAlpha:F

    invoke-direct {p0, v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->applyAlpha(Landroid/view/View;F)V
    
Then Delete that

Find this

.line 578
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mSettingsButton:Landroid/view/View;

    invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->getAlphaForVisibility(Landroid/view/View;)F

    move-result v0

    iput v0, p1, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView$LayoutValues;->settingsAlpha:F
    
Then  Delete that

Find this

.line 330
    iget-object v5, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mSettingsButton:Landroid/view/View;

    iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mExpanded:Z

    if-eqz v0, :cond_7

    move v0, v1

    :goto_3
    invoke-virtual {v5, v0}, Landroid/view/View;->setVisibility(I)V
    
 Then Delete that

 Note Its Depend on that cond_ and goto_

 so for example the cond is cond_7 and the goto is 3

 So find look like this

 then delete that

 :cond_7
    move v0, v2

    .line 330
    goto :goto_3
    
 Note the Next Cond_8 and goto_4 for example should be adjust so it will make cond_7 and goto_3

 Also change    if-eqz 

 and also the :goto_

 Our Smali is Different From yours

 Trust Your Self Haha

 Find this

 .method private updateVisibilities

 Then Add This

    .line 150
    iget-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mQuickToggles:Landroid/view/View;

    iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mExpanded:Z

    if-eqz v1, :cond_xx

    move v2, v5

    :goto_xx
    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V
    
    Also this
    
    :cond_xx
    move v2, v3

    goto :goto_xx
    
    Compare your Smali how arrange haha Explore
    
    note the xx is the value so change that according on arrangement...
    
   Find 
   
.method private onFinishInflate

Then add this

.line 160
    const v0, 0x7f1001b9 #id jerson_quick_toggles

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

    move-result-object v0

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mQuickToggles:Landroid/view/View;
    
    .line 161
    const v0, 0x7f1001bb #id jerson_super_container

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

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mJersSuperContainer:Landroid/widget/LinearLayout;

    .line 161
    const v0, 0x7f1001bd #id jerson_qs_holder

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

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mJersHolder:Landroid/widget/LinearLayout;

    .line 161
    const v0, 0x7f1001bc #id jerson_qs_container

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

    move-result-object v0

    check-cast v0, Landroid/widget/FrameLayout;

    iput-object v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mJersContainer:Landroid/widget/FrameLayout;

Find 
# instance fields

Then add this

.field private mQuickToggles:Landroid/view/View;

.field private mJersContainer:Landroid/widget/FrameLayout;

.field private mJersHolder:Landroid/widget/LinearLayout;

.field private mJersSuperContainer:Landroid/widget/LinearLayout;




If you Want add Expand Indicator so Use Expand Indicator Style on BISP Page







Post a Comment

0 Comments