-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from vadiole/dev
Release 1.4.0
- Loading branch information
Showing
60 changed files
with
2,179 additions
and
413 deletions.
There are no files selected for viewing
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
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
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
This file was deleted.
Oops, something went wrong.
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,13 +1,34 @@ | ||
package vadiole.unicode | ||
|
||
import android.annotation.SuppressLint | ||
import android.app.Application | ||
import vadiole.unicode.data.UnicodeStorage | ||
import vadiole.unicode.data.config.UserConfig | ||
import vadiole.unicode.ui.theme.ThemeManager | ||
import vadiole.unicode.ui.theme.blue_dark | ||
import vadiole.unicode.ui.theme.blue_light | ||
import vadiole.unicode.utils.extension.isDarkMode | ||
|
||
@SuppressLint("StaticFieldLeak") | ||
class UnicodeApp : Application() { | ||
private var _appComponent: AppComponent? = null | ||
val appComponent: AppComponent get() = requireNotNull(_appComponent) { "app isn not created yet" } | ||
|
||
override fun onCreate() { | ||
super.onCreate() | ||
_appComponent = AppComponent(this) | ||
unicodeStorageInternal = UnicodeStorage(this) | ||
userConfigInternal = UserConfig(this) | ||
themeManagerInternal = ThemeManager(if (resources.configuration.isDarkMode) blue_dark else blue_light) | ||
} | ||
} | ||
|
||
companion object { | ||
private var unicodeStorageInternal: UnicodeStorage? = null | ||
val unicodeStorage: UnicodeStorage | ||
get() = requireNotNull(unicodeStorageInternal) | ||
|
||
private var userConfigInternal: UserConfig? = null | ||
val userConfig: UserConfig | ||
get() = requireNotNull(userConfigInternal) | ||
private var themeManagerInternal: ThemeManager? = null | ||
val themeManager: ThemeManager | ||
get() = requireNotNull(themeManagerInternal) | ||
} | ||
} |
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
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,16 +1,16 @@ | ||
package vadiole.unicode.data | ||
|
||
import java.util.Locale | ||
import vadiole.unicode.utils.extension.leftPad | ||
import java.util.* | ||
|
||
class CharObj(val id: Int, val codePoint: Int, val name: String, val version: String, val blockName: String) { | ||
val char: String = String(Character.toChars(codePoint)) | ||
val hex = codePoint.toString(16).uppercase(Locale.ENGLISH).leftPad(4, '0') | ||
class CharObj(val id: Int, val codePointRaw: Int, val name: String, val version: String, val blockName: String) { | ||
val char: String = String(Character.toChars(codePointRaw)) | ||
val hex = codePointRaw.toString(16).uppercase(Locale.ENGLISH).leftPad(4, '0') | ||
val infoValues: Array<String> = arrayOf( | ||
"U+$hex", | ||
"&#$codePoint", | ||
"&#$codePointRaw", | ||
"\\$hex", | ||
version, | ||
) | ||
val link = "vadiole.github.io/unicode?c=$codePoint" | ||
} | ||
val link = "vadiole.github.io/unicode?c=$codePointRaw" | ||
} |
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
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,3 @@ | ||
package vadiole.unicode.data | ||
|
||
class SearchResult(val codePoint: CodePoint,val name: String) |
Oops, something went wrong.