Answers for "snackbar android example"

1

Snackbar android example Kotlin

fun onSNACK(view: View){
    //Snackbar(view)
    val snackbar = Snackbar.make(view, "Replace with your own action",
            Snackbar.LENGTH_LONG).setAction("Action", null)
    snackbar.setActionTextColor(Color.BLUE)
    val snackbarView = snackbar.view
    snackbarView.setBackgroundColor(Color.LTGRAY)
    val textView =
            snackbarView.findViewById(com.google.android.material.R.id.snackbar_text) as TextView
    textView.setTextColor(Color.BLUE)
    textView.textSize = 28f
    snackbar.show()
}
Posted by: Guest on November-09-2021
6

android create snackbar

Snackbar.make(fragmentView, text, Snackbar.LENGTH_LONG).setAction("Action", null /* replace with your action or leave null to just display text*/).show();
Posted by: Guest on March-16-2020
1

snackbar android

Snackbar snackbar =  Snackbar.make(view, text, Snackbar.LENGTH_LONG);
                    snackbar.show();
Posted by: Guest on March-11-2021
0

android snackbar message is behind back button

FloatingActionButton fab = findViewById(R.id.fab);
Snackbar snackbar = Snackbar.make(view, "Snackbar over BottomAppBar", Snackbar.LENGTH_LONG);
snackbar.setAnchorView(fab);
Posted by: Guest on September-12-2020
0

using a SnackBar on androidstudio

dependencies {
    implementation 'com.android.support:design:27.1.1'
}
Posted by: Guest on August-31-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language