Closed abiemann closed 7 years ago
Regarding the snackbar, you can call something like this:
Snackbar.make(((ExampleMaterialAboutActivity) c).findViewById(android.R.id.content), "Test", Snackbar.LENGTH_SHORT).show();
However, the MaterialAboutActivity
is not based on a CoordinatorLayout
which means that interaction with the Snackbar (swipe to dismiss) won't work. It would certainly be possible to stick the fragment in an activity that does have a CoordinatorLayout
if you need that functionality.
Dynamically changing the UI is certainly something I will look to implement for a later release (won't be long but I don't really want to constantly create releases unless there are big changes). How urgent is this functionality for your app?
Hi Daniel - thanks for the fast response.
To get the screen to update, as an immediate measure, I am redrawing the entire Activity with recreate()
.
It's not elegant, but the reason for the UI update should be rare (to make a donation and trigger an IAP) - I hope not too rare 👍
Just developed support for updating the UI - check out the demo application's source code. You can either use the latest commit or wait for a new release which may be soon.
How does one use the Snackbar in the MaterialAboutActivity?Also, after getMaterialAboutList() is come and gone, how could I update a .text() field that was generated by a MaterialAboutActionItem.Builder() ?
Thanks !