Add state_pressed to keyguard user switcher item.
This means that we will see the ripple effect when clicking user switcher items that don't take on the "activated" state. Bug: 150682160 Test: Manual Change-Id: I397c0177ddaaa46eaad6dfa5c9af27b96d3e0bf8
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_activated="true" android:color="@color/kg_user_switcher_activated_background_color" />
|
||||
<item android:state_activated="true" android_state_enabled="true" android:color="@color/kg_user_switcher_activated_background_color" />
|
||||
<item android:state_pressed="true" android:state_enabled="true" android:color="@color/kg_user_switcher_activated_background_color" />
|
||||
<item android:color="@android:color/transparent" />
|
||||
</selector>
|
||||
</selector>
|
||||
|
||||
@@ -106,6 +106,7 @@ public class UserDetailItemView extends LinearLayout {
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
super.setEnabled(enabled);
|
||||
mName.setEnabled(enabled);
|
||||
mAvatar.setEnabled(enabled);
|
||||
}
|
||||
|
||||
@@ -298,6 +298,7 @@ public class KeyguardUserSwitcher {
|
||||
convertView.setAlpha(
|
||||
item.isCurrent || item.isSwitchToEnabled ? USER_SWITCH_ENABLED_ALPHA
|
||||
: USER_SWITCH_DISABLED_ALPHA);
|
||||
convertView.setEnabled(item.isSwitchToEnabled);
|
||||
return convertView;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user