Closed absir1949 closed 4 years ago
I would, but unfortunately I don't know how don't know how that system works, but I will do some research, If anyone can help, please let me know.
@8bitPit I think it is a good idea to convert Chinese characters into pinyin first. Pinyin is like an English letter, such as "百度" = "Baidu". Or you can refer to Project(Pinyin), Project(PinyinOrder), Article(Android PinyinOrder) and Article(Android SQL Chinese Order)(sorry I have not studied programming, but those looks reliable.) Anyway, the concept of this launcher is great, thank you for your wonderful job, and look forward to the emergence of Chinese sorting!
Chinese user need this
http://pinyin4j.sourceforge.net/ I think this may help you.
@xrkxrk sadly, I cannot use your suggested library, since it's licensed under the copyleft GNU license.
@OldFanta thanks for your help. However, Pinyin libraries hafe to be written in Java / Kotlin, so they can be used for Android apps.
I could use: https://github.com/promeG/TinyPinyin or https://github.com/KyleTang/JPinYin.
I could use: https://github.com/promeG/TinyPinyin or https://github.com/KyleTang/JPinYin.
I am very glad to hear this news, thank you very much. Looking forward to seeing in the follow-up update!
I could use: https://github.com/promeG/TinyPinyin or https://github.com/KyleTang/JPinYin.
Thanks a million, Look forward to your success!
look forward to your success,and i also expect that searching app can fuzzy query by Chinese Pinyin。
like it very much @8bitPit (づ ̄3 ̄)づ╭❤~
@xinkunZ also suggested a library to support pinyin: https://github.com/belerweb/pinyin4j
@8bitPit If you choose pinyin4j to translate app name to pinyin, there is an example
private String getPinyin(String appName, String defaultName) {
try {
HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat();
format.setCaseType(HanyuPinyinCaseType.LOWERCASE);
format.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
StringBuilder sb = new StringBuilder();
char[] chars = appName.toCharArray();
for (char aChar : chars) {
String[] strings = PinyinHelper.toHanyuPinyinStringArray(aChar, format);
if (strings != null && strings.length > 0) {
sb.append(strings[0]);
} else {
sb.append(aChar);
}
}
return sb.toString();
} catch (Exception e) {
return defaultName;
}
}
System.out.println(getPinyin("中国", "中国"));
,then you can get 'zhongguo' in console
And you can check Chinese pinyin use google translate
Also, if you add app search in home page, I hope you can support use pinyin to search apps
Really like this launcher!! Thanks!
Thanks for helping @xinkunZ :)
Honestly, TinyPinyin seems to be the best option for me. Especially since it has low memory requirements and is said to be a lot faster. @8bitPit
Maybe you can try this https://www.cnblogs.com/goloving/p/7662676.html
I've discovered Android has an inbuilt Pinyin transliterator. It is somewhat hidden inside the framework, but I can use it on Android 7 and above. So no library is need, thanks for all your suggestions though.
Implemented in v0.9.9: https://github.com/8bitPit/Niagara-Issues/releases
just like microsoft lanuacher.
it will combine Letters and Pinyin.