Skip to content

Commit 35623b4

Browse files
authored
Merge pull request #10 from ENTS-H104/daffa/dev
finishing app
2 parents b66e5ed + ec860b5 commit 35623b4

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed
-7 Bytes
Binary file not shown.
-11 Bytes
Binary file not shown.

app/release/highking_v1.0_beta.apk

144 Bytes
Binary file not shown.

app/src/main/java/com/entsh104/highking/ui/cust/detailTrip/DetailTripFragment.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.entsh104.highking.ui.cust.detailTrip
33
import UserRepository
44
import android.content.Intent
55
import android.os.Bundle
6+
import android.util.Log
67
import android.view.LayoutInflater
78
import android.view.View
89
import android.view.ViewGroup
@@ -225,6 +226,7 @@ class DetailTripFragment : Fragment() {
225226
val faqLayout = binding.llFaq
226227
trip.faq_data?.forEach { faq ->
227228
val faqView = layoutInflater.inflate(R.layout.item_dropdown, faqLayout, false)
229+
Log.d("FAQ", faq.description)
228230
val splitDescription = faq.description.split("Question:", "Answer:")
229231
if (splitDescription.size >= 3) {
230232
val question = splitDescription[1].trim()
@@ -233,15 +235,15 @@ class DetailTripFragment : Fragment() {
233235
faqView.findViewById<TextView>(R.id.tv_dropdown_description).text = answer
234236
}
235237
val dropdownItem = faqView.findViewById<LinearLayout>(R.id.ll_item_dropdown)
236-
val toggleArrow = faqView.findViewById<ImageView>(R.drawable.ic_arrow_down)
237-
val rundownContent = faqView.findViewById<LinearLayout>(R.id.ll_dropdown_content)
238+
val toggleArrow = faqView.findViewById<ImageView>(R.id.iv_expand_dropdown)
239+
val faqContent = faqView.findViewById<LinearLayout>(R.id.ll_dropdown_content)
238240

239241
dropdownItem.setOnClickListener {
240-
if (rundownContent.visibility == View.GONE) {
241-
rundownContent.visibility = View.VISIBLE
242+
if (faqContent.visibility == View.GONE) {
243+
faqContent.visibility = View.VISIBLE
242244
toggleArrow.setImageResource(R.drawable.ic_arrow_up)
243245
} else {
244-
rundownContent.visibility = View.GONE
246+
faqContent.visibility = View.GONE
245247
toggleArrow.setImageResource(R.drawable.ic_arrow_down)
246248
}
247249
}

0 commit comments

Comments
 (0)