Use flat registration status icons
Modified traffic light colors
This commit is contained in:
@ -657,7 +657,7 @@ class AccountActivity : AppCompatActivity() {
|
|||||||
AccountsActivity.saveAccounts()
|
AccountsActivity.saveAccounts()
|
||||||
|
|
||||||
if (reRegister) {
|
if (reRegister) {
|
||||||
ua.status = R.drawable.dot_yellow
|
ua.status = R.drawable.circle_yellow
|
||||||
if (acc.regint == 0)
|
if (acc.regint == 0)
|
||||||
Api.ua_unregister(ua.uap)
|
Api.ua_unregister(ua.uap)
|
||||||
else
|
else
|
||||||
|
|||||||
@ -566,9 +566,9 @@ class BaresipService: Service() {
|
|||||||
|
|
||||||
val ua = UserAgent(uap)
|
val ua = UserAgent(uap)
|
||||||
ua.status = if (ua.account.regint == 0)
|
ua.status = if (ua.account.regint == 0)
|
||||||
R.drawable.dot_white
|
R.drawable.circle_white
|
||||||
else
|
else
|
||||||
R.drawable.dot_yellow
|
R.drawable.circle_yellow
|
||||||
uas.add(ua)
|
uas.add(ua)
|
||||||
|
|
||||||
val acc = ua.account
|
val acc = ua.account
|
||||||
@ -620,7 +620,7 @@ class BaresipService: Service() {
|
|||||||
if (uas[accountIndex].account.aor == aor) {
|
if (uas[accountIndex].account.aor == aor) {
|
||||||
when (ev[0]) {
|
when (ev[0]) {
|
||||||
"registering", "unregistering" -> {
|
"registering", "unregistering" -> {
|
||||||
ua.status = R.drawable.dot_yellow
|
ua.status = R.drawable.circle_yellow
|
||||||
updateStatusNotification()
|
updateStatusNotification()
|
||||||
if (isMainVisible)
|
if (isMainVisible)
|
||||||
registrationUpdate.postValue(System.currentTimeMillis())
|
registrationUpdate.postValue(System.currentTimeMillis())
|
||||||
@ -628,9 +628,9 @@ class BaresipService: Service() {
|
|||||||
}
|
}
|
||||||
"registered" -> {
|
"registered" -> {
|
||||||
ua.status = if (Api.account_regint(ua.account.accp) == 0)
|
ua.status = if (Api.account_regint(ua.account.accp) == 0)
|
||||||
R.drawable.dot_white
|
R.drawable.circle_white
|
||||||
else
|
else
|
||||||
R.drawable.dot_green
|
R.drawable.circle_green
|
||||||
updateStatusNotification()
|
updateStatusNotification()
|
||||||
if (isMainVisible)
|
if (isMainVisible)
|
||||||
registrationUpdate.postValue(System.currentTimeMillis())
|
registrationUpdate.postValue(System.currentTimeMillis())
|
||||||
@ -638,9 +638,9 @@ class BaresipService: Service() {
|
|||||||
}
|
}
|
||||||
"registering failed" -> {
|
"registering failed" -> {
|
||||||
ua.status = if (Api.account_regint(ua.account.accp) == 0)
|
ua.status = if (Api.account_regint(ua.account.accp) == 0)
|
||||||
R.drawable.dot_white
|
R.drawable.circle_white
|
||||||
else
|
else
|
||||||
R.drawable.dot_red
|
R.drawable.circle_red
|
||||||
updateStatusNotification()
|
updateStatusNotification()
|
||||||
if (isMainVisible)
|
if (isMainVisible)
|
||||||
registrationUpdate.postValue(System.currentTimeMillis())
|
registrationUpdate.postValue(System.currentTimeMillis())
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package com.tutpro.baresip
|
|||||||
class UserAgent(val uap: Long) {
|
class UserAgent(val uap: Long) {
|
||||||
|
|
||||||
val account = Account(Api.ua_account(uap))
|
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 {
|
fun callAlloc(xCall: Long, videoMode: Int): Long {
|
||||||
return Api.ua_call_alloc(uap, xCall, videoMode)
|
return Api.ua_call_alloc(uap, xCall, videoMode)
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 469 B |
7
app/src/main/res/drawable/circle_green.xml
Normal file
7
app/src/main/res/drawable/circle_green.xml
Normal 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>
|
||||||
9
app/src/main/res/drawable/circle_red.xml
Normal file
9
app/src/main/res/drawable/circle_red.xml
Normal 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>
|
||||||
|
|
||||||
|
|
||||||
7
app/src/main/res/drawable/circle_white.xml
Normal file
7
app/src/main/res/drawable/circle_white.xml
Normal 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>
|
||||||
7
app/src/main/res/drawable/circle_yellow.xml
Normal file
7
app/src/main/res/drawable/circle_yellow.xml
Normal 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 |
@ -16,9 +16,9 @@
|
|||||||
<color name="colorStrong">@color/colorBlack</color>
|
<color name="colorStrong">@color/colorBlack</color>
|
||||||
<color name="colorGreen">#01df01</color>
|
<color name="colorGreen">#01df01</color>
|
||||||
<color name="colorRed">#ff0000</color>
|
<color name="colorRed">#ff0000</color>
|
||||||
<color name="colorTrafficGreen">#008450</color>
|
<color name="colorTrafficGreen">#43A047</color>
|
||||||
<color name="colorTrafficYellow">#EFB700</color>
|
<color name="colorTrafficYellow">#FDD835</color>
|
||||||
<color name="colorTrafficRed">#B81D13</color>
|
<color name="colorTrafficRed">#F44336</color>
|
||||||
<color name="colorLight">@color/colorWhite</color>
|
<color name="colorLight">@color/colorWhite</color>
|
||||||
<color name="colorDark">#383838</color>
|
<color name="colorDark">#383838</color>
|
||||||
<color name="colorSpinnerText">@color/colorDark</color>
|
<color name="colorSpinnerText">@color/colorDark</color>
|
||||||
|
|||||||
Reference in New Issue
Block a user