mirror of
https://github.com/amwatson/CitraVR.git
synced 2024-09-20 03:11:40 +02:00
hard-code black text on toasts (2D containers set the theme s.t. toasts have white text on a white bg)
This commit is contained in:
parent
9a5ca2f162
commit
fe72be3d03
1 changed files with 7 additions and 5 deletions
|
@ -6,8 +6,10 @@ package org.citra.citra_emu.features.settings.ui
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.graphics.Color
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.text.Html
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup.MarginLayoutParams
|
import android.view.ViewGroup.MarginLayoutParams
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
@ -175,11 +177,11 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showToastMessage(message: String, isLong: Boolean) {
|
override fun showToastMessage(message: String, isLong: Boolean) {
|
||||||
Toast.makeText(
|
// VR-SPECIFIC: 2D containers seem to mess up theming in some cases. This hack is necessary to ensure toasts
|
||||||
this,
|
// show up with a white background and black text.
|
||||||
message,
|
val toast : Toast =
|
||||||
if (isLong) Toast.LENGTH_LONG else Toast.LENGTH_SHORT
|
Toast.makeText(this, Html.fromHtml("<font color='#000000' ><b>" + message+ "</b></font>"), Toast.LENGTH_LONG);
|
||||||
).show()
|
toast.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSettingChanged() {
|
override fun onSettingChanged() {
|
||||||
|
|
Loading…
Reference in a new issue