Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/FooterView.java +25 −7 Original line number Diff line number Diff line Loading @@ -35,6 +35,10 @@ public class FooterView extends StackScrollerDecorView { private FooterViewButton mClearAllButton; private FooterViewButton mManageButton; private boolean mShowHistory; // String cache, for performance reasons. // Reading them from a Resources object can be quite slow sometimes. private String mManageNotificationText; private String mManageNotificationHistoryText; public FooterView(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -68,6 +72,8 @@ public class FooterView extends StackScrollerDecorView { super.onFinishInflate(); mClearAllButton = (FooterViewButton) findSecondaryView(); mManageButton = findViewById(R.id.manage_text); updateResources(); updateText(); } public void setManageButtonClickListener(OnClickListener listener) { Loading @@ -86,15 +92,20 @@ public class FooterView extends StackScrollerDecorView { } public void showHistory(boolean showHistory) { if (mShowHistory == showHistory) { return; } mShowHistory = showHistory; updateText(); } private void updateText() { if (mShowHistory) { mManageButton.setText(R.string.manage_notifications_history_text); mManageButton.setContentDescription( mContext.getString(R.string.manage_notifications_history_text)); mManageButton.setText(mManageNotificationHistoryText); mManageButton.setContentDescription(mManageNotificationHistoryText); } else { mManageButton.setText(R.string.manage_notifications_text); mManageButton.setContentDescription( mContext.getString(R.string.manage_notifications_text)); mManageButton.setText(mManageNotificationText); mManageButton.setContentDescription(mManageNotificationText); } } Loading @@ -109,7 +120,8 @@ public class FooterView extends StackScrollerDecorView { mClearAllButton.setText(R.string.clear_all_notifications_text); mClearAllButton.setContentDescription( mContext.getString(R.string.accessibility_clear_all)); showHistory(mShowHistory); updateResources(); updateText(); } /** Loading @@ -124,6 +136,12 @@ public class FooterView extends StackScrollerDecorView { mManageButton.setTextColor(textColor); } private void updateResources() { mManageNotificationText = getContext().getString(R.string.manage_notifications_text); mManageNotificationHistoryText = getContext() .getString(R.string.manage_notifications_history_text); } @Override public ExpandableViewState createExpandableViewState() { return new FooterViewState(); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/FooterView.java +25 −7 Original line number Diff line number Diff line Loading @@ -35,6 +35,10 @@ public class FooterView extends StackScrollerDecorView { private FooterViewButton mClearAllButton; private FooterViewButton mManageButton; private boolean mShowHistory; // String cache, for performance reasons. // Reading them from a Resources object can be quite slow sometimes. private String mManageNotificationText; private String mManageNotificationHistoryText; public FooterView(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -68,6 +72,8 @@ public class FooterView extends StackScrollerDecorView { super.onFinishInflate(); mClearAllButton = (FooterViewButton) findSecondaryView(); mManageButton = findViewById(R.id.manage_text); updateResources(); updateText(); } public void setManageButtonClickListener(OnClickListener listener) { Loading @@ -86,15 +92,20 @@ public class FooterView extends StackScrollerDecorView { } public void showHistory(boolean showHistory) { if (mShowHistory == showHistory) { return; } mShowHistory = showHistory; updateText(); } private void updateText() { if (mShowHistory) { mManageButton.setText(R.string.manage_notifications_history_text); mManageButton.setContentDescription( mContext.getString(R.string.manage_notifications_history_text)); mManageButton.setText(mManageNotificationHistoryText); mManageButton.setContentDescription(mManageNotificationHistoryText); } else { mManageButton.setText(R.string.manage_notifications_text); mManageButton.setContentDescription( mContext.getString(R.string.manage_notifications_text)); mManageButton.setText(mManageNotificationText); mManageButton.setContentDescription(mManageNotificationText); } } Loading @@ -109,7 +120,8 @@ public class FooterView extends StackScrollerDecorView { mClearAllButton.setText(R.string.clear_all_notifications_text); mClearAllButton.setContentDescription( mContext.getString(R.string.accessibility_clear_all)); showHistory(mShowHistory); updateResources(); updateText(); } /** Loading @@ -124,6 +136,12 @@ public class FooterView extends StackScrollerDecorView { mManageButton.setTextColor(textColor); } private void updateResources() { mManageNotificationText = getContext().getString(R.string.manage_notifications_text); mManageNotificationHistoryText = getContext() .getString(R.string.manage_notifications_history_text); } @Override public ExpandableViewState createExpandableViewState() { return new FooterViewState(); Loading