Skip to content

Commit 1876bc5

Browse files
jonsharkeydsn5ft
authored andcommitted
@hide shouldInflateAppCompatButton, and restrict use to our library.
PiperOrigin-RevId: 260224154
1 parent cb2ba97 commit 1876bc5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/java/com/google/android/material/theme/MaterialComponentsViewInflater.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616

1717
package com.google.android.material.theme;
1818

19+
import static androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP;
20+
1921
import android.content.Context;
2022
import android.os.Build.VERSION;
2123
import android.os.Build.VERSION_CODES;
2224
import androidx.annotation.Keep;
2325
import androidx.annotation.NonNull;
26+
import androidx.annotation.RestrictTo;
2427
import com.google.android.material.button.MaterialButton;
2528
import androidx.appcompat.app.AppCompatViewInflater;
2629
import androidx.appcompat.widget.AppCompatButton;
@@ -54,6 +57,8 @@ protected AppCompatButton createButton(Context context, AttributeSet attrs) {
5457
return new MaterialButton(context, attrs);
5558
}
5659

60+
/** @hide */
61+
@RestrictTo(LIBRARY_GROUP)
5762
protected boolean shouldInflateAppCompatButton(Context context, AttributeSet attrs) {
5863
// Workaround for FloatingToolbar inflating floating_popup_menu_button.xml on API 23-25, which
5964
// should not have MaterialButton styling.

0 commit comments

Comments
 (0)