Skip to content

Commit

Permalink
toast root layout set
Browse files Browse the repository at this point in the history
  • Loading branch information
har2008preet committed Aug 26, 2022
1 parent 5f969ea commit f8f44dc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Toast/src/main/java/com/collegedunia/toast/ToastGenerate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.collegedunia.toast
import android.annotation.SuppressLint
import android.content.Context
import android.util.Log
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.view.View.GONE
Expand All @@ -16,7 +15,6 @@ import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.MutableLiveData
import java.util.*
import kotlin.collections.ArrayList
import kotlin.concurrent.schedule


Expand Down Expand Up @@ -46,6 +44,14 @@ class ToastGenerate constructor(private val context: Context) {
toastLayout = layoutInflater.inflate(R.layout.layout_custom_toast, null) as View
root = toastLayout.findViewById(R.id.root)

val lp = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.MATCH_PARENT
)


root.layoutParams = lp

root.setPadding(50, 0, 50, 0);

MediatorLiveData<Pair<ArrayList<ToastModel>?, Boolean?>>().apply {
Expand Down

0 comments on commit f8f44dc

Please sign in to comment.