신기성

putNoExtra Recommend Page proto

......@@ -76,6 +76,37 @@ class RecommendActivity : AppCompatActivity() {
} else {
Toast.makeText(this, "putExtra value not found", Toast.LENGTH_SHORT).show()
recomdatabase.orderByChild("Policy").startAt(intent.getStringExtra("\uf8ff")).addListenerForSingleValueEvent(object :
ValueEventListener {
override fun onCancelled(p0: DatabaseError) {
Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show()
}
override fun onDataChange(dataSnapshot: DataSnapshot) {
for (memoSnapshot in dataSnapshot.children){
val memo = memoSnapshot.getValue(MemoItemRecom::class.java)
policyList.add(
PolicyItem(
ContextCompat.getDrawable(this@RecommendActivity, R.drawable.image01)!!,
memo!!.Policy,
memo!!.Policy,
memo!!.Policy,
4.toFloat(),
"0"
)
)
}
val adapter = PolicyAdapter(policyList)
policyRecyclerView.adapter = adapter
}
})
}
......