Create a toast message quickly and customize it to what you want.
maven { url 'https://jitpack.io' }
implementation 'com.github.eriffanani:Toastyle:1.0.0'
- Basic
Toastyle.makeText(context, "Basic toast")
- Text Color
Toastyle.Builder(context, "Toast text color")
.textColor(R.color.purple_200)
.show()
- Use Icon
iconLeft(R.drawable.ic_error) / iconRight(R.drawable.ic_error)
iconColor(R.color.purple_200)
- Font
fontFamily(R.font.montserrat)
- Border
border(R.dimen.toast_border_size, R.color.purple_200)
- Corner Radius
// All corners
cornerRadius(R.dimen.corner_toast_small)
// Custom corner radius (Top Left, Top Right, Bottom Left, Bottom Right)
cornerRadius(R.dimen.corner_toast, 0, 0, R.dimen.corner_toast)
- Background Color
backgroundColor(R.color.purple_200)
- State
Toastyle.success(context, "Toast success message")
- Position
position(Gravity.CENTER or Gravity.END)
Copyright 2022 Mukhammad Erif Fanani
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
https://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.