From 576b64c766db82194b6365b40098a6f9842cd5e3 Mon Sep 17 00:00:00 2001 From: Rashiq Date: Wed, 3 Jun 2015 10:38:11 +0200 Subject: [PATCH 1/2] Fix AutoCompleteTextView in landscape mode --- res/layout/main.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/res/layout/main.xml b/res/layout/main.xml index cc57d8035..246dd2afa 100644 --- a/res/layout/main.xml +++ b/res/layout/main.xml @@ -24,13 +24,12 @@ android:ellipsize="end" android:ems="10" android:hint="@string/articlesearch_hint" - android:imeOptions="actionGo" + android:imeOptions="actionGo|flagNoExtractUi" android:inputType="text|textCapWords" android:maxLines="1" android:background="@android:color/background_dark" android:textColor="@android:color/white" - android:selectAllOnFocus="true" - /> + android:selectAllOnFocus="true"/> From b4a3d8135c051e9b0e67aa2b8698dece68468a8b Mon Sep 17 00:00:00 2001 From: renaud gaudin Date: Wed, 3 Jun 2015 15:33:23 +0200 Subject: [PATCH 2/2] moved platforms down a level folder and added a clean option to prevent clutter on android folder --- build-android-with-native.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/build-android-with-native.py b/build-android-with-native.py index 5b400a43a..2e49acce3 100755 --- a/build-android-with-native.py +++ b/build-android-with-native.py @@ -30,6 +30,7 @@ USAGE = '''Usage: {arg0} [--option] --strip Strip libkiwix.so --locales Create the locales.txt file --apk Create an APK file + --clean Remove build folder (except apk files) Note that the '--' prefix is optional. @@ -47,7 +48,7 @@ def init_with_args(args): # default is executing all the steps create_toolchain = compile_liblzma = compile_libicu = \ compile_libzim = compile_libkiwix = strip_libkiwix = \ - compile_apk = locales_txt = True + compile_apk = locales_txt = clean = True archs = ALL_ARCHS options = [a.lower() for a in args[1:]] @@ -83,7 +84,7 @@ def init_with_args(args): # consider we only want the specified steps create_toolchain = compile_liblzma = compile_libicu = compile_libzim = \ compile_libkiwix = strip_libkiwix = \ - compile_apk = locales_txt = False + compile_apk = locales_txt = clean = False for option in options: if 'toolchain' in option: @@ -102,9 +103,12 @@ def init_with_args(args): compile_apk = True if 'locales' in option: locales_txt = True + if 'clean' in option: + clean = True return (create_toolchain, compile_liblzma, compile_libicu, compile_libzim, - compile_libkiwix, strip_libkiwix, compile_apk, locales_txt, archs) + compile_libkiwix, strip_libkiwix, compile_apk, locales_txt, + clean, archs) # store the OS's environment PATH as we'll mess with it # ORIGINAL_ENVIRON_PATH = os.environ.get('PATH') @@ -113,6 +117,9 @@ ORIGINAL_ENVIRON = copy.deepcopy(os.environ) # the directory of this file for relative referencing CURRENT_PATH = os.path.dirname(os.path.abspath(__file__)) +# the parent directory of this file for relative referencing +PARENT_PATH = os.path.dirname(CURRENT_PATH) + # different names of folder path for accessing files ARCHS_FULL_NAMES = { 'arm-linux-androideabi': 'arm-linux-androideabi', @@ -131,7 +138,7 @@ SYSTEMS = {'Linux': 'linux', 'Darwin': 'mac'} # find out what to execute based on command line arguments CREATE_TOOLCHAIN, COMPILE_LIBLZMA, COMPILE_LIBICU, COMPILE_LIBZIM, \ COMPILE_LIBKIWIX, STRIP_LIBKIWIX, COMPILE_APK, \ - LOCALES_TXT, ARCHS = init_with_args(sys.argv) + LOCALES_TXT, CLEAN, ARCHS = init_with_args(sys.argv) # compiler version to use # list of available toolchains in /toolchains @@ -155,7 +162,7 @@ NDK_PLATFORM = os.environ.get('NDK_PLATFORM', 'android-14') # will contain the different prepared toolchains for a specific build PLATFORM_PREFIX = os.environ.get('PLATFORM_PREFIX', - os.path.join(CURRENT_PATH, 'platforms')) + os.path.join(PARENT_PATH, 'platforms')) if not os.path.exists(PLATFORM_PREFIX): os.makedirs(PLATFORM_PREFIX) @@ -559,3 +566,10 @@ if COMPILE_APK: 'android-debug-unaligned.apk')): failed_on_step("The android-debug-unaligned.apk package " "has not been created and is not present.") + +if CLEAN: + + # remove everything from build folder expect the APKs + syscall('rm -rf build/generated build/intermediates build/native-libs ' + 'build/reports build/test-results build/tmp build/outputs/logs ' + 'build/outputs/lint*', shell=True)