Skip to content

Commit

Permalink
all: smoother dialogs (fixes #4844) (#4845)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
deeppp15 and dogi authored Dec 6, 2024
1 parent cf00e2f commit 8e3ad02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 26
targetSdkVersion 34
versionCode 2128
versionName "0.21.28"
versionCode 2129
versionName "0.21.29"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ object DialogUtils {

fun guestDialog(context: Context) {
val profileDbHandler = UserProfileDbHandler(context)
val builder = android.app.AlertDialog.Builder(context, R.style.AlertDialogTheme)
val builder = android.app.AlertDialog.Builder(context, R.style.CustomAlertDialog)
builder.setTitle(context.getString(R.string.become_a_member))
builder.setMessage(context.getString(R.string.to_access_this_feature_become_a_member))
builder.setCancelable(false)
Expand Down Expand Up @@ -75,7 +75,7 @@ object DialogUtils {

private fun showDialog(context: Context) {
if (MainApplication.syncFailedCount > 3) {
val pd = AlertDialog.Builder(context)
val pd = AlertDialog.Builder(context, R.style.CustomAlertDialog)
var message = if (NetworkUtils.isBluetoothEnabled()) "Bluetooth " else ""
message += if (NetworkUtils.isWifiEnabled()) "Wifi " else ""
message += context.getString(R.string.is_on_please_turn_of_to_save_battery)
Expand All @@ -101,7 +101,7 @@ object DialogUtils {
@JvmStatic
fun showAlert(context: Context?, title: String?, message: String?) {
if (context is Activity && !context.isFinishing) {
AlertDialog.Builder(context, R.style.AlertDialogTheme)
AlertDialog.Builder(context, R.style.CustomAlertDialog)
.setTitle(title)
.setMessage(message)
.setPositiveButton(R.string.finish, null)
Expand All @@ -111,7 +111,7 @@ object DialogUtils {

@JvmStatic
fun getAlertDialog(context: Context, message: String, pos: String, listener: DialogInterface.OnClickListener?): AlertDialog {
return AlertDialog.Builder(ContextThemeWrapper(context, R.style.AlertDialogTheme))
return AlertDialog.Builder(ContextThemeWrapper(context, R.style.CustomAlertDialog))
.setMessage(message)
.setIcon(R.drawable.courses)
.setPositiveButton(pos, listener)
Expand All @@ -130,7 +130,7 @@ object DialogUtils {

@JvmStatic
fun getAlertDialog(context: Context, title: String, v: View): AlertDialog {
return AlertDialog.Builder(ContextThemeWrapper(context, R.style.AlertDialogTheme))
return AlertDialog.Builder(ContextThemeWrapper(context, R.style.CustomAlertDialog))
.setTitle(title)
.setIcon(R.drawable.ic_edit)
.setView(v)
Expand Down

0 comments on commit 8e3ad02

Please sign in to comment.