TorryDo / Floating-Bubble-View

🍀an Android library that adds floating views on top of your screen🎨, supports both XML and Jetpack Compose
Apache License 2.0
204 stars 34 forks source link

Need to perform some action when view is expended. #52

Closed nicemak closed 1 year ago

nicemak commented 1 year ago

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

nicemak commented 1 year ago

@TorryDo

TorryDo commented 1 year ago

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 💖