Skip to content

Commit 3cbbaf2

Browse files
committed
Fix dependencies
1 parent 94e97e7 commit 3cbbaf2

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

sheetmenu/src/main/java/ru/whalemare/sheetmenu/SheetMenu.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ open class SheetMenu(
5151
dialog.show()
5252
}
5353

54-
open protected fun processGrid(root: View) {
55-
if (root.findViewById(R.id.text_title).visibility != View.VISIBLE) {
54+
protected open fun processGrid(root: View) {
55+
if (root.findViewById<View>(R.id.text_title).visibility != View.VISIBLE) {
5656
if (layoutManager is GridLayoutManager) {
5757
root.marginTop(24)
5858
}
5959
}
6060
}
6161

62-
open protected fun processTitle(textTitle: TextView) {
62+
protected open fun processTitle(textTitle: TextView) {
6363
if (titleId > 0) {
6464
textTitle.setText(titleId)
6565
textTitle.visibility = View.VISIBLE
@@ -71,7 +71,7 @@ open class SheetMenu(
7171
}
7272
}
7373

74-
open protected fun processRecycler(recycler: RecyclerView, dialog: BottomSheetDialog) {
74+
protected open fun processRecycler(recycler: RecyclerView, dialog: BottomSheetDialog) {
7575
if (menu > 0) {
7676
if (layoutManager == null) {
7777
layoutManager = LinearLayoutManager(recycler.context, LinearLayoutManager.VERTICAL, false)

sheetmenu/src/main/java/ru/whalemare/sheetmenu/extension/Extensions.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package ru.whalemare.sheetmenu.extension
22

3+
import android.annotation.SuppressLint
34
import android.content.Context
45
import android.support.annotation.MenuRes
56
import android.support.v7.view.SupportMenuInflater
@@ -17,10 +18,11 @@ import android.view.ViewGroup
1718
*/
1819
fun Menu.toList(): List<MenuItem> {
1920
val menuItems = ArrayList<MenuItem>(this.size())
20-
(0..this.size() - 1).mapTo(menuItems) { this.getItem(it) }
21+
(0 until this.size()).mapTo(menuItems) { this.getItem(it) }
2122
return menuItems
2223
}
2324

25+
@SuppressLint("RestrictedApi")
2426
fun Context.inflate(@MenuRes menuRes: Int): Menu {
2527
val menu = MenuBuilder(this)
2628
val menuInflater = SupportMenuInflater(this)

0 commit comments

Comments
 (0)