Advertisement
Guest User

Kotlin

a guest
Nov 20th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.88 KB | None | 0 0
  1.     if (parts.size > 1 && data.containsKey(parts[1])){
  2.                         Log.d("Key", parts[1])
  3.                         if (lastExpandedGroup >= 0) {
  4.                             expandableListView.collapseGroup(lastExpandedGroup)
  5.                         }
  6.  
  7.                         expandableListView.expandGroup(titleList.indexOf(parts[1]))
  8.                         expandableListView.setSelectedGroup(titleList.indexOf(parts[1]))
  9.                         lastExpandedGroup = titleList.indexOf(parts[1])
  10.  
  11.                         val listInData = data[parts[1]]
  12.                         if(parts.size > 2 && listInData!!.contains(parts[2])){
  13.                             Log.d("Value",parts[2])
  14.                             expandableListView.setSelectedChild(titleList.indexOf(parts[1]),listData.get(parts[1])!!.indexOf(parts[2]),true)
  15.                         }
  16.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement