|
|
|
@ -1,4 +1,4 @@ |
|
|
|
package net.pokeranalytics.android.util.extensions |
|
|
|
package net.pokeranalytics.android.ui |
|
|
|
|
|
|
|
|
|
|
|
import android.content.ActivityNotFoundException |
|
|
|
import android.content.ActivityNotFoundException |
|
|
|
import android.content.Context |
|
|
|
import android.content.Context |
|
|
|
@ -7,10 +7,12 @@ import android.content.res.Resources |
|
|
|
import android.net.Uri |
|
|
|
import android.net.Uri |
|
|
|
import android.widget.Toast |
|
|
|
import android.widget.Toast |
|
|
|
import androidx.appcompat.app.AlertDialog |
|
|
|
import androidx.appcompat.app.AlertDialog |
|
|
|
|
|
|
|
import androidx.appcompat.widget.AppCompatTextView |
|
|
|
import androidx.browser.customtabs.CustomTabsIntent |
|
|
|
import androidx.browser.customtabs.CustomTabsIntent |
|
|
|
import androidx.core.content.ContextCompat |
|
|
|
import androidx.core.content.ContextCompat |
|
|
|
import net.pokeranalytics.android.BuildConfig |
|
|
|
import net.pokeranalytics.android.BuildConfig |
|
|
|
import net.pokeranalytics.android.R |
|
|
|
import net.pokeranalytics.android.R |
|
|
|
|
|
|
|
import net.pokeranalytics.android.calculus.TextFormat |
|
|
|
import net.pokeranalytics.android.ui.activity.components.PokerAnalyticsActivity |
|
|
|
import net.pokeranalytics.android.ui.activity.components.PokerAnalyticsActivity |
|
|
|
import net.pokeranalytics.android.ui.fragment.components.PokerAnalyticsFragment |
|
|
|
import net.pokeranalytics.android.ui.fragment.components.PokerAnalyticsFragment |
|
|
|
import net.pokeranalytics.android.util.DeviceUtils |
|
|
|
import net.pokeranalytics.android.util.DeviceUtils |
|
|
|
@ -100,4 +102,9 @@ fun showAlertDialog(context: Context, title: Int? = null, message: Int? = null) |
|
|
|
} |
|
|
|
} |
|
|
|
builder.setPositiveButton(R.string.ok, null) |
|
|
|
builder.setPositiveButton(R.string.ok, null) |
|
|
|
builder.show() |
|
|
|
builder.show() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun AppCompatTextView.setTextFormat(textFormat: TextFormat, context: Context) { |
|
|
|
|
|
|
|
this.setTextColor(textFormat.getColor(context)) |
|
|
|
|
|
|
|
this.text = textFormat.text |
|
|
|
} |
|
|
|
} |