Use dark theme if dark theme is enabled in the device
This commit is contained in:
@ -38,7 +38,7 @@ class AccountListAdapter(private val cxt: Context, private val rows: ArrayList<A
|
||||
actionView.setOnClickListener {
|
||||
val titleView = View.inflate(cxt, R.layout.alert_title, null) as TextView
|
||||
titleView.text = cxt.getString(R.string.confirmation)
|
||||
with (AlertDialog.Builder(cxt)) {
|
||||
with (AlertDialog.Builder(cxt, R.style.AlertDialog)) {
|
||||
setCustomTitle(titleView)
|
||||
setMessage(String.format(cxt.getString(R.string.delete_account),
|
||||
aorView.text))
|
||||
|
||||
@ -12,7 +12,6 @@ import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.widget.AdapterView
|
||||
import android.widget.ListView
|
||||
import android.widget.TextView
|
||||
import com.tutpro.baresip.databinding.ActivityCallsBinding
|
||||
|
||||
@ -206,9 +205,9 @@ class CallsActivity : AppCompatActivity() {
|
||||
override fun onPrepareOptionsMenu(menu: Menu): Boolean {
|
||||
|
||||
if (account.callHistory)
|
||||
menu.findItem(R.id.history_on_off).setTitle(getString(R.string.disable_history))
|
||||
menu.findItem(R.id.history_on_off).title = getString(R.string.disable_history)
|
||||
else
|
||||
menu.findItem(R.id.history_on_off).setTitle(getString(R.string.enable_history))
|
||||
menu.findItem(R.id.history_on_off).title = getString(R.string.enable_history)
|
||||
return super.onPrepareOptionsMenu(menu)
|
||||
|
||||
}
|
||||
|
||||
@ -14,8 +14,8 @@ import android.widget.*
|
||||
import java.util.*
|
||||
import java.text.DateFormat
|
||||
|
||||
class ChatListAdapter(private val cxt: Context, private var rows: ArrayList<Message>) :
|
||||
ArrayAdapter<Message>(cxt, R.layout.message, rows) {
|
||||
class ChatListAdapter(private val ctx: Context, private var rows: ArrayList<Message>) :
|
||||
ArrayAdapter<Message>(ctx, R.layout.message, rows) {
|
||||
|
||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val message = rows[position]
|
||||
@ -48,9 +48,15 @@ class ChatListAdapter(private val cxt: Context, private var rows: ArrayList<Mess
|
||||
}
|
||||
if ((message.direction == R.drawable.arrow_down_green) ||
|
||||
(message.direction == R.drawable.arrow_down_red)) {
|
||||
layout.setBackgroundResource(R.drawable.message_in_bg)
|
||||
if (Utils.darkTheme(ctx))
|
||||
layout.setBackgroundResource(R.drawable.message_in_dark_bg)
|
||||
else
|
||||
layout.setBackgroundResource(R.drawable.message_in_bg)
|
||||
} else {
|
||||
layout.setBackgroundResource(R.drawable.message_out_bg)
|
||||
if (Utils.darkTheme(ctx))
|
||||
layout.setBackgroundResource(R.drawable.message_out_dark_bg)
|
||||
else
|
||||
layout.setBackgroundResource(R.drawable.message_out_bg)
|
||||
}
|
||||
val peerView = rowView.findViewById(R.id.peer) as TextView
|
||||
peerView.setText(peer)
|
||||
@ -66,12 +72,12 @@ class ChatListAdapter(private val cxt: Context, private var rows: ArrayList<Mess
|
||||
if (message.direction == R.drawable.arrow_up_red) {
|
||||
val info: String
|
||||
if (message.responseCode != 0)
|
||||
info = "${infoView.text} - ${cxt.getString(R.string.message_failed)}: " +
|
||||
info = "${infoView.text} - ${ctx.getString(R.string.message_failed)}: " +
|
||||
"${message.responseCode} ${message.responseReason}"
|
||||
else
|
||||
info = "${infoView.text} - ${cxt.getString(R.string.sending_failed)}"
|
||||
info = "${infoView.text} - ${ctx.getString(R.string.sending_failed)}"
|
||||
infoView.text = info
|
||||
infoView.setTextColor(ContextCompat.getColor(cxt, R.color.colorAccent))
|
||||
infoView.setTextColor(ContextCompat.getColor(ctx, R.color.colorAccent))
|
||||
}
|
||||
val textView = rowView.findViewById(R.id.text) as TextView
|
||||
textView.text = message.message
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.tutpro.baresip
|
||||
|
||||
import android.Manifest
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.app.KeyguardManager
|
||||
import android.app.NotificationManager
|
||||
@ -63,6 +64,7 @@ class MainActivity : AppCompatActivity() {
|
||||
private var restart = false
|
||||
private var atStartup = false
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
||||
super.onCreate(savedInstanceState)
|
||||
@ -178,7 +180,7 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
view.performClick()
|
||||
// view.performClick()
|
||||
false
|
||||
}
|
||||
}
|
||||
@ -1161,8 +1163,8 @@ class MainActivity : AppCompatActivity() {
|
||||
input.transformationMethod = PasswordTransformationMethod()
|
||||
}
|
||||
val context = this
|
||||
val builder = AlertDialog.Builder(this)
|
||||
with(builder) {
|
||||
val builder = AlertDialog.Builder(this, R.style.AlertDialog)
|
||||
with (builder) {
|
||||
setView(layout)
|
||||
setPositiveButton(android.R.string.ok) { dialog, _ ->
|
||||
imm.hideSoftInputFromWindow(input.windowToken, 0)
|
||||
@ -1217,8 +1219,8 @@ class MainActivity : AppCompatActivity() {
|
||||
input.transformationMethod = PasswordTransformationMethod()
|
||||
}
|
||||
val context = this
|
||||
val builder = AlertDialog.Builder(this)
|
||||
with(builder) {
|
||||
val builder = AlertDialog.Builder(this, R.style.AlertDialog)
|
||||
with (builder) {
|
||||
setView(layout)
|
||||
setPositiveButton(android.R.string.ok) { dialog, _ ->
|
||||
imm.hideSoftInputFromWindow(input.windowToken, 0)
|
||||
@ -1344,6 +1346,7 @@ class MainActivity : AppCompatActivity() {
|
||||
aorSpinner.setSelection(-1)
|
||||
aorSpinner.tag = ""
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun call(ua: UserAgent, uri: String, status: String): Boolean {
|
||||
|
||||
@ -12,8 +12,8 @@ import android.widget.*
|
||||
import java.text.DateFormat
|
||||
import java.util.*
|
||||
|
||||
class MessageListAdapter(private val cxt: Context, private val rows: ArrayList<Message>) :
|
||||
ArrayAdapter<Message>(cxt, R.layout.message, rows) {
|
||||
class MessageListAdapter(private val ctx: Context, private val rows: ArrayList<Message>) :
|
||||
ArrayAdapter<Message>(ctx, R.layout.message, rows) {
|
||||
|
||||
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
|
||||
val message = rows[position]
|
||||
@ -26,11 +26,17 @@ class MessageListAdapter(private val cxt: Context, private val rows: ArrayList<M
|
||||
val peer: String
|
||||
if (up) {
|
||||
lp.setMargins(75, 10, 0, 10)
|
||||
layout.setBackgroundResource(R.drawable.message_out_bg)
|
||||
peer = cxt.getString(R.string.you)
|
||||
if (Utils.darkTheme(ctx))
|
||||
layout.setBackgroundResource(R.drawable.message_out_dark_bg)
|
||||
else
|
||||
layout.setBackgroundResource(R.drawable.message_out_bg)
|
||||
peer = ctx.getString(R.string.you)
|
||||
} else {
|
||||
lp.setMargins(0, 10, 75, 10)
|
||||
layout.setBackgroundResource(R.drawable.message_in_bg)
|
||||
if (Utils.darkTheme(ctx))
|
||||
layout.setBackgroundResource(R.drawable.message_in_dark_bg)
|
||||
else
|
||||
layout.setBackgroundResource(R.drawable.message_in_bg)
|
||||
val contactName = ContactsActivity.contactName(message.peerUri)
|
||||
if (contactName.startsWith("sip:") &&
|
||||
(Utils.uriHostPart(message.peerUri) == Utils.uriHostPart(message.aor)))
|
||||
@ -49,14 +55,14 @@ class MessageListAdapter(private val cxt: Context, private val rows: ArrayList<M
|
||||
else
|
||||
fmt = DateFormat.getDateInstance(DateFormat.SHORT)
|
||||
info = fmt.format(cal.time)
|
||||
if (info.length < 6) info = "${cxt.getString(R.string.today)} $info"
|
||||
if (info.length < 6) info = "${ctx.getString(R.string.today)} $info"
|
||||
info = "$info - $peer"
|
||||
if (message.direction == R.drawable.arrow_up_red) {
|
||||
if (message.responseCode != 0)
|
||||
info = "$info - ${cxt.getString(R.string.message_failed)}: " + "${message.responseCode} ${message.responseReason}"
|
||||
info = "$info - ${ctx.getString(R.string.message_failed)}: " + "${message.responseCode} ${message.responseReason}"
|
||||
else
|
||||
info = "$info - ${cxt.getString(R.string.sending_failed)}"
|
||||
infoView.setTextColor(ContextCompat.getColor(cxt, R.color.colorAccent))
|
||||
info = "$info - ${ctx.getString(R.string.sending_failed)}"
|
||||
infoView.setTextColor(ContextCompat.getColor(ctx, R.color.colorAccent))
|
||||
}
|
||||
infoView.text = info
|
||||
val textView = messageView.findViewById(R.id.text) as TextView
|
||||
|
||||
@ -5,6 +5,7 @@ import android.app.ActivityManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.res.Configuration
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Bitmap.createScaledBitmap
|
||||
import android.graphics.Color
|
||||
@ -57,7 +58,7 @@ object Utils {
|
||||
fun alertView(context: Context, title: String, message: String, action: () -> (Unit) = {}) {
|
||||
val titleView = View.inflate(context, R.layout.alert_title, null) as TextView
|
||||
titleView.text = title
|
||||
with (AlertDialog.Builder(context)) {
|
||||
with (AlertDialog.Builder(context, R.style.AlertDialog)) {
|
||||
setCustomTitle(titleView)
|
||||
setMessage(message)
|
||||
setPositiveButton(R.string.ok) { dialog, _ ->
|
||||
@ -601,4 +602,9 @@ object Utils {
|
||||
BaresipService.activities.add(0, activity)
|
||||
}
|
||||
|
||||
fun darkTheme(ctx: Context): Boolean {
|
||||
return ctx.resources?.configuration?.uiMode?.and(Configuration.UI_MODE_NIGHT_MASK) ==
|
||||
Configuration.UI_MODE_NIGHT_YES
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/colorGrayLight"/>
|
||||
<solid android:color="@color/colorSecondaryLight"/>
|
||||
<corners android:bottomLeftRadius="5dp" android:radius="15dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
@ -19,8 +19,7 @@
|
||||
android:id="@+id/spinnerText"
|
||||
android:textSize="18sp"
|
||||
android:paddingStart="8sp"
|
||||
android:paddingEnd="0sp"
|
||||
android:textColor="@android:color/black" />
|
||||
android:paddingEnd="0sp" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="" >
|
||||
</TextView>
|
||||
@ -32,7 +31,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/display_name" >
|
||||
</TextView>
|
||||
@ -52,7 +50,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/authentication_username" >
|
||||
</TextView>
|
||||
@ -72,7 +69,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/authentication_password" >
|
||||
</TextView>
|
||||
@ -97,7 +93,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/outbound_proxies" >
|
||||
</TextView>
|
||||
@ -133,7 +128,6 @@
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toStartOf="@id/Register"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/register" >
|
||||
</TextView>
|
||||
@ -154,7 +148,6 @@
|
||||
android:paddingTop="10dp"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/audio_codecs" >
|
||||
</TextView>
|
||||
@ -165,7 +158,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/media_encryption" >
|
||||
</TextView>
|
||||
@ -183,7 +175,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/media_nat" >
|
||||
</TextView>
|
||||
@ -201,7 +192,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/stun_server" >
|
||||
</TextView>
|
||||
@ -223,7 +213,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/stun_username" >
|
||||
</TextView>
|
||||
@ -244,7 +233,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/stun_password" >
|
||||
</TextView>
|
||||
@ -276,7 +264,6 @@
|
||||
android:layout_toStartOf="@id/PreferIPv6Media"
|
||||
android:paddingTop="10dp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/prefer_ipv6_media" >
|
||||
</TextView>
|
||||
@ -296,7 +283,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/answer_mode" >
|
||||
</TextView>
|
||||
@ -314,7 +300,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="10dp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/voicemail_uri" >
|
||||
</TextView>
|
||||
@ -341,7 +326,6 @@
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_toStartOf="@id/Default"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/default_account" >
|
||||
</TextView>
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/audio_modules_title" >
|
||||
</TextView>
|
||||
@ -50,7 +49,6 @@
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/opus_bit_rate" >
|
||||
</TextView>
|
||||
@ -81,7 +79,6 @@
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/opus_packet_loss" >
|
||||
</TextView>
|
||||
@ -112,7 +109,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/Aec"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/aec" >
|
||||
</TextView>
|
||||
@ -139,7 +135,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/ExtendedFilter"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/aec_extended_filter" >
|
||||
</TextView>
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/audio_codecs" >
|
||||
</TextView>
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/AutoStart"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/start_automatically" >
|
||||
</TextView>
|
||||
@ -49,7 +48,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/listen_address"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp" >
|
||||
</TextView>
|
||||
|
||||
@ -70,7 +68,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/dns_servers"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="18sp">
|
||||
</TextView>
|
||||
|
||||
@ -97,7 +94,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/CertificateFile"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/tls_certificate_file" >
|
||||
</TextView>
|
||||
@ -125,7 +121,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/CAFile"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/tls_ca_file" >
|
||||
</TextView>
|
||||
@ -147,7 +142,6 @@
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/audio" >
|
||||
</TextView>
|
||||
@ -165,7 +159,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/VolumeSpinner"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/default_call_volume" >
|
||||
</TextView>
|
||||
@ -192,7 +185,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/Debug"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/debug" >
|
||||
</TextView>
|
||||
@ -220,7 +212,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/SipTrace"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/sip_trace" >
|
||||
</TextView>
|
||||
@ -248,7 +239,6 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toStartOf="@id/Reset"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/reset_config" >
|
||||
</TextView>
|
||||
|
||||
@ -46,7 +46,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:paddingTop="10dp"
|
||||
android:text="@string/contact_name" >
|
||||
</TextView>
|
||||
@ -64,7 +63,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:paddingTop="10dp"
|
||||
android:text="@string/sip_uri" >
|
||||
</TextView>
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:drawable/btn_dropdown"
|
||||
android:popupBackground="@android:drawable/btn_dropdown"
|
||||
android:spinnerMode="dropdown"/>
|
||||
|
||||
<TextView
|
||||
@ -44,7 +45,6 @@
|
||||
android:paddingStart="3dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="@string/outgoing_call_to_dots" >
|
||||
</TextView>
|
||||
|
||||
|
||||
@ -10,15 +10,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="?dialogPreferredPadding"
|
||||
android:textSize="20sp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:textColor="@color/colorWhite" />
|
||||
android:textColor="@color/colorWhite"
|
||||
android:background="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15sp"
|
||||
android:textColor="#000000"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingStart="?dialogPreferredPadding"
|
||||
android:paddingEnd="?dialogPreferredPadding" />
|
||||
|
||||
@ -1,10 +1,26 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="actionBarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
|
||||
<item name="android:dropDownListViewStyle">@style/Spinner</item>
|
||||
<item name="actionOverflowMenuStyle">@style/ActionBarMenu</item>
|
||||
</style>
|
||||
|
||||
<style name="Spinner" parent="Theme.AppCompat.DayNight">
|
||||
<item name="android:dividerHeight">1dp</item>
|
||||
<item name="android:divider">@color/colorGray</item>
|
||||
</style>
|
||||
|
||||
<style name="AlertDialog" parent="Theme.AppCompat.DayNight.Dialog.Alert">
|
||||
<item name="colorAccent">@color/colorPrimary</item>
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="ActionBarMenu" parent="Widget.AppCompat.PopupMenu.Overflow">
|
||||
<item name="android:popupBackground">@color/colorPrimaryDark</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar">
|
||||
@ -12,8 +28,8 @@
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.DayNight.ActionBar" />
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.DayNight" />
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user