show help texts when account activity headings are clicked
This commit is contained in:
@ -92,7 +92,7 @@ class AccountActivity : AppCompatActivity() {
|
|||||||
mediaEnc = acc.mediaenc
|
mediaEnc = acc.mediaenc
|
||||||
val mediaEncSpinner = findViewById(R.id.mediaEncSpinner) as Spinner
|
val mediaEncSpinner = findViewById(R.id.mediaEncSpinner) as Spinner
|
||||||
val mediaEncKeys = arrayListOf("zrtp", "dtls_srtp", "srtp", "srtp-mand", "")
|
val mediaEncKeys = arrayListOf("zrtp", "dtls_srtp", "srtp", "srtp-mand", "")
|
||||||
val mediaEncVals = arrayListOf("ZRTP", "DTLS SRTP", "SRTP", "Madatory SRTP", "")
|
val mediaEncVals = arrayListOf("ZRTP", "DTLS SRTP", "SRTP", "Mandatory SRTP", "")
|
||||||
val keyIx = mediaEncKeys.indexOf(acc.mediaenc)
|
val keyIx = mediaEncKeys.indexOf(acc.mediaenc)
|
||||||
val keyVal = mediaEncVals.elementAt(keyIx)
|
val keyVal = mediaEncVals.elementAt(keyIx)
|
||||||
mediaEncKeys.removeAt(keyIx)
|
mediaEncKeys.removeAt(keyIx)
|
||||||
@ -282,6 +282,36 @@ class AccountActivity : AppCompatActivity() {
|
|||||||
} else return super.onOptionsItemSelected(item)
|
} else return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun onClick(v: View) {
|
||||||
|
Log.d("Baresip", "Account click on $v")
|
||||||
|
when (v) {
|
||||||
|
findViewById(R.id.DisplayNameTitle) -> {
|
||||||
|
Utils.alertView(this, "Display Name", getString(R.string.dispName))
|
||||||
|
}
|
||||||
|
findViewById(R.id.AuthUserTitle) -> {
|
||||||
|
Utils.alertView(this, "Authentication Username",
|
||||||
|
getString(R.string.authUser))
|
||||||
|
}
|
||||||
|
findViewById(R.id.AuthPassTitle) -> {
|
||||||
|
Utils.alertView(this, "Authentication Password",
|
||||||
|
getString(R.string.authPass))
|
||||||
|
}
|
||||||
|
findViewById(R.id.OutboundProxyTitle) -> {
|
||||||
|
Utils.alertView(this, "Outbound Proxies",
|
||||||
|
getString(R.string.obProxies))
|
||||||
|
}
|
||||||
|
findViewById(R.id.RegIntTitle) -> {
|
||||||
|
Utils.alertView(this, "Registration Interval", getString(R.string.regInt))
|
||||||
|
}
|
||||||
|
findViewById(R.id.AudioCodecsTitle) -> {
|
||||||
|
Utils.alertView(this, "Audio Codecs", getString(R.string.auCodecs))
|
||||||
|
}
|
||||||
|
findViewById(R.id.MediaEncTitle) -> {
|
||||||
|
Utils.alertView(this, "Media Encryption", getString(R.string.mediaEnc))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun checkDisplayName(dn: String): Boolean {
|
private fun checkDisplayName(dn: String): Boolean {
|
||||||
if (dn == "") return true
|
if (dn == "") return true
|
||||||
val dnRegex = Regex("^[a-zA-Z]([ ._-]|[a-zA-Z0-9]){1,63}\$")
|
val dnRegex = Regex("^[a-zA-Z]([ ._-]|[a-zA-Z0-9]){1,63}\$")
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
|
android:onClick="onClick"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:text="Display Name" >
|
android:text="Display Name" >
|
||||||
@ -41,6 +42,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
|
android:onClick="onClick"
|
||||||
android:text="Authentication Username" >
|
android:text="Authentication Username" >
|
||||||
</TextView>
|
</TextView>
|
||||||
|
|
||||||
@ -58,6 +60,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
|
android:onClick="onClick"
|
||||||
android:text="Authentication Password" >
|
android:text="Authentication Password" >
|
||||||
</TextView>
|
</TextView>
|
||||||
|
|
||||||
@ -76,6 +79,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
|
android:onClick="onClick"
|
||||||
android:text="Outbound Proxies" >
|
android:text="Outbound Proxies" >
|
||||||
</TextView>
|
</TextView>
|
||||||
|
|
||||||
@ -103,6 +107,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
|
android:onClick="onClick"
|
||||||
android:text="Registration Interval (sec)" >
|
android:text="Registration Interval (sec)" >
|
||||||
</TextView>
|
</TextView>
|
||||||
|
|
||||||
@ -120,6 +125,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
|
android:onClick="onClick"
|
||||||
android:text="Audio Codecs" >
|
android:text="Audio Codecs" >
|
||||||
</TextView>
|
</TextView>
|
||||||
|
|
||||||
@ -137,6 +143,7 @@
|
|||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
|
android:onClick="onClick"
|
||||||
android:text="Media Encryption" >
|
android:text="Media Encryption" >
|
||||||
</TextView>
|
</TextView>
|
||||||
|
|
||||||
|
|||||||
@ -7,5 +7,17 @@
|
|||||||
Juha Heinanen jh@tutpro.com\n\n
|
Juha Heinanen jh@tutpro.com\n\n
|
||||||
</string>
|
</string>
|
||||||
<string name="noAccounts">No accounts</string>
|
<string name="noAccounts">No accounts</string>
|
||||||
<string name="emptyString"></string>
|
<string name="dispName">Name (if any) used in From URI of outbound requests.</string>
|
||||||
|
<string name="authUser">Authentication username if required by outbound proxy.</string>
|
||||||
|
<string name="authPass">Authentication password if required by outbound proxy.</string>
|
||||||
|
<string name="obProxies">SIP URI of one or two proxies that must be used when sending requests.
|
||||||
|
If two is given, REGISTER requests are sent to both and other requests are sent to
|
||||||
|
one that responds. If no outbound proxy is given, requests are sent based on
|
||||||
|
DNS NAPTR/SRV/A record lookup of callee URI hostpart.\nExample:\nsip:foo.com:5060;transport=tls
|
||||||
|
</string>
|
||||||
|
<string name="regInt">Tells how often (in seconds) REGISTER requests are sent. Value 0
|
||||||
|
disables registration.
|
||||||
|
</string>
|
||||||
|
<string name="auCodecs">List of supported audio codecs in priority order.</string>
|
||||||
|
<string name="mediaEnc">Supported or required media encryption protocol.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user