chore: Fix compilation warning

This commit is contained in:
LisoUseInAIKyrios
2025-11-08 10:08:25 +02:00
parent f177eae385
commit c6364f5b49

View File

@@ -438,9 +438,11 @@ public class FeatureFlagsManagerPreference extends Preference {
button.setImageResource(drawableResId);
button.setScaleType(ImageView.ScaleType.CENTER);
int[] attrs = {android.R.attr.selectableItemBackgroundBorderless};
try (TypedArray ripple = context.obtainStyledAttributes(attrs)) {
button.setBackgroundDrawable(ripple.getDrawable(0));
}
//noinspection Recycle
TypedArray ripple = context.obtainStyledAttributes(attrs);
button.setBackgroundDrawable(ripple.getDrawable(0));
ripple.close();
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(Dim.dp32, Dim.dp32);
params.setMargins(Dim.dp8, Dim.dp8, Dim.dp8, Dim.dp8);
button.setLayoutParams(params);