Fix: #2 and installation failed on arm device
This commit is contained in:
+3
-13
@@ -1,30 +1,21 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
signingConfigs {
|
||||
release {
|
||||
keyAlias 'kiva'
|
||||
keyPassword 'k12fd15dp'
|
||||
storeFile file('docs/kiva.keystore')
|
||||
storePassword 'k12fd15dp'
|
||||
}
|
||||
}
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "25.0.2"
|
||||
defaultConfig {
|
||||
applicationId "io.neoterm"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 25
|
||||
versionCode 18
|
||||
versionName "1.2.0-rc7"
|
||||
versionCode 19
|
||||
versionName "1.2.0-rc8"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
resConfigs "zh-rCN", "zh-rTW"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
cppFlags "-std=c++11"
|
||||
abiFilters 'x86', 'x86_64', 'arm64-v8a'
|
||||
abiFilters 'x86_64', 'arm64-v8a', 'armeabi-v7a'
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
@@ -39,7 +30,6 @@ android {
|
||||
zipAlignEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
proguardFile 'app/proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
android:name=".App"
|
||||
android:allowBackup="true"
|
||||
android:extractNativeLibs="true"
|
||||
android:resizeableActivity="true"
|
||||
android:fullBackupContent="@xml/backup_config"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:resizeableActivity="true"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
@@ -130,6 +130,10 @@
|
||||
<meta-data
|
||||
android:name="com.sec.android.support.multiwindow"
|
||||
android:value="true" />
|
||||
|
||||
<meta-data
|
||||
android:name="android.app.shortcuts"
|
||||
android:resource="@xml/shortcuts" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
Binary file not shown.
@@ -4,16 +4,14 @@ import android.content.Context
|
||||
import android.graphics.Typeface
|
||||
import android.util.AttributeSet
|
||||
import android.view.*
|
||||
import android.widget.Button
|
||||
import android.widget.GridLayout
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.ToggleButton
|
||||
import io.neoterm.R
|
||||
import io.neoterm.customize.eks.EksConfigParser
|
||||
import io.neoterm.preference.NeoPreference
|
||||
import io.neoterm.ui.term.event.ToggleImeEvent
|
||||
import io.neoterm.view.eks.button.ControlButton
|
||||
import io.neoterm.view.eks.button.IExtraButton
|
||||
import io.neoterm.view.eks.button.RepeatableButton
|
||||
import io.neoterm.view.eks.button.StatedControlButton
|
||||
import io.neoterm.view.eks.impl.ArrowButton
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
@@ -40,6 +38,7 @@ class ExtraKeysView(context: Context, attrs: AttributeSet) : LinearLayout(contex
|
||||
private val MAX_BUTTONS_PER_LINE = 7
|
||||
private val DEFAULT_ALPHA = 0.8f
|
||||
private val EXPANDED_ALPHA = 0.5f
|
||||
private val USER_KEYS_BUTTON_LINE_START = 2
|
||||
}
|
||||
|
||||
private val builtinKeys = mutableListOf<IExtraButton>()
|
||||
@@ -64,6 +63,7 @@ class ExtraKeysView(context: Context, attrs: AttributeSet) : LinearLayout(contex
|
||||
alpha = DEFAULT_ALPHA
|
||||
gravity = Gravity.TOP
|
||||
orientation = LinearLayout.VERTICAL
|
||||
typeface = Typeface.createFromAsset(context.assets, "eks_font.ttf")
|
||||
|
||||
initBuiltinKeys()
|
||||
loadDefaultUserKeys()
|
||||
@@ -141,10 +141,9 @@ class ExtraKeysView(context: Context, attrs: AttributeSet) : LinearLayout(contex
|
||||
|
||||
private fun updateButtonBars() {
|
||||
removeAllViews()
|
||||
|
||||
buttonBars.asReversed()
|
||||
.forEach {
|
||||
addView(it)
|
||||
}
|
||||
.forEach { addView(it) }
|
||||
}
|
||||
|
||||
private fun expandButtonPanel(forceSetExpanded: Boolean? = null) {
|
||||
@@ -156,16 +155,26 @@ class ExtraKeysView(context: Context, attrs: AttributeSet) : LinearLayout(contex
|
||||
val visibility = if (buttonPanelExpanded) View.VISIBLE else View.GONE
|
||||
alpha = if (buttonPanelExpanded) EXPANDED_ALPHA else DEFAULT_ALPHA
|
||||
|
||||
for (i in 2..buttonBars.size - 1) {
|
||||
buttonBars[i].visibility = visibility
|
||||
}
|
||||
IntRange(USER_KEYS_BUTTON_LINE_START, buttonBars.size - 1)
|
||||
.map { buttonBars[it] }
|
||||
.forEach { it.visibility = visibility }
|
||||
}
|
||||
|
||||
private fun createNewButtonBar(): LinearLayout {
|
||||
val line = LinearLayout(context)
|
||||
|
||||
val layoutParams =
|
||||
if (NeoPreference.loadBoolean(R.string.key_ui_eks_weight_explicit, false))
|
||||
LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0, 1f)
|
||||
else
|
||||
LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||
|
||||
layoutParams.setMargins(0, 0, 0, 0)
|
||||
line.setPadding(0, 0, 0, 0)
|
||||
line.gravity = Gravity.START
|
||||
line.orientation = LinearLayout.HORIZONTAL
|
||||
line.layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0, 1f)
|
||||
line.layoutParams = layoutParams
|
||||
return line
|
||||
}
|
||||
|
||||
@@ -191,14 +200,13 @@ class ExtraKeysView(context: Context, attrs: AttributeSet) : LinearLayout(contex
|
||||
param.setGravity(Gravity.CENTER)
|
||||
param.width = calculateButtonWidth()
|
||||
param.height = context.resources.getDimensionPixelSize(R.dimen.eks_height)
|
||||
param.topMargin = 0
|
||||
param.rightMargin = 0
|
||||
param.leftMargin = 0
|
||||
param.bottomMargin = 0
|
||||
param.setMargins(0, 0, 0, 0)
|
||||
|
||||
outerButton.layoutParams = param
|
||||
outerButton.maxLines = 1
|
||||
outerButton.typeface = typeface
|
||||
outerButton.text = extraButton.buttonText
|
||||
outerButton.setPadding(0, 0, 0, 0)
|
||||
outerButton.setTextColor(IExtraButton.NORMAL_TEXT_COLOR)
|
||||
outerButton.setAllCaps(false)
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
<string name="pref_ui_hide_toolbar_desc">键盘显示时隐藏标题栏</string>
|
||||
<string name="pref_ui_suggestions">显示建议 (需要 oh-my-zsh)</string>
|
||||
<string name="pref_ui_suggestions_desc">使用一些软件时,屏幕下方显示快捷键</string>
|
||||
<string name="pref_ui_wide_char_weight_explicit">为宽字符设置权重</string>
|
||||
<string name="pref_ui_wide_char_weight_explicit_desc">如果快捷输入栏显示不正确,请勾选本项</string>
|
||||
<string name="pref_ui_eks_weight_explicit">为快捷键盘强制设置权重</string>
|
||||
<string name="pref_ui_eks_weight_explicit_desc">如果快捷键盘显示不正确,请勾选本项</string>
|
||||
<string name="pref_customization_color_scheme">配色方案</string>
|
||||
<string name="pref_customization_font">字体</string>
|
||||
<string name="settings">设置</string>
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
<string name="pref_ui_hide_toolbar_desc">在鍵盤顯示時隱藏標題欄</string>
|
||||
<string name="pref_ui_suggestions">顯示建議 (需要 oh-my-zsh)</string>
|
||||
<string name="pref_ui_suggestions_desc">使用一些程式時,在螢幕底部顯示快捷鍵</string>
|
||||
<string name="pref_ui_wide_char_weight_explicit">為寬字元設定權重</string>
|
||||
<string name="pref_ui_wide_char_weight_explicit_desc">如果快捷輸入欄顯示錯誤,請勾選此項目</string>
|
||||
<string name="pref_ui_eks_weight_explicit">為快捷鍵盤強制設定權重</string>
|
||||
<string name="pref_ui_eks_weight_explicit_desc">如果快捷鍵盤顯示錯誤,請勾選此項目</string>
|
||||
<string name="pref_customization_color_scheme">色彩主題</string>
|
||||
<string name="pref_customization_font">字體</string>
|
||||
<string name="settings">設定</string>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<string name="key_ui_hide_toolbar" translatable="false">neoterm_ui_hide_toolbar</string>
|
||||
<string name="key_ui_next_tab_anim" translatable="false">neoterm_ui_next_tab_anim</string>
|
||||
<string name="key_ui_suggestions" translatable="false">neoterm_ui_suggestions</string>
|
||||
<string name="key_ui_wide_char_weigh_explicit" translatable="false">neoterm_ui_wide_char_explicit</string>
|
||||
<string name="key_ui_eks_weight_explicit" translatable="false">neoterm_ui_eks_weight_explicit</string>
|
||||
|
||||
<string name="key_package_source" translatable="false">neoterm_package_source</string>
|
||||
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
<string name="pref_ui_close_tab_anim_next_tab_desc">Switch to the next tab instead of the previous tab when closing tab</string>
|
||||
<string name="pref_ui_suggestions">Show Suggestions (oh-my-zsh required)</string>
|
||||
<string name="pref_ui_suggestions_desc">When using some programs, show shortcut keys</string>
|
||||
<string name="pref_ui_wide_char_weight_explicit">Use explicit weight for wide char</string>
|
||||
<string name="pref_ui_wide_char_weight_explicit_desc">If suggestion bar show incorrect, please enable this</string>
|
||||
<string name="pref_ui_eks_weight_explicit">Use explicit weight for ExtraKeysView</string>
|
||||
<string name="pref_ui_eks_weight_explicit_desc">If ExtraKeysView shows incorrectly, please enable this</string>
|
||||
<string name="pref_customization_font">Font</string>
|
||||
<string name="pref_customization_color_scheme">Color Scheme</string>
|
||||
<string name="pref_customization_eks">Extra Keys</string>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_ui_wide_char_weigh_explicit"
|
||||
android:summary="@string/pref_ui_wide_char_weight_explicit_desc"
|
||||
android:title="@string/pref_ui_wide_char_weight_explicit" />
|
||||
android:key="@string/key_ui_eks_weight_explicit"
|
||||
android:summary="@string/pref_ui_eks_weight_explicit_desc"
|
||||
android:title="@string/pref_ui_eks_weight_explicit" />
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user