SystemUI 下拉栏快捷键隐藏(一)

阅读更多

  SystemUI模块中的下拉栏右上方拥有设置、用户、编辑等控制图标,以下为对此类控件的隐藏操作。

frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
old mode 100644
new mode 100755
index cbef76cb68..7be3784a41
@@ -111,8 +111,8 @@ public class QuickStatusBarHeader extends BaseStatusBarHeader implements
         mEmergencyOnly = (TextView) findViewById(R.id.header_emergency_calls_only);
         mEdit = findViewById(android.R.id.edit);
-        findViewById(android.R.id.edit).setOnClickListener(view ->
-                mHost.startRunnableDismissingKeyguard(() -> mQsPanel.showEdit(view)));
+        //findViewById(android.R.id.edit).setOnClickListener(view ->
+        //        mHost.startRunnableDismissingKeyguard(() -> mQsPanel.showEdit(view)));
         mDateTimeAlarmGroup = (ViewGroup) findViewById(R.id.date_time_alarm_group);
         mDateTimeAlarmGroup.findViewById(R.id.empty_time_view).setVisibility(View.GONE);
@@ -123,6 +123,7 @@ public class QuickStatusBarHeader extends BaseStatusBarHeader implements
         mShowFullAlarm = getResources().getBoolean(R.bool.quick_settings_show_full_alarm);
         mExpandIndicator = (ExpandableIndicator) findViewById(R.id.expand_indicator);
+        mExpandIndicator.setVisibility(View.INVISIBLE);
         mHeaderQsPanel = (QuickQSPanel) findViewById(R.id.quick_qs_panel);
@@ -141,6 +142,15 @@ public class QuickStatusBarHeader extends BaseStatusBarHeader implements
         // settings), so disable it for this view
         ((RippleDrawable) mSettingsButton.getBackground()).setForceSoftware(true);
         ((RippleDrawable) mExpandIndicator.getBackground()).setForceSoftware(true);
+       
+        //add by Ginger for remove qs icon
+        mEdit.setVisibility(View.INVISIBLE);
+        mHeaderQsPanel.setVisibility(View.INVISIBLE);
+        mSettingsButton.setVisibility(View.INVISIBLE);
+        mExpandIndicator.setVisibility(View.INVISIBLE);
+        mMultiUserAvatar.setVisibility(View.INVISIBLE);
+        mMultiUserSwitch.setVisibility(View.INVISIBLE);
+        //end of Ginger
         updateResources();
     }
@@ -273,6 +283,7 @@ public class QuickStatusBarHeader extends BaseStatusBarHeader implements
     protected void updateVisibilities() {
         updateAlarmVisibilities();
         updateDateTimePosition();
+        /*
         mEmergencyOnly.setVisibility(mExpanded && (mShowEmergencyCallsOnly || mIsRoaming)
                 ? View.VISIBLE : View.INVISIBLE);
         mSettingsContainer.findViewById(R.id.tuner_icon).setVisibility(
@@ -281,6 +292,7 @@ public class QuickStatusBarHeader extends BaseStatusBarHeader implements
         mMultiUserSwitch.setVisibility(mExpanded && mMultiUserSwitch.hasMultipleUsers() && !isDemo
                 ? View.VISIBLE : View.INVISIBLE);
         mEdit.setVisibility(isDemo || !mExpanded ? View.INVISIBLE : View.VISIBLE);
+        */
     }
     private void updateDateTimePosition() {

你可能感兴趣的:(android)