-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add language option in create and restore view (Scroll Language in In…
…tro Activity) (#167) * Added audios and audios data source * Changed Intro's UI, Added Adapter, and Added country resources. * Convert CountryLanguageAdapter to Kotlin, added shadow and made text item bold when selected * Added audio feature to play the language on each item * Added pop up yes or no UI * Added pop up yes or cancel * Change text's sizes
- Loading branch information
Showing
42 changed files
with
739 additions
and
137 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/breadwallet/entities/CountryAudio.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.breadwallet.entities | ||
|
||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class AudioRes | ||
|
||
data class CountryAudio( | ||
val langDescription : String, | ||
val langQuestion : String, | ||
@AudioRes val langAudio : Int | ||
) |
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/breadwallet/entities/IntroLanguage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.breadwallet.entities | ||
|
||
import android.net.Uri | ||
|
||
data class IntroLanguage( | ||
val lang : String, | ||
val desc : String, | ||
val audio : Int, | ||
val message: String, | ||
) |
24 changes: 24 additions & 0 deletions
24
app/src/main/java/com/breadwallet/entities/IntroLanguageResource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.breadwallet.entities | ||
|
||
import com.breadwallet.R | ||
|
||
class IntroLanguageResource { | ||
|
||
fun loadResources() : Array<IntroLanguage>{ | ||
return arrayOf<IntroLanguage> ( | ||
IntroLanguage(Language.ENGLISH.title, "The most secure and safest way to use Litecoin.", R.raw.english, "Are you sure you want to change the language to English?"), | ||
IntroLanguage(Language.SPANISH.title, "La forma más segura de usar Litecoin.", R.raw.spanish, "¿Estás seguro de que quieres cambiar el idioma a español?"), | ||
IntroLanguage(Language.INDONESIAN.title, "Cara paling aman dan teraman untuk menggunakan Litecoin.", R.raw.bahasaindonesia, "Yakin ingin mengubah bahasanya ke bahasa Indonesia?"), | ||
IntroLanguage(Language.GERMAN.title, "Die sicherste Option zur Nutzung von Litecoin.", R.raw.deutsch, "Sind Sie sicher, dass Sie die Sprache auf Deutsch ändern möchten?"), | ||
IntroLanguage(Language.UKRAINIAN.title, "Найбезпечніший і найбезпечніший спосіб використання Litecoin.", R.raw.ukrainian, "Ви впевнені, що хочете змінити мову на українську?"), | ||
IntroLanguage(Language.CHINESE_TRADITIONAL.title, "使用萊特幣最安全、最有保障的方式。", R.raw.traditionalchinese, "您確定要將語言改為中文嗎?"), | ||
IntroLanguage(Language.ITALIAN.title, "Il modo più sicuro per usare i Litecoin.", R.raw.italiano, "Sei sicuro di voler cambiare la lingua in italiano?"), | ||
IntroLanguage(Language.KOREAN.title, "Litecoin을 사용하는 가장 안정되고 안전한 방법.", R.raw.korean, "언어를 한국어로 변경하시겠습니까?"), | ||
IntroLanguage(Language.FRENCH.title, "La façon la plus sécurisée et sûre d'utiliser Litecoin.", R.raw.french, "Êtes-vous sûr de vouloir changer la langue en français ?"), | ||
IntroLanguage(Language.TURKISH.title, "Litecoin'i kullanmanın en güvenli ve en güvenli yolu.", R.raw.turkish, "Dili türkçeye değiştirmek istediğinizden emin misiniz?"), | ||
IntroLanguage(Language.JAPANESE.title, "最も安全にリテコインを使う手段。", R.raw.japanese, "言語を日本語に変更してもよろしいですか?"), | ||
IntroLanguage(Language.PORTUGUESE.title, "A forma mais protegida e segura de utilizar a Litecoin.", R.raw.portugues, "Tem certeza de que deseja alterar o idioma para português?"), | ||
IntroLanguage(Language.RUSSIAN.title, "Самый надежный и безопасный способ использования биткойна.", R.raw.russian, "Вы уверены, что хотите сменить язык на русский?") | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
package com.breadwallet.entities | ||
|
||
import com.breadwallet.R | ||
import java.util.Locale | ||
|
||
|
||
/** Litewallet | ||
* Created by Mohamed Barry on 7/19/21 | ||
* email: [email protected] | ||
* Copyright © 2021 Litecoin Foundation. All rights reserved. | ||
*/ | ||
enum class Language(val code: String, val title: String, val desc: String) { | ||
GERMAN("de", "Deutsch", "Sprache auswählen"), | ||
enum class Language( | ||
val code: String, | ||
val title: String, | ||
val desc: String | ||
) { | ||
ENGLISH("en", "English", "Select language"), | ||
GERMAN("de", "Deutsch", "Sprache auswählen"), | ||
SPANISH("es", "Español", "Seleccione el idioma"), | ||
FRENCH("fr", "Français", "Sélectionner la langue"), | ||
INDONESIAN("in", "Indonesia", "Pilih bahasa"), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.