Loading res/layout/preference_widget_edit.xml +3 −10 Original line number Diff line number Diff line Loading @@ -16,20 +16,13 @@ --> <!-- Edit button --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/edit_button_layout" android:layout_width="52dp" android:layout_height="wrap_content" android:gravity="center" android:layout_gravity="end"> <ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/edit_button" android:layout_width="24dp" android:layout_height="24dp" android:gravity="center_vertical" android:background="?android:attr/selectableItemBackground" android:layout_gravity="center" android:src="@drawable/ic_edit_24dp" android:contentDescription="@string/edit" /> No newline at end of file </LinearLayout> No newline at end of file src/com/android/settings/applications/credentials/PrimaryProviderPreference.java +2 −5 Original line number Diff line number Diff line Loading @@ -30,12 +30,13 @@ import androidx.preference.PreferenceViewHolder; import com.android.internal.annotations.VisibleForTesting; import com.android.settings.R; import com.android.settingslib.PrimarySwitchPreference; import com.android.settingslib.RestrictedPreference; /** * This preference is shown at the top of the "passwords & accounts" screen and allows the user to * pick their primary credential manager provider. */ public class PrimaryProviderPreference extends PrimarySwitchPreference { public class PrimaryProviderPreference extends RestrictedPreference { public static boolean shouldUseNewSettingsUi() { return Flags.isCredmanSettingsExpressiveDesign(); Loading @@ -44,7 +45,6 @@ public class PrimaryProviderPreference extends PrimarySwitchPreference { private @Nullable Button mChangeButton = null; private @Nullable Button mOpenButton = null; private @Nullable View mButtonFrameView = null; private @Nullable View mEditView = null; private @Nullable Delegate mDelegate = null; private boolean mButtonsCompactMode = false; private boolean mOpenButtonVisible = false; Loading Loading @@ -103,10 +103,7 @@ public class PrimaryProviderPreference extends PrimarySwitchPreference { } }); // Set up the edit icon to handle opening the change provider scenario. mEditView = holder.findViewById(R.id.edit_button); View mWidgetFrame = holder.findViewById(android.R.id.widget_frame); mEditView.setVisibility(View.VISIBLE); mWidgetFrame.setOnClickListener( new View.OnClickListener() { public void onClick(@NonNull View v) { Loading Loading
res/layout/preference_widget_edit.xml +3 −10 Original line number Diff line number Diff line Loading @@ -16,20 +16,13 @@ --> <!-- Edit button --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/edit_button_layout" android:layout_width="52dp" android:layout_height="wrap_content" android:gravity="center" android:layout_gravity="end"> <ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/edit_button" android:layout_width="24dp" android:layout_height="24dp" android:gravity="center_vertical" android:background="?android:attr/selectableItemBackground" android:layout_gravity="center" android:src="@drawable/ic_edit_24dp" android:contentDescription="@string/edit" /> No newline at end of file </LinearLayout> No newline at end of file
src/com/android/settings/applications/credentials/PrimaryProviderPreference.java +2 −5 Original line number Diff line number Diff line Loading @@ -30,12 +30,13 @@ import androidx.preference.PreferenceViewHolder; import com.android.internal.annotations.VisibleForTesting; import com.android.settings.R; import com.android.settingslib.PrimarySwitchPreference; import com.android.settingslib.RestrictedPreference; /** * This preference is shown at the top of the "passwords & accounts" screen and allows the user to * pick their primary credential manager provider. */ public class PrimaryProviderPreference extends PrimarySwitchPreference { public class PrimaryProviderPreference extends RestrictedPreference { public static boolean shouldUseNewSettingsUi() { return Flags.isCredmanSettingsExpressiveDesign(); Loading @@ -44,7 +45,6 @@ public class PrimaryProviderPreference extends PrimarySwitchPreference { private @Nullable Button mChangeButton = null; private @Nullable Button mOpenButton = null; private @Nullable View mButtonFrameView = null; private @Nullable View mEditView = null; private @Nullable Delegate mDelegate = null; private boolean mButtonsCompactMode = false; private boolean mOpenButtonVisible = false; Loading Loading @@ -103,10 +103,7 @@ public class PrimaryProviderPreference extends PrimarySwitchPreference { } }); // Set up the edit icon to handle opening the change provider scenario. mEditView = holder.findViewById(R.id.edit_button); View mWidgetFrame = holder.findViewById(android.R.id.widget_frame); mEditView.setVisibility(View.VISIBLE); mWidgetFrame.setOnClickListener( new View.OnClickListener() { public void onClick(@NonNull View v) { Loading