Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chooongg committed Jan 3, 2023
1 parent a150e2c commit c4e93da
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/main/java/com/chooongg/core/ext/TabLayoutExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,12 @@ open class BaseText {
}
}


@Deprecated("deprecated", ReplaceWith("inflateMenu(resId)"))
fun TabLayout.setMenu(@MenuRes resId: Int) = inflateMenu(resId)

@SuppressLint("RestrictedApi")
fun TabLayout.setMenu(@MenuRes resId: Int) {
fun TabLayout.inflateMenu(@MenuRes resId: Int) {
removeAllTabs()
val builder = MenuBuilder(context)
MenuInflater(context).inflate(resId, builder)
Expand Down

0 comments on commit c4e93da

Please sign in to comment.