Loading packages/SystemUI/res/layout/status_bar_expanded.xml +1 −28 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ android:layout_height="wrap_content" /> <LinearLayout android:id="@+id/carrier_label_layout" <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" Loading Loading @@ -127,36 +127,9 @@ android:layout_height="wrap_content" android:orientation="vertical" /> <TextView android:id="@+id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right|center_vertical" android:layout_marginTop="4dp" android:layout_marginBottom="1dp" android:text="@string/status_bar_clear_all_button" style="@style/StatusBar.ClearButton" android:paddingLeft="15dp" android:paddingRight="15dp" /> </com.android.systemui.statusbar.NotificationLinearLayout> </ScrollView> <LinearLayout android:id="@+id/compact_carrier_layout" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" > <com.android.systemui.statusbar.CarrierLabel android:gravity="bottom|right|center" android:textAppearance="@style/TextAppearance.StatusBar.Title" android:background="@android:color/transparent" android:layout_marginRight="6.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentRight="true" /> </LinearLayout> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" Loading packages/SystemUI/res/layout/status_bar_expanded_compact_carrier.xml 0 → 100644 +135 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* apps/common/assets/default/default/skins/StatusBar.xml ** ** Copyright 2006, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <com.android.systemui.statusbar.ExpandedView xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants" > <LinearLayout android:id="@+id/power_and_carrier" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingTop="3dp" android:paddingBottom="5dp" android:paddingRight="3dp" android:background="@drawable/title_bar_portrait" > <com.android.systemui.statusbar.powerwidget.PowerWidget android:id="@+id/exp_power_stat" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" > <ScrollView android:id="@+id/scroll" android:layout_width="match_parent" android:layout_height="match_parent" android:fadingEdge="none" android:overScrollMode="ifContentScrolls" > <com.android.systemui.statusbar.NotificationLinearLayout android:id="@+id/notificationLinearLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:id="@+id/noNotificationsTitle" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/shade_header_background" android:paddingLeft="5dp" android:textAppearance="@style/TextAppearance.StatusBar.Title" android:text="@string/status_bar_no_notifications_title" /> <TextView android:id="@+id/ongoingTitle" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/shade_header_background" android:paddingLeft="5dp" android:textAppearance="@style/TextAppearance.StatusBar.Title" android:text="@string/status_bar_ongoing_events_title" /> <LinearLayout android:id="@+id/ongoingItems" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> <TextView android:id="@+id/latestTitle" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/shade_header_background" android:paddingLeft="5dp" android:textAppearance="@style/TextAppearance.StatusBar.Title" android:text="@string/status_bar_latest_events_title" /> <LinearLayout android:id="@+id/latestItems" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> <TextView android:id="@+id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right|center_vertical" android:layout_marginTop="4dp" android:layout_marginBottom="1dp" android:text="@string/status_bar_clear_all_button" style="@style/StatusBar.ClearButton" android:paddingLeft="15dp" android:paddingRight="15dp" /> </com.android.systemui.statusbar.NotificationLinearLayout> </ScrollView> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" > <com.android.systemui.statusbar.CarrierLabel android:gravity="bottom|right|center" android:textAppearance="@style/TextAppearance.StatusBar.Title" android:background="@android:color/transparent" android:layout_marginRight="6.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentRight="true" /> </LinearLayout> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" /> </FrameLayout> </com.android.systemui.statusbar.ExpandedView> packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java +18 −47 Original line number Diff line number Diff line Loading @@ -136,7 +136,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks // top bar TextView mNoNotificationsTitle; TextView mClearButton; TextView mCompactClearButton; ViewGroup mClearButtonParent; CmBatteryMiniIcon mCmBatteryMiniIcon; // drag bar Loading Loading @@ -166,11 +165,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks // the power widget PowerWidget mPowerWidget; //Carrier label stuff LinearLayout mCarrierLabelLayout; LinearLayout mCompactCarrierLayout; LinearLayout mPowerAndCarrier; // ticker private Ticker mTicker; private View mTickerView; Loading Loading @@ -219,10 +213,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks Settings.System.getUriFor(Settings.System.SOFT_BUTTONS_LEFT), false, this); resolver.registerContentObserver( Settings.System.getUriFor(Settings.System.STATUS_BAR_DEAD_ZONE), false, this); resolver.registerContentObserver( Settings.System.getUriFor(Settings.System.STATUS_BAR_COMPACT_CARRIER), false, this); resolver.registerContentObserver( Settings.System.getUriFor(Settings.System.EXPANDED_VIEW_WIDGET), false, this); onChange(true); } Loading @@ -240,10 +230,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks defValue=(CmSystem.getDefaultBool(mContext, CmSystem.CM_DEFAULT_USE_DEAD_ZONE) ? 1 : 0); mDeadZone = (Settings.System.getInt(resolver, Settings.System.STATUS_BAR_DEAD_ZONE, defValue) == 1); mCompactCarrier = (Settings.System.getInt(resolver, Settings.System.STATUS_BAR_COMPACT_CARRIER, 0) == 1); updateLayout(); updateCarrierLabel(); } } Loading Loading @@ -355,7 +342,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks return null; } private boolean mCompactCarrier = false; private boolean compactCarrier = false; // ================================================================================ // Constructing the view Loading @@ -366,9 +353,11 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks mIconSize = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_icon_size); //Check for compact carrier layout and apply if enabled mCompactCarrier = Settings.System.getInt(getContentResolver(), compactCarrier = Settings.System.getInt(getContentResolver(), Settings.System.STATUS_BAR_COMPACT_CARRIER, 0) == 1; ExpandedView expanded = (ExpandedView)View.inflate(context, ExpandedView expanded = compactCarrier ? (ExpandedView)View.inflate(context, R.layout.status_bar_expanded_compact_carrier, null) : (ExpandedView)View.inflate(context, R.layout.status_bar_expanded, null); expanded.mService = this; Loading Loading @@ -400,9 +389,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks mNoNotificationsTitle = (TextView)expanded.findViewById(R.id.noNotificationsTitle); mClearButton = (TextView)expanded.findViewById(R.id.clear_all_button); mClearButton.setOnClickListener(mClearButtonListener); mCompactClearButton = (TextView)expanded.findViewById(R.id.compact_clear_all_button); mCompactClearButton.setOnClickListener(mClearButtonListener); mPowerAndCarrier = (LinearLayout)expanded.findViewById(R.id.power_and_carrier); mClearButtonParent = (ViewGroup)mClearButton.getParent(); mScrollView = (ScrollView)expanded.findViewById(R.id.scroll); mNotificationLinearLayout = expanded.findViewById(R.id.notificationLinearLayout); Loading @@ -427,9 +414,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks } }); mCarrierLabelLayout = (LinearLayout)expanded.findViewById(R.id.carrier_label_layout); mCompactCarrierLayout = (LinearLayout)expanded.findViewById(R.id.compact_carrier_layout); mTicker = new MyTicker(context, sb); TickerView tickerView = (TickerView)sb.findViewById(R.id.tickerText); Loading @@ -441,7 +425,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks mCloseView.mService = this; updateLayout(); updateCarrierLabel(); mContext=context; mEdgeBorder = res.getDimensionPixelSize(R.dimen.status_bar_edge_ignore); Loading @@ -451,20 +434,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks mDateView.setVisibility(View.INVISIBLE); } private void updateCarrierLabel() { if (mCompactCarrier) { mCarrierLabelLayout.setVisibility(View.GONE); mCompactCarrierLayout.setVisibility(View.VISIBLE); if (mLatest.hasClearableItems()) mCompactClearButton.setVisibility(View.VISIBLE); } else { mCarrierLabelLayout.setVisibility(View.VISIBLE); mCompactCarrierLayout.setVisibility(View.GONE); mCompactClearButton.setVisibility(View.GONE); } } private void updateLayout() { if(mTrackingView==null || mCloseView==null || mExpandedView==null) return; Loading @@ -484,13 +453,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks // readd in right order mExpandedView.addView(powerAndCarrier, mBottomBar ? 1 : 0); powerAndCarrier.addView(power, mBottomBar && !mCompactCarrier ? 1 : 0); //remove small ugly grey area if compactcarrier is enabled and power widget disabled boolean hideArea = mCompactCarrier && Settings.System.getInt(mContext.getContentResolver(), Settings.System.EXPANDED_VIEW_WIDGET, 1) == 0; mPowerAndCarrier.setVisibility(hideArea ? View.GONE : View.VISIBLE); powerAndCarrier.addView(power, mBottomBar && !compactCarrier ? 1 : 0); } protected void addStatusBarView() { Loading Loading @@ -778,17 +741,25 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks return entry.notification; } private boolean isClearButtonAdded = false; private void setAreThereNotifications() { boolean ongoing = mOngoing.hasVisibleItems(); boolean latest = mLatest.hasVisibleItems(); // (no ongoing notifications are clearable) if (mLatest.hasClearableItems()) { if (mCompactCarrier) mCompactClearButton.setVisibility(View.VISIBLE); mClearButton.setVisibility(View.VISIBLE); if (compactCarrier && !isClearButtonAdded) { mClearButtonParent.addView(mClearButton); isClearButtonAdded = true; } } else { mCompactClearButton.setVisibility(View.GONE); mClearButton.setVisibility(View.INVISIBLE); if (compactCarrier) { mClearButtonParent.removeView(mClearButton); isClearButtonAdded = false; } } mOngoingTitle.setVisibility(ongoing ? View.VISIBLE : View.GONE); Loading Loading
packages/SystemUI/res/layout/status_bar_expanded.xml +1 −28 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ android:layout_height="wrap_content" /> <LinearLayout android:id="@+id/carrier_label_layout" <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" Loading Loading @@ -127,36 +127,9 @@ android:layout_height="wrap_content" android:orientation="vertical" /> <TextView android:id="@+id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right|center_vertical" android:layout_marginTop="4dp" android:layout_marginBottom="1dp" android:text="@string/status_bar_clear_all_button" style="@style/StatusBar.ClearButton" android:paddingLeft="15dp" android:paddingRight="15dp" /> </com.android.systemui.statusbar.NotificationLinearLayout> </ScrollView> <LinearLayout android:id="@+id/compact_carrier_layout" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" > <com.android.systemui.statusbar.CarrierLabel android:gravity="bottom|right|center" android:textAppearance="@style/TextAppearance.StatusBar.Title" android:background="@android:color/transparent" android:layout_marginRight="6.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentRight="true" /> </LinearLayout> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" Loading
packages/SystemUI/res/layout/status_bar_expanded_compact_carrier.xml 0 → 100644 +135 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* apps/common/assets/default/default/skins/StatusBar.xml ** ** Copyright 2006, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <com.android.systemui.statusbar.ExpandedView xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants" > <LinearLayout android:id="@+id/power_and_carrier" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingTop="3dp" android:paddingBottom="5dp" android:paddingRight="3dp" android:background="@drawable/title_bar_portrait" > <com.android.systemui.statusbar.powerwidget.PowerWidget android:id="@+id/exp_power_stat" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" > <ScrollView android:id="@+id/scroll" android:layout_width="match_parent" android:layout_height="match_parent" android:fadingEdge="none" android:overScrollMode="ifContentScrolls" > <com.android.systemui.statusbar.NotificationLinearLayout android:id="@+id/notificationLinearLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:id="@+id/noNotificationsTitle" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/shade_header_background" android:paddingLeft="5dp" android:textAppearance="@style/TextAppearance.StatusBar.Title" android:text="@string/status_bar_no_notifications_title" /> <TextView android:id="@+id/ongoingTitle" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/shade_header_background" android:paddingLeft="5dp" android:textAppearance="@style/TextAppearance.StatusBar.Title" android:text="@string/status_bar_ongoing_events_title" /> <LinearLayout android:id="@+id/ongoingItems" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> <TextView android:id="@+id/latestTitle" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/shade_header_background" android:paddingLeft="5dp" android:textAppearance="@style/TextAppearance.StatusBar.Title" android:text="@string/status_bar_latest_events_title" /> <LinearLayout android:id="@+id/latestItems" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> <TextView android:id="@+id/clear_all_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right|center_vertical" android:layout_marginTop="4dp" android:layout_marginBottom="1dp" android:text="@string/status_bar_clear_all_button" style="@style/StatusBar.ClearButton" android:paddingLeft="15dp" android:paddingRight="15dp" /> </com.android.systemui.statusbar.NotificationLinearLayout> </ScrollView> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" > <com.android.systemui.statusbar.CarrierLabel android:gravity="bottom|right|center" android:textAppearance="@style/TextAppearance.StatusBar.Title" android:background="@android:color/transparent" android:layout_marginRight="6.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentRight="true" /> </LinearLayout> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" /> </FrameLayout> </com.android.systemui.statusbar.ExpandedView>
packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java +18 −47 Original line number Diff line number Diff line Loading @@ -136,7 +136,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks // top bar TextView mNoNotificationsTitle; TextView mClearButton; TextView mCompactClearButton; ViewGroup mClearButtonParent; CmBatteryMiniIcon mCmBatteryMiniIcon; // drag bar Loading Loading @@ -166,11 +165,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks // the power widget PowerWidget mPowerWidget; //Carrier label stuff LinearLayout mCarrierLabelLayout; LinearLayout mCompactCarrierLayout; LinearLayout mPowerAndCarrier; // ticker private Ticker mTicker; private View mTickerView; Loading Loading @@ -219,10 +213,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks Settings.System.getUriFor(Settings.System.SOFT_BUTTONS_LEFT), false, this); resolver.registerContentObserver( Settings.System.getUriFor(Settings.System.STATUS_BAR_DEAD_ZONE), false, this); resolver.registerContentObserver( Settings.System.getUriFor(Settings.System.STATUS_BAR_COMPACT_CARRIER), false, this); resolver.registerContentObserver( Settings.System.getUriFor(Settings.System.EXPANDED_VIEW_WIDGET), false, this); onChange(true); } Loading @@ -240,10 +230,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks defValue=(CmSystem.getDefaultBool(mContext, CmSystem.CM_DEFAULT_USE_DEAD_ZONE) ? 1 : 0); mDeadZone = (Settings.System.getInt(resolver, Settings.System.STATUS_BAR_DEAD_ZONE, defValue) == 1); mCompactCarrier = (Settings.System.getInt(resolver, Settings.System.STATUS_BAR_COMPACT_CARRIER, 0) == 1); updateLayout(); updateCarrierLabel(); } } Loading Loading @@ -355,7 +342,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks return null; } private boolean mCompactCarrier = false; private boolean compactCarrier = false; // ================================================================================ // Constructing the view Loading @@ -366,9 +353,11 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks mIconSize = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_icon_size); //Check for compact carrier layout and apply if enabled mCompactCarrier = Settings.System.getInt(getContentResolver(), compactCarrier = Settings.System.getInt(getContentResolver(), Settings.System.STATUS_BAR_COMPACT_CARRIER, 0) == 1; ExpandedView expanded = (ExpandedView)View.inflate(context, ExpandedView expanded = compactCarrier ? (ExpandedView)View.inflate(context, R.layout.status_bar_expanded_compact_carrier, null) : (ExpandedView)View.inflate(context, R.layout.status_bar_expanded, null); expanded.mService = this; Loading Loading @@ -400,9 +389,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks mNoNotificationsTitle = (TextView)expanded.findViewById(R.id.noNotificationsTitle); mClearButton = (TextView)expanded.findViewById(R.id.clear_all_button); mClearButton.setOnClickListener(mClearButtonListener); mCompactClearButton = (TextView)expanded.findViewById(R.id.compact_clear_all_button); mCompactClearButton.setOnClickListener(mClearButtonListener); mPowerAndCarrier = (LinearLayout)expanded.findViewById(R.id.power_and_carrier); mClearButtonParent = (ViewGroup)mClearButton.getParent(); mScrollView = (ScrollView)expanded.findViewById(R.id.scroll); mNotificationLinearLayout = expanded.findViewById(R.id.notificationLinearLayout); Loading @@ -427,9 +414,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks } }); mCarrierLabelLayout = (LinearLayout)expanded.findViewById(R.id.carrier_label_layout); mCompactCarrierLayout = (LinearLayout)expanded.findViewById(R.id.compact_carrier_layout); mTicker = new MyTicker(context, sb); TickerView tickerView = (TickerView)sb.findViewById(R.id.tickerText); Loading @@ -441,7 +425,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks mCloseView.mService = this; updateLayout(); updateCarrierLabel(); mContext=context; mEdgeBorder = res.getDimensionPixelSize(R.dimen.status_bar_edge_ignore); Loading @@ -451,20 +434,6 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks mDateView.setVisibility(View.INVISIBLE); } private void updateCarrierLabel() { if (mCompactCarrier) { mCarrierLabelLayout.setVisibility(View.GONE); mCompactCarrierLayout.setVisibility(View.VISIBLE); if (mLatest.hasClearableItems()) mCompactClearButton.setVisibility(View.VISIBLE); } else { mCarrierLabelLayout.setVisibility(View.VISIBLE); mCompactCarrierLayout.setVisibility(View.GONE); mCompactClearButton.setVisibility(View.GONE); } } private void updateLayout() { if(mTrackingView==null || mCloseView==null || mExpandedView==null) return; Loading @@ -484,13 +453,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks // readd in right order mExpandedView.addView(powerAndCarrier, mBottomBar ? 1 : 0); powerAndCarrier.addView(power, mBottomBar && !mCompactCarrier ? 1 : 0); //remove small ugly grey area if compactcarrier is enabled and power widget disabled boolean hideArea = mCompactCarrier && Settings.System.getInt(mContext.getContentResolver(), Settings.System.EXPANDED_VIEW_WIDGET, 1) == 0; mPowerAndCarrier.setVisibility(hideArea ? View.GONE : View.VISIBLE); powerAndCarrier.addView(power, mBottomBar && !compactCarrier ? 1 : 0); } protected void addStatusBarView() { Loading Loading @@ -778,17 +741,25 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks return entry.notification; } private boolean isClearButtonAdded = false; private void setAreThereNotifications() { boolean ongoing = mOngoing.hasVisibleItems(); boolean latest = mLatest.hasVisibleItems(); // (no ongoing notifications are clearable) if (mLatest.hasClearableItems()) { if (mCompactCarrier) mCompactClearButton.setVisibility(View.VISIBLE); mClearButton.setVisibility(View.VISIBLE); if (compactCarrier && !isClearButtonAdded) { mClearButtonParent.addView(mClearButton); isClearButtonAdded = true; } } else { mCompactClearButton.setVisibility(View.GONE); mClearButton.setVisibility(View.INVISIBLE); if (compactCarrier) { mClearButtonParent.removeView(mClearButton); isClearButtonAdded = false; } } mOngoingTitle.setVisibility(ongoing ? View.VISIBLE : View.GONE); Loading