This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//.. | |
import com.google.android.material.snackbar.BaseTransientBottomBar | |
class CustomSnackbar private constructor( | |
parent: ViewGroup, content: View, | |
callback: com.google.android.material.snackbar.ContentViewCallback | |
) : BaseTransientBottomBar<CustomSnackbar>(parent, content, callback) { | |
fun setText(text: CharSequence): CustomSnackbar { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Use [enable]/[disable] to register/unregister [ConnectivityManager] | |
* @property context | |
* @property onNetworkAvailableCallbacks callback to notify [context] about network status changes | |
*/ | |
@RequiresApi(Build.VERSION_CODES.LOLLIPOP) | |
class ConnectionStateMonitor( | |
private val context: Context, | |
private val onNetworkAvailableCallbacks: OnNetworkAvailableCallbacks | |
) : ConnectivityManager.NetworkCallback() { |
NewerOlder