신기성

putNoExtra Recommend Page proto

...@@ -76,6 +76,37 @@ class RecommendActivity : AppCompatActivity() { ...@@ -76,6 +76,37 @@ class RecommendActivity : AppCompatActivity() {
76 76
77 } else { 77 } else {
78 Toast.makeText(this, "putExtra value not found", Toast.LENGTH_SHORT).show() 78 Toast.makeText(this, "putExtra value not found", Toast.LENGTH_SHORT).show()
79 +
80 + recomdatabase.orderByChild("Policy").startAt(intent.getStringExtra("\uf8ff")).addListenerForSingleValueEvent(object :
81 + ValueEventListener {
82 + override fun onCancelled(p0: DatabaseError) {
83 + Toast.makeText(this@RecommendActivity, "실패부분", Toast.LENGTH_SHORT).show()
84 + }
85 + override fun onDataChange(dataSnapshot: DataSnapshot) {
86 + for (memoSnapshot in dataSnapshot.children){
87 + val memo = memoSnapshot.getValue(MemoItemRecom::class.java)
88 +
89 + policyList.add(
90 + PolicyItem(
91 + ContextCompat.getDrawable(this@RecommendActivity, R.drawable.image01)!!,
92 + memo!!.Policy,
93 + memo!!.Policy,
94 + memo!!.Policy,
95 + 4.toFloat(),
96 + "0"
97 +
98 + )
99 + )
100 + }
101 +
102 + val adapter = PolicyAdapter(policyList)
103 + policyRecyclerView.adapter = adapter
104 +
105 + }
106 +
107 + })
108 +
109 +
79 } 110 }
80 111
81 112
......