Composer, Now playing preview, Full screen theme
This commit is contained in:
parent
c179d8772d
commit
e9309ebdd3
76 changed files with 718 additions and 373 deletions
|
@ -0,0 +1,22 @@
|
|||
package code.name.monkey.retromusic.extensions
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.annotation.LayoutRes
|
||||
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun <T : View> ViewGroup.inflate(@LayoutRes layout: Int): T {
|
||||
return LayoutInflater.from(context).inflate(layout, this, false) as T
|
||||
}
|
||||
|
||||
fun View.show() {
|
||||
visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
fun View.hide() {
|
||||
visibility = View.GONE
|
||||
}
|
||||
|
||||
fun View.showOrHide(show: Boolean) = if (show) show() else hide()
|
Loading…
Add table
Add a link
Reference in a new issue