2018-10-25 16:44:36 +02:00
/ * *
* ProjectLaogai
*
2019-01-03 13:46:09 +01:00
* Copyright 2019 < seil0 @mosad . xyz >
2018-10-25 16:44:36 +02:00
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston ,
* MA 02110 - 1301 , USA .
*
* /
2018-10-29 13:04:20 +01:00
package org.mosad.seil0.projectlaogai.uicomponents
2018-10-24 18:22:05 +02:00
import android.content.Context
2018-10-25 16:44:36 +02:00
import android.graphics.Color
2018-10-24 18:22:05 +02:00
import android.util.AttributeSet
2019-03-03 20:46:51 +01:00
import android.widget.LinearLayout
2018-10-25 16:44:36 +02:00
import android.widget.TextView
2018-10-27 14:11:47 +02:00
import org.mosad.seil0.projectlaogai.R
2018-10-25 16:44:36 +02:00
2018-10-26 00:50:37 +02:00
class LessonCardView @JvmOverloads constructor ( context : Context , attrs : AttributeSet ? = null ) : androidx . cardview . widget . CardView ( context , attrs ) {
2018-10-25 16:44:36 +02:00
2019-03-03 20:46:51 +01:00
private var linLayoutLesson : LinearLayout
2018-10-25 16:44:36 +02:00
private var txtViewTime : TextView
2018-10-24 18:22:05 +02:00
init {
2018-10-25 16:44:36 +02:00
inflate ( context , R . layout . lesson _cardview , this )
2019-03-03 20:46:51 +01:00
linLayoutLesson = findViewById ( R . id . linLayout _Lesson )
2018-10-25 16:44:36 +02:00
txtViewTime = findViewById ( R . id . txtView _Time )
// workaround to prevent a white border
2018-11-18 19:46:21 +01:00
this . setBackgroundColor ( Color . TRANSPARENT )
2018-10-25 16:44:36 +02:00
}
2019-03-03 20:46:51 +01:00
fun getLinLayoutLesson ( ) : LinearLayout {
return linLayoutLesson
2018-10-25 16:44:36 +02:00
}
2018-10-24 18:22:05 +02:00
2018-10-25 16:44:36 +02:00
fun getTxtViewTime ( ) : TextView {
return txtViewTime
2018-10-24 18:22:05 +02:00
}
}