Skip to content

Commit

Permalink
Merge pull request #184 from Ryosuke839/develop
Browse files Browse the repository at this point in the history
Release 2.14.1
  • Loading branch information
Ryosuke839 authored Sep 15, 2024
2 parents f2fd985 + a0cccce commit f9e13d6
Show file tree
Hide file tree
Showing 50 changed files with 1,063 additions and 702 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-26
- image: cimg/android:2024.01
environment:
JVM_OPTS: -Xmx3200m
steps:
Expand Down
10 changes: 10 additions & 0 deletions .idea/deploymentTargetDropDown.xml

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

3 changes: 1 addition & 2 deletions .idea/gradle.xml

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

22 changes: 19 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ android {

defaultConfig {
applicationId "jp.ddo.hotmist.unicodepad"
minSdkVersion 19
minSdkVersion 21
targetSdkVersion 34
versionCode 61
versionName "2.13.4"
versionCode 63
versionName "2.14.1"
}

compileOptions {
Expand All @@ -21,6 +21,14 @@ android {
jvmTarget = "1.8"
}

buildFeatures {
compose true
}

composeOptions {
kotlinCompilerExtensionVersion = "1.5.2"
}

buildTypes {
release {
shrinkResources true
Expand All @@ -47,6 +55,7 @@ android {
versionNameSuffix "-fdroid"
}
}
namespace 'jp.ddo.hotmist.unicodepad'
}

dependencies {
Expand All @@ -58,6 +67,13 @@ dependencies {
implementation 'com.github.woxthebox:draglistview:1.7.3'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'com.github.mreram:showcaseview:1.4.1'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'com.google.android.material:material:1.12.0'
debugImplementation 'androidx.compose.ui:ui-tooling'
implementation 'androidx.compose.ui:ui-android:1.6.5'
implementation 'androidx.activity:activity-compose:1.8.2'
implementation 'androidx.compose.material3:material3:1.2.1'
implementation 'androidx.compose.material:material-icons-extended:1.6.5'

playImplementation 'com.google.android.gms:play-services-ads-lite:22.3.0'
}
Expand Down
23 changes: 12 additions & 11 deletions app/src/fdroid/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="jp.ddo.hotmist.unicodepad"
android:installLocation="auto">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.PROCESS_TEXT" />
</intent>
</queries>

Expand Down Expand Up @@ -62,20 +61,22 @@

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>

<activity-alias
android:name="UnicodeActivityAlias"
android:targetActivity="UnicodeActivity"
android:enabled="true"
android:exported="true">

<intent-filter android:icon="@mipmap/ic_launcher">
<action android:name="android.intent.action.PROCESS_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
</activity-alias>

<activity android:name="SettingActivity"
android:parentActivityName=".UnicodeActivity" />
Expand Down
1 change: 0 additions & 1 deletion app/src/fdroid/res/layout/ad_container.xml

This file was deleted.

23 changes: 12 additions & 11 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="jp.ddo.hotmist.unicodepad"
android:installLocation="auto">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.PROCESS_TEXT" />
</intent>
</queries>

Expand Down Expand Up @@ -66,20 +65,22 @@

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>

<activity-alias
android:name="UnicodeActivityAlias"
android:targetActivity="UnicodeActivity"
android:enabled="true"
android:exported="true">

<intent-filter android:icon="@mipmap/ic_launcher">
<action android:name="android.intent.action.PROCESS_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
<meta-data android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
</activity-alias>

<activity android:name="SettingActivity"
android:parentActivityName=".UnicodeActivity" />
Expand Down
Binary file modified app/src/main/assets/namedb.zip
Binary file not shown.
15 changes: 12 additions & 3 deletions app/src/main/java/jp/ddo/hotmist/unicodepad/CharacterAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import android.widget.CheckBox
import android.widget.LinearLayout
import android.widget.ScrollView
import android.widget.TextView
import androidx.core.widget.NestedScrollView
import androidx.viewpager.widget.PagerAdapter
import java.nio.charset.Charset
import java.util.*
Expand Down Expand Up @@ -65,13 +66,15 @@ internal class CharacterAdapter(private val activity: UnicodeActivity, private v
text.setValid(ver != 0 && ver <= UnicodeActivity.univer)
val str = StringBuilder()
if (!emoji) str.append(adapter.getItem(position))
val textPadding = (6 * activity.resources.displayMetrics.scaledDensity).toInt()
for (i in 0 until if (!emoji) 10 else 7) {
if (emoji && i == 5) continue
if (i == 2) {
val v = if (!emoji) db.getInt(itemid, cols[i]) else db.getInt(adapter.getItemString(position), emjs[i])
val desc = TextView(activity)
desc.text = if (!emoji) mods[i].toString() + String.format(Locale.US, "%d.%d.%d", v / 100, v / 10 % 10, v % 10) + (if (v == 600) " or earlier" else "") else mode[i].toString() + String.format(Locale.US, "%d.%d", v / 100, v / 10 % 10)
desc.gravity = Gravity.CENTER_VERTICAL
desc.setPadding(textPadding, 0, textPadding, 0)
layout.addView(desc, LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
continue
}
Expand All @@ -87,6 +90,7 @@ internal class CharacterAdapter(private val activity: UnicodeActivity, private v
if (r == null && i == 0) {
val desc = TextView(activity)
desc.setText(R.string.notacharacter)
desc.setPadding(textPadding, 0, textPadding, 0)
layout.addView(desc, LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
break
}
Expand All @@ -108,8 +112,12 @@ internal class CharacterAdapter(private val activity: UnicodeActivity, private v
hl.orientation = LinearLayout.HORIZONTAL
hl.addView(desc, LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 1f))
hl.addView(fav, LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT))
hl.setPadding(textPadding, 0, textPadding, 0)
layout.addView(hl, LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
} else layout.addView(desc, LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
} else {
desc.setPadding(textPadding, 0, textPadding, 0)
layout.addView(desc, LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
}
continue
}
val hl = LinearLayout(activity)
Expand Down Expand Up @@ -196,14 +204,15 @@ internal class CharacterAdapter(private val activity: UnicodeActivity, private v
}
hl.setBackgroundResource(reslist)
}
hl.setPadding(textPadding, 0, textPadding, 0)
layout.addView(hl, LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
}
}
val scroll = ScrollView(activity)
val scroll = NestedScrollView(activity)
scroll.addView(layout)
collection.addView(scroll)
collection.findViewById<View>(R.id.TAB_ID).measure(MeasureSpec.makeMeasureSpec(10, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED))
layout.setPadding(0, 0, 0, collection.findViewById<View>(R.id.TAB_ID).measuredHeight * 2)
scroll.setTag(R.id.TAB_ID, position)
return scroll
}

Expand Down
Loading

0 comments on commit f9e13d6

Please sign in to comment.