Merge "Accessibility shortcut secondary action - auto hide divider in shortcutPreference"

This commit is contained in:
Jason Hsu
2020-01-02 07:15:55 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 1 deletions

View File

@@ -87,6 +87,7 @@
</LinearLayout>
<View
android:id="@+id/divider"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginTop="16dp"

View File

@@ -73,9 +73,11 @@ public class ShortcutPreference extends Preference {
}
final View settings = holder.itemView.findViewById(android.R.id.widget_frame);
if (settings != null) {
final View divider = holder.itemView.findViewById(R.id.divider);
if (settings != null && divider != null) {
settings.setOnClickListener(view -> callOnSettingsClicked());
settings.setVisibility(mSettingsVisibility);
divider.setVisibility(mSettingsVisibility);
}
}