[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

sample[jx8-android] Snackbar


SwikiCodeRobot @> #sampleJx8AndroidSnackbar

"Show a snackbar label with ok button"
| view listener |
view := MainActivity singleton window decorView rootView.
listener := Java
		newProxy: 'android.view.View$OnClickListener'
		functions: #onClick -> [:view |
			[ self alert: #ok ] valueDeferred.
			nil
	].
(Snackbar make: view
	text: 'text to display'
	duration: Snackbar lengthIndefinite)
	setAction: '--ok--' listener: listener;
	show