Skip to content

Commit

Permalink
Hasil Intent Penyakit CBR
Browse files Browse the repository at this point in the history
  • Loading branch information
alamasrorul committed Nov 21, 2019
2 parents b041543 + 6ff61c7 commit 8e87280
Show file tree
Hide file tree
Showing 9 changed files with 299 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class DiagnosisActivity : AppCompatActivity(), DiagnosisContract.View {
private lateinit var rvGejala: RecyclerView
private lateinit var adapter: DiagnosisAdapter
private lateinit var textNamaBurung: EditText

private lateinit var btnDiagnosis: FloatingActionButton

override fun onLoadListGejalaSucceed(listGejala: List<Gejala>) {
Expand All @@ -37,18 +38,27 @@ class DiagnosisActivity : AppCompatActivity(), DiagnosisContract.View {

btnDiagnosis = findViewById(R.id.button_diagnosis)

textNamaBurung = findViewById(R.id.edit_nama_burung) as EditText

// val penyakitBurung = intent.getStringExtra("penyakit")
// val cbr = intent.getStringExtra("persentaseCBR")

btnDiagnosis.setOnClickListener {
val intent = Intent(this, HasilActivity::class.java)
intent.putExtra("namaburung", textNamaBurung.toString())
startActivity(intent)
intent.putExtra("namaBurung", textNamaBurung.text.toString())
// intent.putExtra("penyakit", penyakitBurung)
// intent.putExtra("persentaseCBR", cbr )
// startActivity(intent)
//print(textNamaBurung.text)
print(textNamaBurung.text)
adapter.cbr()
}

bindView()
}

private fun bindView() {
textNamaBurung = findViewById(R.id.edit_nama_burung)


rvGejala = findViewById(R.id.rv_gejala)
rvGejala.layoutManager = LinearLayoutManager(this)
Expand Down
Loading

0 comments on commit 8e87280

Please sign in to comment.