Use flat registration status icons

Modified traffic light colors
This commit is contained in:
Juha Heinanen
2023-04-01 16:12:32 +03:00
parent 42cb802842
commit fe39a09cea
13 changed files with 42 additions and 12 deletions

View File

@ -657,7 +657,7 @@ class AccountActivity : AppCompatActivity() {
AccountsActivity.saveAccounts()
if (reRegister) {
ua.status = R.drawable.dot_yellow
ua.status = R.drawable.circle_yellow
if (acc.regint == 0)
Api.ua_unregister(ua.uap)
else

View File

@ -566,9 +566,9 @@ class BaresipService: Service() {
val ua = UserAgent(uap)
ua.status = if (ua.account.regint == 0)
R.drawable.dot_white
R.drawable.circle_white
else
R.drawable.dot_yellow
R.drawable.circle_yellow
uas.add(ua)
val acc = ua.account
@ -620,7 +620,7 @@ class BaresipService: Service() {
if (uas[accountIndex].account.aor == aor) {
when (ev[0]) {
"registering", "unregistering" -> {
ua.status = R.drawable.dot_yellow
ua.status = R.drawable.circle_yellow
updateStatusNotification()
if (isMainVisible)
registrationUpdate.postValue(System.currentTimeMillis())
@ -628,9 +628,9 @@ class BaresipService: Service() {
}
"registered" -> {
ua.status = if (Api.account_regint(ua.account.accp) == 0)
R.drawable.dot_white
R.drawable.circle_white
else
R.drawable.dot_green
R.drawable.circle_green
updateStatusNotification()
if (isMainVisible)
registrationUpdate.postValue(System.currentTimeMillis())
@ -638,9 +638,9 @@ class BaresipService: Service() {
}
"registering failed" -> {
ua.status = if (Api.account_regint(ua.account.accp) == 0)
R.drawable.dot_white
R.drawable.circle_white
else
R.drawable.dot_red
R.drawable.circle_red
updateStatusNotification()
if (isMainVisible)
registrationUpdate.postValue(System.currentTimeMillis())

View File

@ -3,7 +3,7 @@ package com.tutpro.baresip
class UserAgent(val uap: Long) {
val account = Account(Api.ua_account(uap))
var status = R.drawable.dot_white
var status = R.drawable.circle_white
fun callAlloc(xCall: Long, videoMode: Int): Long {
return Api.ua_call_alloc(uap, xCall, videoMode)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 B

View File

@ -0,0 +1,7 @@
<vector android:autoMirrored="true" android:height="24dp"
android:viewportHeight="100" android:viewportWidth="100"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/colorTrafficGreen"
android:pathData="M50,50m-40,0a40,40 0,1 1,80 0a40,40 0,1 1,-80 0"
android:strokeColor="#000000" android:strokeWidth="3"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector android:autoMirrored="true" android:height="24dp"
android:viewportHeight="100" android:viewportWidth="100"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/colorTrafficRed"
android:pathData="M50,50m-40,0a40,40 0,1 1,80 0a40,40 0,1 1,-80 0"
android:strokeColor="#000000" android:strokeWidth="3"/>
</vector>

View File

@ -0,0 +1,7 @@
<vector android:autoMirrored="true" android:height="24dp"
android:viewportHeight="100" android:viewportWidth="100"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffff"
android:pathData="M50,50m-40,0a40,40 0,1 1,80 0a40,40 0,1 1,-80 0"
android:strokeColor="#000000" android:strokeWidth="3"/>
</vector>

View File

@ -0,0 +1,7 @@
<vector android:autoMirrored="true" android:height="24dp"
android:viewportHeight="100" android:viewportWidth="100"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@color/colorTrafficYellow"
android:pathData="M50,50m-40,0a40,40 0,1 1,80 0a40,40 0,1 1,-80 0"
android:strokeColor="#000000" android:strokeWidth="3"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -16,9 +16,9 @@
<color name="colorStrong">@color/colorBlack</color>
<color name="colorGreen">#01df01</color>
<color name="colorRed">#ff0000</color>
<color name="colorTrafficGreen">#008450</color>
<color name="colorTrafficYellow">#EFB700</color>
<color name="colorTrafficRed">#B81D13</color>
<color name="colorTrafficGreen">#43A047</color>
<color name="colorTrafficYellow">#FDD835</color>
<color name="colorTrafficRed">#F44336</color>
<color name="colorLight">@color/colorWhite</color>
<color name="colorDark">#383838</color>
<color name="colorSpinnerText">@color/colorDark</color>