Commit 075e8d34 authored by wanglei's avatar wanglei

...

parent 718bf2e5
......@@ -31,7 +31,7 @@ object DownloadDialog {
dismissAction: () -> Unit
) {
val TAG = "DownloadVideoDialog"
val dialog = BottomSheetDialog(this)
val dialog = BottomSheetDialog(this,R.style.BottomSheetDialog)
val binding = DialogDownloadVideoBinding.inflate(LayoutInflater.from(this))
dialog.setContentView(binding.root)
dialog.setCanceledOnTouchOutside(false)
......@@ -68,7 +68,7 @@ object DownloadDialog {
}
fun Context.showDownloadConfirmDialog(item: DownloadBean, download: () -> Unit) {
val dialog = BottomSheetDialog(this)
val dialog = BottomSheetDialog(this,R.style.BottomSheetDialog)
val binding = DialogDownloadConfirmBinding.inflate(LayoutInflater.from(this))
dialog.setContentView(binding.root)
dialog.setCanceledOnTouchOutside(false)
......
......@@ -3,12 +3,13 @@ package com.base.browserwhite.ui.views
import android.app.AlertDialog
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Build
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.widget.FrameLayout
import android.widget.Toast
import androidx.core.content.ContextCompat
import androidx.core.view.isVisible
import com.base.browserwhite.R
import com.base.browserwhite.bean.ConstObject
......@@ -30,8 +31,6 @@ import com.base.browserwhite.help.Constants
import com.base.browserwhite.help.RxBus
import com.base.browserwhite.ui.activity.about.AboutActivity
import com.base.browserwhite.ui.activity.feedback.FeedbackActivity
import com.base.browserwhite.ui.views.DialogViews.showDefaultBrowserDialog
import com.base.browserwhite.ui.views.DialogViews.showSearchEngineDialog
import com.base.browserwhite.utils.ActivityLauncher
import com.base.browserwhite.utils.AppPreferences
import com.base.browserwhite.utils.RoleManagerUtils.isDefaultBrowser
......@@ -120,11 +119,10 @@ object DialogViews {
}
fun Context.showMyAccountDialog(launcher: ActivityLauncher) {
val dialog = BottomSheetDialog(this)
val dialog = BottomSheetDialog(this, R.style.BottomSheetDialog)
val binding = DialogMyAccountBinding.inflate(LayoutInflater.from(this))
dialog.setContentView(binding.root)
dialog.setCanceledOnTouchOutside(false)
dialog.show()
val parentView = binding.root.parent as View
......@@ -156,7 +154,7 @@ object DialogViews {
YANDEX -> binding.ivSearchEngine.setImageResource(R.mipmap.m_yandex)
BAIDU -> binding.ivSearchEngine.setImageResource(R.mipmap.m_baidu)
}
RxBus.get().post(Constants.CHANGE_SEARCH_TYPE,searchEngineSp)
RxBus.get().post(Constants.CHANGE_SEARCH_TYPE, searchEngineSp)
}
}
binding.clDefaultBrowser.isVisible = !isDefaultBrowser()
......@@ -303,7 +301,7 @@ object DialogViews {
fun Context.showDefaultBrowserDialog(launcher: ActivityLauncher) {
val dialog = BottomSheetDialog(this)
val dialog = BottomSheetDialog(this,R.style.BottomSheetDialog)
val binding = DialogDefaultBrowserBinding.inflate(LayoutInflater.from(this))
dialog.setContentView(binding.root)
dialog.setCanceledOnTouchOutside(false)
......@@ -335,7 +333,7 @@ object DialogViews {
) {
val dialog = BottomSheetDialog(this)
val dialog = BottomSheetDialog(this,R.style.BottomSheetDialog)
val binding = DialogMoreWebbrowserBinding.inflate(LayoutInflater.from(this))
dialog.setContentView(binding.root)
dialog.setCanceledOnTouchOutside(false)
......
......@@ -57,7 +57,7 @@ object PermissionDialog {
@SuppressLint("SetTextI18n")
fun Context.showPermissionBottomSheet(launcher: ActivityLauncher, agreeAction: () -> Unit) {
val dialog = BottomSheetDialog(this)
val dialog = BottomSheetDialog(this, R.style.BottomSheetDialog)
val binding = DialogPermissionStorageBottomBinding.inflate(LayoutInflater.from(this))
dialog.setContentView(binding.root)
dialog.setCanceledOnTouchOutside(false)
......
......@@ -23,7 +23,7 @@ object RateDialog {
}
}
val dialog = BottomSheetDialog(this)
val dialog = BottomSheetDialog(this,R.style.BottomSheetDialog)
val binding = DialogRateStarBinding.inflate(LayoutInflater.from(this))
dialog.setContentView(binding.root)
dialog.setCanceledOnTouchOutside(false)
......
......@@ -9,4 +9,16 @@
<item name="android:background">?android:attr/colorBackground</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="BottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/bottomSheetStyleWrapper</item>
<!--去掉背景阴影-->
<!-- <item name="android:backgroundDimEnabled">false</item>-->
</style>
<style name="bottomSheetStyleWrapper" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@android:color/transparent</item>
</style>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment