Skip to content

Commit 5f969ea

Browse files
committed
toast gravity removed
1 parent 2edd8da commit 5f969ea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Toast/src/main/java/com/collegedunia/toast/ToastGenerate.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ToastGenerate constructor(private val context: Context) {
4646
toastLayout = layoutInflater.inflate(R.layout.layout_custom_toast, null) as View
4747
root = toastLayout.findViewById(R.id.root)
4848

49-
root.setPadding(50, 0, 50, 50);
49+
root.setPadding(50, 0, 50, 0);
5050

5151
MediatorLiveData<Pair<ArrayList<ToastModel>?, Boolean?>>().apply {
5252
addSource(listen) { value = it to value?.second }
@@ -171,7 +171,6 @@ class ToastGenerate constructor(private val context: Context) {
171171

172172
private fun showToast(toastLayout: View, length: ToastLength?) {
173173
var toast: Toast = Toast(context)
174-
toast.setGravity(Gravity.CENTER_HORIZONTAL or Gravity.BOTTOM,0,0)
175174
toast.duration = if(length==ToastLength.LONG){
176175
Toast.LENGTH_LONG
177176
}else{

0 commit comments

Comments
 (0)