Skip to content

Commit

Permalink
Merge pull request #94 from Ryosuke839/develop
Browse files Browse the repository at this point in the history
Release 2.10.4
  • Loading branch information
Ryosuke839 authored Sep 23, 2021
2 parents bc4dd16 + 82153c2 commit 1bb4fd6
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "jp.ddo.hotmist.unicodepad"
minSdkVersion 16
targetSdkVersion 30
versionCode 49
versionName "2.10.2"
versionCode 51
versionName "2.10.4"
}

compileOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ internal class CharacterAdapter(private val activity: UnicodeActivity, private v
hl.isFocusable = true
hl.setOnClickListener { view ->
var j = 0
while (j < str.length) {
val code = str.codePointAt(j)
while (j < cs.length) {
val code = cs.codePointAt(j)
activity.adpPage.onItemClick(null, view, -1, code.toLong())
j += Character.charCount(code)
}
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/java/jp/ddo/hotmist/unicodepad/EmojiAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ internal class EmojiAdapter(activity: Activity, pref: SharedPreferences, private
}

override fun getItem(i: Int): String {
return getItemString(i).split(" ").joinToString("") { String(Character.toChars(it.toInt(16))) }
return getItemString(i).let {
if (it != "")
it.split(" ").joinToString("") { String(Character.toChars(it.toInt(16))) }
else
""
}
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/jp/ddo/hotmist/unicodepad/FontChooser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class FontChooser internal constructor(private val activity: Activity, private v
if (adapter.count < 3) adapter.add(activity.resources.getString(R.string.rem))

// Remove duplicated items
for (i in fontPaths.indices) {
for (i in fontPaths.indices.reversed()) {
if (path != fontPaths[i]) continue
adapter.remove(adapter.getItem(i + 3))
fontPaths.removeAt(i)
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/java/jp/ddo/hotmist/unicodepad/PageAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class PageAdapter(private val activity: UnicodeActivity, private val pref: Share
return view === `object`
}

override fun onItemClick(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
override fun onItemClick(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
if (parent == null || id != -1L) {
adapterRecent.add(id.toInt())
if (recpage != -1 && page != recpage) views[recpage]?.invalidateViews()
Expand All @@ -153,6 +153,9 @@ class PageAdapter(private val activity: UnicodeActivity, private val pref: Share
val end = edit.selectionEnd
if (start == -1) return
edit.editableText.replace(min(start, end), max(start, end), if (parent == null || id != -1L) String(Character.toChars(id.toInt())) else parent.adapter.getItem(position) as String)
dlg?.let {
if (it.isShowing) it.dismiss()
}
}

override fun onItemLongClick(parent: AdapterView<*>, view: View, position: Int, id: Long): Boolean {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
Copyright © 1991-2021 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in
http://www.unicode.org/copyright.html.</string>
<string name="legal_app">UnicodePad 2.10.2</string>
<string name="legal_app">UnicodePad 2.10.4</string>
<string name="legal_app2">UnicodePad is licensed under the Apache License, Version2.0
https://github.com/Ryosuke839/UnicodePad</string>
<string name="locale_default">デフォルト (%s)</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ka/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
Copyright © 1991-2021 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in
http://www.unicode.org/copyright.html.</string>
<string name="legal_app">UnicodePad 2.10.2</string>
<string name="legal_app">UnicodePad 2.10.4</string>
<string name="legal_app2">UnicodePad არის ლიცენზირებული Apache License, ვერსია2.0-ით
https://github.com/Ryosuke839/UnicodePad</string>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values-ko/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@
Copyright © 1991-2021 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in
http://www.unicode.org/copyright.html.</string>
<string name="legal_app">UnicodePad 2.10.2</string>
<string name="legal_app">UnicodePad 2.10.4</string>
<string name="legal_app2">UnicodePad is licensed under the Apache License, Version2.0
https://github.com/Ryosuke839/UnicodePad</string>
<string name="locale_default">기본 (%s)</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-sv/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
Copyright © 1991-2021 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in
http://www.unicode.org/copyright.html.</string>
<string name="legal_app">UnicodePad 2.10.2</string>
<string name="legal_app">UnicodePad 2.10.4</string>
<string name="legal_app2">UnicodePad är licensierad under Apache-licensen, version2.0
https://github.com/Ryosuke839/UnicodePad</string>
<string name="no_ad_desc">Visa inte annonser</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@
Copyright © 1991-2021 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in
http://www.unicode.org/copyright.html.</string>
<string name="legal_app">UnicodePad 2.10.2</string>
<string name="legal_app">UnicodePad 2.10.4</string>
<string name="legal_app2">UnicodePad 使用 Apache 2.0 许可证
https://github.com/Ryosuke839/UnicodePad</string>
<string name="no_ad_desc">不显示广告</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@
Copyright © 1991-2021 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in
http://www.unicode.org/copyright.html.</string>
<string name="legal_app">UnicodePad 2.10.2</string>
<string name="legal_app">UnicodePad 2.10.4</string>
<string name="legal_app2">UnicodePad is licensed under the Apache License, Version2.0
https://github.com/Ryosuke839/UnicodePad</string>
<string name="locale_default">預設值 (%s)</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
Copyright © 1991-2021 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in
http://www.unicode.org/copyright.html.</string>
<string name="legal_app">UnicodePad 2.10.2</string>
<string name="legal_app">UnicodePad 2.10.4</string>
<string name="legal_app2">UnicodePad is licensed under the Apache License, Version2.0
https://github.com/Ryosuke839/UnicodePad</string>
</resources>

0 comments on commit 1bb4fd6

Please sign in to comment.