-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee8edc2
commit 8d97539
Showing
16 changed files
with
259 additions
and
323 deletions.
There are no files selected for viewing
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
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
186 changes: 100 additions & 86 deletions
186
app/src/main/java/com/makaryostudio/lovebird/feature/diagnosis/DiagnosisAdapter.kt
Large diffs are not rendered by default.
Oops, something went wrong.
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
15 changes: 2 additions & 13 deletions
15
app/src/main/java/com/makaryostudio/lovebird/feature/diagnosis/DiagnosisPresenter.kt
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
47 changes: 18 additions & 29 deletions
47
app/src/main/java/com/makaryostudio/lovebird/feature/hasil/HasilActivity.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,49 @@ | ||
package com.makaryostudio.lovebird.feature.hasil | ||
|
||
import androidx.appcompat.app.AppCompatActivity | ||
import android.os.Bundle | ||
import android.widget.EditText | ||
|
||
import android.widget.TextView | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.recyclerview.widget.LinearLayoutManager | ||
import androidx.recyclerview.widget.RecyclerView | ||
|
||
import com.makaryostudio.lovebird.R | ||
import com.makaryostudio.lovebird.repository.model.Gejala | ||
import com.makaryostudio.lovebird.repository.model.Penyakit | ||
|
||
import com.makaryostudio.lovebird.model.Gejala | ||
|
||
class HasilActivity : AppCompatActivity() { | ||
|
||
private lateinit var textNamaBurung: TextView | ||
|
||
private lateinit var adapter: RecyclerView | ||
private lateinit var rvGejalaDialami: RecyclerView | ||
private lateinit var adapter: HasilAdapter | ||
private lateinit var textHasilDiagnosis: TextView | ||
private lateinit var textSolusi: TextView | ||
private lateinit var textPencegahan: TextView | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_hasil) | ||
println("a") | ||
//textNamaBurung = findViewById(R.id.text_nama_burung) | ||
|
||
textHasilDiagnosis = findViewById(R.id.text_hasil_diagnosis) | ||
textSolusi = findViewById(R.id.text_deskripsi_solusi) | ||
textPencegahan=findViewById(R.id.text_pencegahan) | ||
textSolusi = findViewById(R.id.text_solusi) | ||
textPencegahan = findViewById(R.id.title_pencegahan) | ||
|
||
val gejala = intent.getParcelableExtra<Gejala>("gejala") | ||
val checked = intent.getBooleanArrayExtra("checked") | ||
//val namaBurung = intent.getStringExtra("namaBurung") | ||
val checked = intent.getParcelableExtra<Gejala>("checked") | ||
val penyakitBurung = intent.getStringExtra("penyakit") | ||
val solusi = intent.getStringExtra("solusi") | ||
val pencegahan = intent.getStringExtra("pencegahan") | ||
val cbr = intent.getStringExtra("persentaseCBR") | ||
// textNamaBurung = findViewById(R.id.namaBurung) | ||
|
||
//textNamaBurung.text = "Penyakit Burung: $penyakitBurung" | ||
textHasilDiagnosis.text = penyakitBurung | ||
textSolusi.text=solusi | ||
textPencegahan.text=pencegahan | ||
|
||
val mListData: ArrayList<Gejala> = arrayListOf(checked) | ||
|
||
adapter.loadListData(mListData) | ||
|
||
//textSolusi.text = cbr | ||
textHasilDiagnosis.text = penyakitBurung!!.toString() | ||
textSolusi.text = solusi | ||
textPencegahan.text = pencegahan | ||
|
||
bindView() | ||
} | ||
|
||
private fun bindView() { | ||
|
||
adapter = findViewById(R.id.rv_gejala_dialami) | ||
|
||
rvGejalaDialami = findViewById(R.id.rv_gejala_dialami) | ||
rvGejalaDialami.layoutManager = LinearLayoutManager(this) | ||
adapter = HasilAdapter() | ||
rvGejalaDialami.adapter = adapter | ||
|
||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...tudio/lovebird/repository/model/Gejala.kt → ...om/makaryostudio/lovebird/model/Gejala.kt
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
4 changes: 0 additions & 4 deletions
4
app/src/main/java/com/makaryostudio/lovebird/repository/DatabaseHelper.kt
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
app/src/main/java/com/makaryostudio/lovebird/repository/model/Penyakit.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.