Loading packages/SystemUI/res/layout/status_bar_expanded.xml +3 −12 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_marginLeft="@dimen/notification_panel_margin_left" android:animateLayoutChanges="true" > <TextView Loading Loading @@ -80,18 +79,10 @@ </ScrollView> </LinearLayout> <LinearLayout android:id="@+id/handle" android:layout_width="match_parent" android:layout_height="@dimen/close_handle_height" android:layout_gravity="bottom" android:orientation="vertical" > <ImageView <View android:id="@+id/handle" android:layout_width="match_parent" android:layout_height="@dimen/close_handle_height" android:layout_gravity="bottom" android:scaleType="fitXY" android:src="@drawable/status_bar_close" /> </LinearLayout> </com.android.systemui.statusbar.phone.NotificationPanelView><!-- end of sliding panel --> packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +28 −0 Original line number Diff line number Diff line Loading @@ -17,11 +17,23 @@ package com.android.systemui.statusbar.phone; import android.content.Context; import android.content.res.Resources; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import com.android.systemui.R; public class NotificationPanelView extends PanelView { Drawable mHandleBar; float mHandleBarHeight; public NotificationPanelView(Context context, AttributeSet attrs) { super(context, attrs); Resources resources = context.getResources(); mHandleBar = resources.getDrawable(R.drawable.status_bar_close); mHandleBarHeight = resources.getDimension(R.dimen.close_handle_height); } @Override Loading @@ -31,4 +43,20 @@ public class NotificationPanelView extends PanelView { "notifications,v=" + vel); super.fling(vel, always); } @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); if (changed) { mHandleBar.setBounds(0, 0, getWidth(), (int) mHandleBarHeight); } } @Override public void draw(Canvas canvas) { super.draw(canvas); canvas.translate(0, getHeight() - mHandleBarHeight); mHandleBar.draw(canvas); canvas.translate(0, -getHeight() + mHandleBarHeight); } } Loading
packages/SystemUI/res/layout/status_bar_expanded.xml +3 −12 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_marginLeft="@dimen/notification_panel_margin_left" android:animateLayoutChanges="true" > <TextView Loading Loading @@ -80,18 +79,10 @@ </ScrollView> </LinearLayout> <LinearLayout android:id="@+id/handle" android:layout_width="match_parent" android:layout_height="@dimen/close_handle_height" android:layout_gravity="bottom" android:orientation="vertical" > <ImageView <View android:id="@+id/handle" android:layout_width="match_parent" android:layout_height="@dimen/close_handle_height" android:layout_gravity="bottom" android:scaleType="fitXY" android:src="@drawable/status_bar_close" /> </LinearLayout> </com.android.systemui.statusbar.phone.NotificationPanelView><!-- end of sliding panel -->
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +28 −0 Original line number Diff line number Diff line Loading @@ -17,11 +17,23 @@ package com.android.systemui.statusbar.phone; import android.content.Context; import android.content.res.Resources; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import com.android.systemui.R; public class NotificationPanelView extends PanelView { Drawable mHandleBar; float mHandleBarHeight; public NotificationPanelView(Context context, AttributeSet attrs) { super(context, attrs); Resources resources = context.getResources(); mHandleBar = resources.getDrawable(R.drawable.status_bar_close); mHandleBarHeight = resources.getDimension(R.dimen.close_handle_height); } @Override Loading @@ -31,4 +43,20 @@ public class NotificationPanelView extends PanelView { "notifications,v=" + vel); super.fling(vel, always); } @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); if (changed) { mHandleBar.setBounds(0, 0, getWidth(), (int) mHandleBarHeight); } } @Override public void draw(Canvas canvas) { super.draw(canvas); canvas.translate(0, getHeight() - mHandleBarHeight); mHandleBar.draw(canvas); canvas.translate(0, -getHeight() + mHandleBarHeight); } }