revert my over smartness 😔

This commit is contained in:
IndusAryan 2024-03-12 22:17:41 +05:30
parent 7dfd9c454c
commit 6303d4125f
2 changed files with 3 additions and 1 deletions

View file

@ -9,6 +9,7 @@ import android.content.res.Resources
import android.os.Build
import android.util.DisplayMetrics
import android.util.Log
import android.view.Gravity
import android.view.KeyEvent
import android.view.View
import android.view.View.NO_ID
@ -40,6 +41,7 @@ import com.lagradost.cloudstream3.utils.Event
import com.lagradost.cloudstream3.utils.UIHelper
import com.lagradost.cloudstream3.utils.UIHelper.hasPIPPermission
import com.lagradost.cloudstream3.utils.UIHelper.shouldShowPIPMode
import com.lagradost.cloudstream3.utils.UIHelper.toPx
import org.schabi.newpipe.extractor.NewPipe
import java.lang.ref.WeakReference
import java.util.Locale
@ -160,6 +162,7 @@ object CommonActivity {
// custom toasts are deprecated and won't appear when cs3 sets minSDK to api30 (A11)
val toast = Toast(act)
toast.duration = duration ?: Toast.LENGTH_SHORT
toast.setGravity(Gravity.CENTER_HORIZONTAL or Gravity.BOTTOM, 0, 5.toPx)
toast.view = binding.root
currentToast = toast
toast.show()

View file

@ -5,7 +5,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp"
android:layout_gravity="center_horizontal"
app:cardCornerRadius="10dp"
app:cardBackgroundColor="?attr/primaryBlackBackground"
android:background="?attr/primaryBlackBackground">