Skip to content

Commit

Permalink
Merge pull request #21 from onstonboy/develop
Browse files Browse the repository at this point in the history
1.0.7
  • Loading branch information
onstonboy authored Oct 1, 2019
2 parents 338ba2c + f332617 commit ecfe215
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 53 deletions.
Binary file modified .gradle/5.4.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/5.4.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/5.4.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/5.4.1/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
86 changes: 34 additions & 52 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion ccp/src/main/java/com/ccc/ccp/Country.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@ data class Country(

fun loadCountryDataFromXML(context: Context, languageCode: String): List<Country> {
val countries = ArrayList<Country>()
val defaultLanguage = if (languageCode == "vi" || languageCode == "en") {
languageCode
} else {
"en"
}
try {
val xmlFactoryObject = XmlPullParserFactory.newInstance()
val xmlPullParser = xmlFactoryObject.newPullParser()
val ins = context.resources.openRawResource(
context.resources
.getIdentifier(
"ccp_$languageCode",
"ccp_$defaultLanguage",
"raw", context.packageName
)
)
Expand Down

0 comments on commit ecfe215

Please sign in to comment.