I am using keyboardsurfer's crouton library as a replacement for toasts. I am curious if there is an easy way to spawn the crouton from the bottom
rather than the action bar
. I looked at Configuration
but didn't notice anything that would help me.
2 Answers
See: https://github.com/keyboardsurfer/Crouton/issues/84 which leads to https://github.com/keyboardsurfer/Crouton/pull/132 which leads to https://github.com/keyboardsurfer/Crouton/issues/169 :(
In short: not available yet but you'd simply need to take the proposed pull request and format it to the new Android Studio source tree structure.

- 28,208
- 16
- 81
- 124
-
I guess I could make an invisible `ViewGroup` that is floated to the bottom, and attach the `crouton` to that with `Crouton.makeText(Activity, int, Style, ViewGroup)`? – theblang Jul 28 '14 at 01:36
You can create an empty LinearView in your activity xml file and make it as a footer. Make sure to set it's visibility as gone. Something like below:
<LinearLayout
android:id="@+id/croutonview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="bottom" >
</LinearLayout>
Then call the crouton.makeText() with an extra parameter having this linearview's resource id. Something like this:
Crouton.makeText( this, "crouton message" de.keyboardsurfer.android.widget.crouton.Style.INFO,(ViewGroup)findViewById(R.id.croutonview)) .show();
Hope it helps!

- 72
- 4