This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyAdapter<T>(var layoutId:Int, var data:List<T>) : MyBaseAdapter(){ | |
var commonLayoutBRVariable=BR.adapterData | |
private var onItemClickListener:OnItemClickListener<T>?=null | |
fun setOnItemClickListener(onItemClickListener:OnItemClickListener<T>?){ | |
this.onItemClickListener=onItemClickListener | |
} | |
fun setLayoutBrVariable(varName:Int){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WebView( | |
initialUrl: "https://github.com/login", | |
onWebViewCreated: (controller) { | |
_myController = controller; | |
}, | |
onPageFinished: (url) { | |
_myController.evaluateJavascript( | |
"document.getElementsByName('commit')[0].addEventListener('click',function(){ try { showResult.postMessage(document.getElementById('login_field').value); } catch (err) {} });"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.graphics.drawable.GradientDrawable | |
import java.lang.IllegalArgumentException | |
/** | |
* Created by saravanan on 21/02/19. | |
*/ | |
object GradientUtils{ | |
enum class GradientDegree{ | |
/** draw the gradient from the top-left to the bottom-right */ |