Tapadoo / Alerter

An Android Alerting Library
MIT License
5.52k stars 633 forks source link

Question: In-line Buttons #258

Closed upseliseev closed 3 years ago

upseliseev commented 3 years ago

So far while using this, the buttons are always on the next line from the text. Is there a way for a single button to appear on the same line as the text, as per Android snackbar designs?

Designs linked here for convenience/reference

kpmmmurphy commented 3 years ago

Hey @upseliseev, you could use a custom layout for this instead.

 Alerter.create(this@KotlinDemoActivity, R.layout.custom_layout)
        .also { alerter ->
            val tvCustomView = alerter.getLayoutContainer()?.tvCustomLayout
            tvCustomView?.setText(R.string.with_custom_layout)
        }
        .show()