31 lines
898 B
Kotlin
31 lines
898 B
Kotlin
package ord.mosad.seil0.projectlaogai.uicomponents
|
|
|
|
import android.content.Context
|
|
import android.graphics.Color
|
|
import android.util.AttributeSet
|
|
import android.widget.TextView
|
|
import org.mosad.seil0.projectlaogai.R
|
|
|
|
class MenuCardView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : androidx.cardview.widget.CardView(context, attrs){
|
|
|
|
private var txtViewMenuHeading: TextView
|
|
private var txtViewMenu: TextView
|
|
|
|
init {
|
|
inflate(context, R.layout.menu_cardview,this)
|
|
|
|
txtViewMenuHeading = findViewById(R.id.txtView_MenuHeading)
|
|
txtViewMenu = findViewById(R.id.txtView_Menu)
|
|
|
|
// workaround to prevent a white border
|
|
this.setBackgroundColor(Color.TRANSPARENT)
|
|
}
|
|
|
|
fun getTxtViewMenuHeading(): TextView {
|
|
return txtViewMenuHeading
|
|
}
|
|
|
|
fun getTxtViewMenu(): TextView {
|
|
return txtViewMenu
|
|
}
|
|
} |