@@ -3,6 +3,7 @@ package com.entsh104.highking.ui.cust.detailTrip
33import UserRepository
44import android.content.Intent
55import android.os.Bundle
6+ import android.util.Log
67import android.view.LayoutInflater
78import android.view.View
89import 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