PDDStudio / highlightjs-android

A view for source code syntax highlighting on Android
309 stars 50 forks source link

Detect when the code loads #7

Closed kal27 closed 7 years ago

kal27 commented 7 years ago

How could I detect whether the code was loaded? I am trying to open large files and it takes couple seconds to load the code and display it in the layout. Is there a way I could detect when the code has been displayed so I can display/hide a progressbar?

Thanks

PDDStudio commented 7 years ago

@kal27 you can attach an OnContentChangedListener to your HighlightJsView via setOnContentChangedListener()

The Listener gets called once the new data is loaded and rendered completely.