TorryDo / Floating-Bubble-View

🍀an Android library that adds floating views on top of your screen🎨, supports both XML and Jetpack Compose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need to perform some action when view is expended.

nicemak opened this issue · comments

Describe your suggested feature

Thank you for the great library, i am developing an application which needs to perform some function without user action and set to textview, which is inside the layout expandedView = LayoutInflater.from(this).inflate(R.layout.results, null). when expended view is visible this function will execute and perform some task. how to achieve this?

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have updated the library to the latest Version.
  • I will fill out all of the requested information in this form.

Hi @nicemak 👋. Sorry for the late reply,
If I understand your question correctly, you want to execute some functions after the expanded-view is visible then set the TextView right?

If so, after you call expand() function to show the expanded-view, you can find the id of the TextView and set the text directly

val textView = expandedView.findViewById(R.id.yourTextViewId)
textView.text = "hello world"

If you have any furthur concern, feel free to re-open the issue, thank you 💖