Limit android library for F-droid build issue
This commit is contained in:
@@ -39,9 +39,9 @@ or on Windows:
|
||||
To modify this project, Android Studio is recommended.
|
||||
https://developer.android.com/studio/
|
||||
|
||||
When using Android Studio modify following line in build.gradle file to avoid legacy errors:
|
||||
When using Android Studio modify `playStore = false` line in build.gradle file to avoid legacy errors:
|
||||
|
||||
def playStore = true
|
||||
playStore = true
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
+7
-3
@@ -2,13 +2,17 @@ plugins {
|
||||
id 'com.android.application'
|
||||
}
|
||||
|
||||
def playStore = false
|
||||
def playStore = rootProject.ext.playstore
|
||||
def materialVersion = '1.6.1'
|
||||
|
||||
android {
|
||||
namespace 'org.exbin.bined.editor.android'
|
||||
compileSdk {
|
||||
version = release(35)
|
||||
if (playstore) {
|
||||
compileSdk {
|
||||
version = release(35)
|
||||
}
|
||||
} else {
|
||||
compileSdk 35
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
|
||||
@@ -308,10 +308,9 @@ public abstract class CodeAreaCore extends ViewGroup implements CodeAreaControl
|
||||
}
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
|
||||
return new BaseInputConnection(this, true) {
|
||||
|
||||
};
|
||||
return new BaseInputConnection(this, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,14 +210,14 @@ public class MainActivity extends AppCompatActivity implements FileDialog.OnFile
|
||||
if (showKeyboard != keyboardShown) {
|
||||
keyboardShown = showKeyboard;
|
||||
codeArea.requestFocus();
|
||||
codeArea.post(() -> {
|
||||
codeArea.postDelayed(() -> {
|
||||
InputMethodManager im = (InputMethodManager) getApplication().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
if (showKeyboard) {
|
||||
im.showSoftInput(codeArea, InputMethodManager.SHOW_IMPLICIT);
|
||||
} else {
|
||||
im.hideSoftInputFromWindow(codeArea.getWindowToken(), 0);
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
private final View.OnKeyListener codeAreaOnKeyListener = new CodeAreaKeyListener();
|
||||
|
||||
@@ -76,16 +76,18 @@ public class SearchDialog extends AppCompatDialogFragment {
|
||||
keyboardShown = showKeyboard;
|
||||
InputMethodManager im = (InputMethodManager) codeArea.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
codeArea.requestFocus();
|
||||
if (showKeyboard) {
|
||||
// TODO im.setInputMethodAndSubtype();
|
||||
im.showSoftInput(codeArea, InputMethodManager.SHOW_IMPLICIT);
|
||||
Dialog dialog = SearchDialog.this.getDialog();
|
||||
if (dialog != null) {
|
||||
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
codeArea.postDelayed(() -> {
|
||||
if (showKeyboard) {
|
||||
// TODO im.setInputMethodAndSubtype();
|
||||
im.showSoftInput(codeArea, InputMethodManager.SHOW_IMPLICIT);
|
||||
Dialog dialog = SearchDialog.this.getDialog();
|
||||
if (dialog != null) {
|
||||
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
}
|
||||
} else {
|
||||
im.hideSoftInputFromWindow(codeArea.getWindowToken(), 0);
|
||||
}
|
||||
} else {
|
||||
im.hideSoftInputFromWindow(codeArea.getWindowToken(), 0);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -267,8 +269,10 @@ public class SearchDialog extends AppCompatDialogFragment {
|
||||
|
||||
if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_DPAD_CENTER) {
|
||||
InputMethodManager im = (InputMethodManager) codeArea.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
im.showSoftInput(codeArea, InputMethodManager.SHOW_IMPLICIT);
|
||||
codeArea.postDelayed(() -> {
|
||||
InputMethodManager im = (InputMethodManager) codeArea.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
im.showSoftInput(codeArea, InputMethodManager.SHOW_IMPLICIT);
|
||||
}, 100);
|
||||
return true;
|
||||
} else if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_BACK) {
|
||||
View fromCursorView = searchView.findViewById(R.id.from_cursor);
|
||||
|
||||
+15
-2
@@ -1,7 +1,20 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
// Temporary restrict default version to 8.11.1 for F-droid build server issue
|
||||
// https://gitlab.com/fdroid/admin/-/issues/593
|
||||
buildscript {
|
||||
ext {
|
||||
// playstore = hasProperty('playstore')
|
||||
playstore = false
|
||||
agpVersion = playstore ? '8.13.0' : '8.11.1'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.android.application' version '8.13.0' apply false
|
||||
id 'com.android.library' version '8.13.0' apply false
|
||||
//noinspection GradlePluginVersion
|
||||
id 'com.android.application' version "${agpVersion}" apply false
|
||||
//noinspection GradlePluginVersion
|
||||
id 'com.android.library' version "${agpVersion}" apply false
|
||||
}
|
||||
|
||||
tasks.register('clean', Delete) {
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
def playStore = false
|
||||
def playStore = rootProject.ext.playstore
|
||||
def materialVersion = '1.6.1'
|
||||
|
||||
android {
|
||||
namespace = 'com.rustamg.filedialogs'
|
||||
compileSdk 35
|
||||
if (playstore) {
|
||||
compileSdk {
|
||||
version = release(35)
|
||||
}
|
||||
} else {
|
||||
compileSdk 35
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
if (playStore) {
|
||||
minSdk 24
|
||||
materialVersion = '1.12.0'
|
||||
materialVersion = '1.13.0'
|
||||
} else {
|
||||
multiDexEnabled true
|
||||
minSdk 14
|
||||
|
||||
Reference in New Issue
Block a user