MessageBar alternatives and similar packages
Based on the "Toast Widget" category.
Alternatively, view MessageBar alternatives based on common mentions on social networks and blogs.
Toasty9.3 0.0 L5 MessageBar VS ToastyThe usual Toast, but with steroids 💪
Crouton8.9 0.0 L5 MessageBar VS CroutonContext sensitive notifications for Android
SuperToasts8.6 0.0 L3 MessageBar VS SuperToastsA library that extends the Android toast framework.
Android-AppMsg7.8 0.0 L3 MessageBar VS Android-AppMsgIn-layout notifications. Based on Toast notifications and article by Cyril Mottier (http://android.cyrilmottier.com/?p=773).
loadtoast7.5 0.0 L4 MessageBar VS loadtoastPretty material design toasts with feedback animations
Literally Toast3.4 0.0 MessageBar VS Literally Toast🍞 The missing toast library for Android.
Dynamic Toasts3.2 0.0 MessageBar VS Dynamic ToastsCustom toasts with color and icon on Android.
FloatingToast-AndroidAndroid library to create customizable floating animated toasts like in Clash Royale app
Toastie1.6 0.0 MessageBar VS ToastieToastie is a customizable Android toast library.
CoolToast1.4 0.0 MessageBar VS CoolToastA really simple library that help you to display a custom toast with many colors (for : success, warning, danger, info, dark, light, primary...etc ), or with rounded corners, or event with image.
Super Toast LibraryAndroid Custom Toast
RTL-Toast0.9 1.3 MessageBar VS RTL-ToastAndroid Toast For RTL Applications
ImageToast0.8 0.0 MessageBar VS ImageToastNo description or website provided.
FabToast0.7 0.0 MessageBar VS FabToastAttractive, stylish and customizable toast library for Android.
MukkiaSevaigal0.6 0.0 MessageBar VS MukkiaSevaigalAndroid library for commonly used functions
CustomToast0.4 0.0 MessageBar VS CustomToastAndroid Library to show Custom Toast message
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of MessageBar or a related project?
An Android Toast replacement, similar to the one seen in the GMail app. Multiple messages can be posted in succession, and each message will be shown for 5 seconds.
There's two ways to use the MessageBar. It can either be attached directly to an activity, or a View can be passed.
Attaching to an activity
This approach requires adding the following attributes to the Activity's theme.
<item name="messageBarContainerStyle">@style/MessageBar.Container</item> <item name="messageBarTextStyle">@style/MessageBar.Message</item> <item name="messageBarButtonStyle">@style/MessageBar.Button</item>
Attaching the MessageBar is then done by passing the Activity to the MessageBar constructor.
mMessageBar = new MessageBar(this);
This will automatically add a MessageBar layout to the content view.
Attaching to a View
This can be used e.g. when attaching to a Fragment, or if custom views are to be used for showing the message.
When using this approach, child views with the following id's must be added to the passed View.
mbContainer: The container that holds the message and the button views.
mbMessage: A TextView that displays the message.
mbButton: A TextView that displays the button text.
As an example, this is the default layout that's used when attaching to an Activity.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@id/mbContainer" style="?attr/messageBarContainerStyle"> <TextView android:id="@id/mbMessage" style="?attr/messageBarTextStyle" /> <TextView android:id="@id/mbButton" style="?attr/messageBarButtonStyle" /> </LinearLayout>
The MessageBar is then attached by passing a parent view to the constructor.
Showing a message
A message is shown simple by calling
MessageBar#show(...). A few methods are
available here. It can either simply show a message or show a message and a
button. When a button is shown, a Parcelable has to be passed that's then returned
MessageBar$OnMessageClickListener if the button is clicked.
mMessageBar.show("This is a message");
- Roman Nurik for creating the example this library is based on.
Copyright 2012 Simon Vig Therkildsen Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*Note that all licence references and agreements mentioned in the MessageBar README section above are relevant to that project's source code only.