mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-02-19 04:50:53 +01:00
Merge branch 'master' into weblate-simple-mobile-tools-simple-dialer
This commit is contained in:
commit
42c04fcd50
@ -158,6 +158,7 @@ class CallActivity : SimpleActivity() {
|
||||
|
||||
val newRoute = if (isSpeakerOn) CallAudioState.ROUTE_SPEAKER else CallAudioState.ROUTE_EARPIECE
|
||||
CallManager.inCallService?.setAudioRoute(newRoute)
|
||||
call_toggle_speaker.contentDescription = getString(if (isSpeakerOn) R.string.turn_speaker_off else R.string.turn_speaker_on)
|
||||
}
|
||||
|
||||
private fun toggleMicrophone() {
|
||||
@ -166,6 +167,7 @@ class CallActivity : SimpleActivity() {
|
||||
call_toggle_microphone.setImageDrawable(getDrawable(drawable))
|
||||
audioManager.isMicrophoneMute = !isMicrophoneOn
|
||||
CallManager.inCallService?.setMuted(!isMicrophoneOn)
|
||||
call_toggle_microphone.contentDescription = getString(if (isMicrophoneOn) R.string.turn_microphone_off else R.string.turn_microphone_on)
|
||||
}
|
||||
|
||||
private fun toggleDialpadVisibility() {
|
||||
|
@ -299,6 +299,7 @@ class MainActivity : SimpleActivity() {
|
||||
skippedTabs++
|
||||
} else {
|
||||
val tab = main_tabs_holder.newTab().setIcon(getTabIcon(index))
|
||||
tab.contentDescription = getTabContentDescription(index)
|
||||
val wasAlreadySelected = selectedTabIndex > -1 && selectedTabIndex == index - skippedTabs
|
||||
val shouldSelect = !isAnySelected && wasAlreadySelected
|
||||
if (shouldSelect) {
|
||||
@ -324,6 +325,16 @@ class MainActivity : SimpleActivity() {
|
||||
return resources.getColoredDrawableWithColor(drawableId, config.textColor)
|
||||
}
|
||||
|
||||
private fun getTabContentDescription(position: Int): String {
|
||||
val stringId = when (position) {
|
||||
0 -> R.string.contacts_tab
|
||||
1 -> R.string.favorites_tab
|
||||
else -> R.string.call_history_tab
|
||||
}
|
||||
|
||||
return resources.getString(stringId)
|
||||
}
|
||||
|
||||
private fun refreshItems(openLastTab: Boolean = false) {
|
||||
if (isDestroyed || isFinishing) {
|
||||
return
|
||||
|
@ -126,6 +126,7 @@
|
||||
android:layout_width="@dimen/dialpad_button_size"
|
||||
android:layout_height="@dimen/dialpad_button_size"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/show_dialpad"
|
||||
android:padding="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_dialpad_vector"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -139,7 +140,7 @@
|
||||
android:id="@+id/call_end"
|
||||
android:layout_width="@dimen/dialpad_button_size"
|
||||
android:layout_height="@dimen/dialpad_button_size"
|
||||
android:contentDescription="@string/decline"
|
||||
android:contentDescription="@string/end_call"
|
||||
android:src="@drawable/ic_call_decline"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -159,7 +160,7 @@
|
||||
android:id="@+id/call_decline"
|
||||
android:layout_width="@dimen/incoming_call_button_size"
|
||||
android:layout_height="@dimen/incoming_call_button_size"
|
||||
android:contentDescription="@string/decline"
|
||||
android:contentDescription="@string/decline_call"
|
||||
android:src="@drawable/ic_call_decline"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -183,7 +184,7 @@
|
||||
android:id="@+id/call_accept"
|
||||
android:layout_width="@dimen/incoming_call_button_size"
|
||||
android:layout_height="@dimen/incoming_call_button_size"
|
||||
android:contentDescription="@string/accept"
|
||||
android:contentDescription="@string/accept_call"
|
||||
android:src="@drawable/ic_call_accept"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -241,6 +242,7 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginEnd="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/hide_dialpad"
|
||||
android:padding="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_cross_vector" />
|
||||
</RelativeLayout>
|
||||
|
@ -99,6 +99,7 @@
|
||||
android:layout_height="@dimen/dialpad_button_size"
|
||||
android:layout_marginBottom="@dimen/activity_margin"
|
||||
android:background="@drawable/circle_background"
|
||||
android:contentDescription="@string/call_number"
|
||||
android:elevation="@dimen/medium_margin"
|
||||
android:padding="@dimen/normal_margin"
|
||||
android:src="@drawable/ic_phone_vector"
|
||||
|
@ -28,6 +28,7 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="@dimen/activity_margin"
|
||||
android:background="@drawable/circle_background"
|
||||
android:contentDescription="@string/dialpad"
|
||||
android:elevation="@dimen/medium_margin"
|
||||
android:padding="@dimen/activity_margin"
|
||||
android:src="@drawable/ic_dialpad_vector" />
|
||||
|
@ -16,6 +16,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/one"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/dialpad_2_holder"
|
||||
app:layout_constraintEnd_toStartOf="@+id/dialpad_2_holder"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -37,6 +38,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/two"
|
||||
app:layout_constraintBottom_toTopOf="@+id/dialpad_5_holder"
|
||||
app:layout_constraintEnd_toStartOf="@+id/dialpad_3_holder"
|
||||
app:layout_constraintStart_toEndOf="@+id/dialpad_1_holder">
|
||||
@ -67,6 +69,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/three"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/dialpad_2_holder"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/dialpad_2_holder"
|
||||
@ -98,6 +101,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/four"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/dialpad_5_holder"
|
||||
app:layout_constraintEnd_toStartOf="@+id/dialpad_5_holder"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -129,6 +133,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/five"
|
||||
app:layout_constraintBottom_toTopOf="@+id/dialpad_8_holder"
|
||||
app:layout_constraintEnd_toStartOf="@+id/dialpad_6_holder"
|
||||
app:layout_constraintStart_toEndOf="@+id/dialpad_4_holder">
|
||||
@ -159,6 +164,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/six"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/dialpad_5_holder"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/dialpad_5_holder"
|
||||
@ -190,6 +196,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/seven"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/dialpad_8_holder"
|
||||
app:layout_constraintEnd_toStartOf="@+id/dialpad_8_holder"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -221,6 +228,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/eight"
|
||||
app:layout_constraintBottom_toTopOf="@+id/dialpad_0_holder"
|
||||
app:layout_constraintEnd_toStartOf="@+id/dialpad_9_holder"
|
||||
app:layout_constraintStart_toEndOf="@+id/dialpad_7_holder">
|
||||
@ -251,6 +259,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/nine"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/dialpad_8_holder"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/dialpad_8_holder"
|
||||
@ -282,6 +291,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/asterisk"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/dialpad_0_holder"
|
||||
app:layout_constraintEnd_toStartOf="@+id/dialpad_0_holder"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -303,6 +313,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/zero"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/dialpad_hashtag_holder"
|
||||
app:layout_constraintStart_toEndOf="@+id/dialpad_asterisk_holder">
|
||||
@ -337,6 +348,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/hashtag"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/dialpad_0_holder"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/dialpad_0_holder"
|
||||
|
@ -19,6 +19,7 @@
|
||||
<string name="dialpad">Číselník</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Telefon</string>
|
||||
<string name="accept">Přijmout</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Numerisk tastatur</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Opkald</string>
|
||||
|
@ -19,6 +19,7 @@
|
||||
<string name="dialpad">Wählpad</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Telefon</string>
|
||||
<string name="accept">akzeptieren</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Πληκτρολόγιο κλήσης</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Κλήση</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Teclado de marcado</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Marcador</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Numerovalitsin</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Puhelin</string>
|
||||
|
@ -19,6 +19,7 @@
|
||||
<string name="dialpad">Pavé numérique</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Compositeur</string>
|
||||
<string name="accept">Accepter</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Marcador</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Marcador</string>
|
||||
|
@ -19,6 +19,7 @@
|
||||
<string name="dialpad">Tárcsázó</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Tárcsázó</string>
|
||||
<string name="accept">Fogadás</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Tombol nomor</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Dialer</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Tastierino numerico</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Compositore</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">ダイヤルパッド</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">ダイヤラー</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">ഡയൽപാഡ്</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">ഡയലർ</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Toetsenblok</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Telefoon</string>
|
||||
|
@ -19,6 +19,7 @@
|
||||
<string name="dialpad">Panel wybierania</string>
|
||||
<string name="asterisk">Gwiazdka</string>
|
||||
<string name="hashtag">Kratka</string>
|
||||
<string name="call_number">Call number</string>
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Telefon</string>
|
||||
<string name="accept">Odbierz</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Marcador</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Marcador</string>
|
||||
|
@ -19,6 +19,7 @@
|
||||
<string name="dialpad">Номеронабиратель</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Телефон</string>
|
||||
<string name="accept">Принять</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Číselník</string>
|
||||
<string name="asterisk">Hviezdička</string>
|
||||
<string name="hashtag">Mriežka</string>
|
||||
<string name="call_number">Zavolať číslo</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Telefón</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Knappsats</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Telefon</string>
|
||||
|
@ -19,6 +19,7 @@
|
||||
<string name="dialpad">Tuş takımı</string>
|
||||
<string name="asterisk">Yıldız işareti</string>
|
||||
<string name="hashtag">Kare işareti</string>
|
||||
<string name="call_number">Call number</string>
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Çevirici</string>
|
||||
<string name="accept">Kabul Et</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Dialpad</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Dialer</string>
|
||||
|
@ -19,6 +19,7 @@
|
||||
<string name="dialpad">拨号盘</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">拨号器</string>
|
||||
<string name="accept">接听</string>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<string name="dialpad">Dialpad</string>
|
||||
<string name="asterisk">Asterisk</string>
|
||||
<string name="hashtag">Hashtag</string>
|
||||
<string name="call_number">Call number</string>
|
||||
|
||||
<!-- Dialer -->
|
||||
<string name="dialer">Dialer</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user