Composer, Now playing preview, Full screen theme

This commit is contained in:
h4h13 2019-02-26 22:18:11 +05:30
parent c179d8772d
commit e9309ebdd3
76 changed files with 718 additions and 373 deletions

View file

@ -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()