class FileHolder(itemView: View) : RecyclerView.ViewHolder(itemView){
private val txtFileName = itemView.findViewById<TextView>(R.id.txtFile)
fun bind(file: File) {
txtFileName.text = file.filename
txtFileName.setOnClickListener{ toast("Hello") }
}
}
val btn1 = itemView.findViewById(R.id.btn1)
btn1.setOnClickListener {
}
val btn2 = itemView.findViewById(R.id.btn2)
btn1.setOnClickListener {
}
val btn3 = itemView.findViewById(R.id.btn3)
btn1.setOnClickListener {
}
new Thread(new Runnable()) {
@Override
public void run() {
while (start_stop) {
my_text.setText(Integer.toString(counter));
counter++;
try {
Thread.sleep(1000); // sleep 1 sec
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
Intent secondActivityIntent = new Intent(MainActivity.this, SecondActivity.class);
secondActivityIntent.putExtra("key", "value");
startActivity(secondActivityIntent)
String value = getIntent().getStringExtra("key");