From 7e3545f77b529bbb3dd5e3d0b770aca5943da11e Mon Sep 17 00:00:00 2001 From: Dmitry Donskoy Date: Mon, 1 Oct 2018 14:41:28 +0300 Subject: [PATCH] [android] Drop deprecated include for 3rd party lib --- .../3rd_party/BottomSheet/AndroidManifest.xml | 4 - android/3rd_party/BottomSheet/build.gradle | 28 - android/3rd_party/BottomSheet/gradlew | 164 ---- android/3rd_party/BottomSheet/gradlew.bat | 90 -- .../BottomSheet/src/main/AndroidManifest.xml | 6 - .../com/cocosw/bottomsheet/ActionMenu.java | 324 ------- .../cocosw/bottomsheet/ActionMenuItem.java | 296 ------ .../com/cocosw/bottomsheet/BottomSheet.java | 870 ------------------ .../bottomsheet/ClosableSlidingLayout.java | 228 ----- .../com/cocosw/bottomsheet/FillerView.java | 34 - .../com/cocosw/bottomsheet/HeaderLayout.java | 40 - .../bottomsheet/PinnedSectionGridView.java | 120 --- .../SimpleSectionedGridAdapter.java | 348 ------- .../src/main/res/anim/dock_bottom_enter.xml | 24 - .../src/main/res/anim/dock_bottom_exit.xml | 24 - .../main/res/drawable-hdpi/bs_ic_clear.png | Bin 246 -> 0 bytes .../res/drawable-hdpi/bs_ic_clear_light.png | Bin 244 -> 0 bytes .../src/main/res/drawable-hdpi/bs_ic_more.png | Bin 352 -> 0 bytes .../res/drawable-hdpi/bs_ic_more_light.png | Bin 163 -> 0 bytes .../main/res/drawable-hdpi/shadow_top.9.png | Bin 116 -> 0 bytes .../main/res/drawable-mdpi/bs_ic_clear.png | Bin 182 -> 0 bytes .../res/drawable-mdpi/bs_ic_clear_light.png | Bin 192 -> 0 bytes .../src/main/res/drawable-mdpi/bs_ic_more.png | Bin 276 -> 0 bytes .../res/drawable-mdpi/bs_ic_more_light.png | Bin 130 -> 0 bytes .../main/res/drawable-mdpi/shadow_top.9.png | Bin 108 -> 0 bytes .../drawable-v21/bs_list_dark_selector.xml | 7 - .../res/drawable-v21/bs_list_selector.xml | 8 - .../main/res/drawable-xhdpi/bs_ic_clear.png | Bin 280 -> 0 bytes .../res/drawable-xhdpi/bs_ic_clear_light.png | Bin 289 -> 0 bytes .../main/res/drawable-xhdpi/bs_ic_more.png | Bin 431 -> 0 bytes .../res/drawable-xhdpi/bs_ic_more_light.png | Bin 182 -> 0 bytes .../main/res/drawable-xhdpi/shadow_top.9.png | Bin 115 -> 0 bytes .../main/res/drawable-xxhdpi/bs_ic_clear.png | Bin 426 -> 0 bytes .../res/drawable-xxhdpi/bs_ic_clear_light.png | Bin 439 -> 0 bytes .../main/res/drawable-xxhdpi/bs_ic_more.png | Bin 595 -> 0 bytes .../res/drawable-xxhdpi/bs_ic_more_light.png | Bin 272 -> 0 bytes .../main/res/drawable-xxhdpi/shadow_top.9.png | Bin 119 -> 0 bytes .../res/drawable-xxxhdpi/shadow_top.9.png | Bin 133 -> 0 bytes .../res/drawable/bs_list_dark_selector.xml | 16 - .../main/res/drawable/bs_list_selector.xml | 16 - .../main/res/layout/bottom_sheet_dialog.xml | 52 -- .../src/main/res/layout/bs_grid_entry.xml | 20 - .../src/main/res/layout/bs_list_divider.xml | 9 - .../src/main/res/layout/bs_list_entry.xml | 20 - .../src/main/res/values-land/integer.xml | 6 - .../main/res/values-sw600dp-land/integer.xml | 6 - .../src/main/res/values-sw600dp/integer.xml | 6 - .../src/main/res/values-zh/string.xml | 4 - .../BottomSheet/src/main/res/values/attrs.xml | 19 - .../src/main/res/values/colors.xml | 6 - .../src/main/res/values/dimens.xml | 7 - .../BottomSheet/src/main/res/values/ids.xml | 4 - .../src/main/res/values/integer.xml | 6 - .../src/main/res/values/string.xml | 4 - .../src/main/res/values/styles.xml | 163 ---- 55 files changed, 2979 deletions(-) delete mode 100644 android/3rd_party/BottomSheet/AndroidManifest.xml delete mode 100644 android/3rd_party/BottomSheet/build.gradle delete mode 100644 android/3rd_party/BottomSheet/gradlew delete mode 100644 android/3rd_party/BottomSheet/gradlew.bat delete mode 100644 android/3rd_party/BottomSheet/src/main/AndroidManifest.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ActionMenu.java delete mode 100644 android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ActionMenuItem.java delete mode 100644 android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/BottomSheet.java delete mode 100644 android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ClosableSlidingLayout.java delete mode 100644 android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/FillerView.java delete mode 100644 android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/HeaderLayout.java delete mode 100644 android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/PinnedSectionGridView.java delete mode 100644 android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/SimpleSectionedGridAdapter.java delete mode 100644 android/3rd_party/BottomSheet/src/main/res/anim/dock_bottom_enter.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/anim/dock_bottom_exit.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/bs_ic_clear.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/bs_ic_clear_light.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/bs_ic_more.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/bs_ic_more_light.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/shadow_top.9.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/bs_ic_clear.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/bs_ic_clear_light.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/bs_ic_more.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/bs_ic_more_light.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/shadow_top.9.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-v21/bs_list_dark_selector.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-v21/bs_list_selector.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/bs_ic_clear.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/bs_ic_clear_light.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/bs_ic_more.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/bs_ic_more_light.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/shadow_top.9.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_clear.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_clear_light.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_more.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_more_light.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/shadow_top.9.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable-xxxhdpi/shadow_top.9.png delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable/bs_list_dark_selector.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/drawable/bs_list_selector.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/layout/bottom_sheet_dialog.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/layout/bs_grid_entry.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/layout/bs_list_divider.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/layout/bs_list_entry.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/values-land/integer.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/values-sw600dp-land/integer.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/values-sw600dp/integer.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/values-zh/string.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/values/attrs.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/values/colors.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/values/dimens.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/values/ids.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/values/integer.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/values/string.xml delete mode 100644 android/3rd_party/BottomSheet/src/main/res/values/styles.xml diff --git a/android/3rd_party/BottomSheet/AndroidManifest.xml b/android/3rd_party/BottomSheet/AndroidManifest.xml deleted file mode 100644 index 96bc9ad32a..0000000000 --- a/android/3rd_party/BottomSheet/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/android/3rd_party/BottomSheet/build.gradle b/android/3rd_party/BottomSheet/build.gradle deleted file mode 100644 index b933ebfed5..0000000000 --- a/android/3rd_party/BottomSheet/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -buildscript { - repositories { - google() - jcenter() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.1.4' - } -} - - -apply plugin: 'com.android.library' - - -dependencies { - implementation 'com.android.support:support-v4:22.2.0' -} - - -android { - compileSdkVersion propTargetSdkVersion.toInteger() - - defaultConfig { - minSdkVersion propMinSdkVersion.toInteger() - } -} diff --git a/android/3rd_party/BottomSheet/gradlew b/android/3rd_party/BottomSheet/gradlew deleted file mode 100644 index 91a7e269e1..0000000000 --- a/android/3rd_party/BottomSheet/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/android/3rd_party/BottomSheet/gradlew.bat b/android/3rd_party/BottomSheet/gradlew.bat deleted file mode 100644 index 8a0b282aa6..0000000000 --- a/android/3rd_party/BottomSheet/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/android/3rd_party/BottomSheet/src/main/AndroidManifest.xml b/android/3rd_party/BottomSheet/src/main/AndroidManifest.xml deleted file mode 100644 index 942c6c4b05..0000000000 --- a/android/3rd_party/BottomSheet/src/main/AndroidManifest.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ActionMenu.java b/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ActionMenu.java deleted file mode 100644 index 2d1672465c..0000000000 --- a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ActionMenu.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.cocosw.bottomsheet; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import android.content.ComponentName; -import android.content.Context; -import android.content.Intent; -import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; -import android.support.v4.internal.view.SupportMenu; -import android.view.KeyEvent; -import android.view.Menu; -import android.view.MenuItem; -import android.view.SubMenu; - -/** - * @hide - */ - class ActionMenu implements SupportMenu { - private Context mContext; - - private boolean mIsQwerty; - - private static final int[] sCategoryToOrder = new int[]{ - 1, /* No category */ - 4, /* CONTAINER */ - 5, /* SYSTEM */ - 3, /* SECONDARY */ - 2, /* ALTERNATIVE */ - 0, /* SELECTED_ALTERNATIVE */ - }; - - private ArrayList mItems; - - public ActionMenu(Context context) { - mContext = context; - mItems = new ArrayList<>(); - } - - public Context getContext() { - return mContext; - } - - public MenuItem add(CharSequence title) { - return add(0, 0, 0, title); - } - - public MenuItem add(int titleRes) { - return add(0, 0, 0, titleRes); - } - - public MenuItem add(int groupId, int itemId, int order, int titleRes) { - return add(groupId, itemId, order, mContext.getResources().getString(titleRes)); - } - - public MenuItem add(int groupId, int itemId, int order, CharSequence title) { - ActionMenuItem item = new ActionMenuItem(getContext(), - groupId, itemId, 0, order, title); - mItems.add(findInsertIndex(mItems, getOrdering(order)), item); - return item; - } - - - private static int findInsertIndex(ArrayList items, int ordering) { - for (int i = items.size() - 1; i >= 0; i--) { - ActionMenuItem item = items.get(i); - if (item.getOrder() <= ordering) { - return i + 1; - } - } - return 0; - } - - MenuItem add(ActionMenuItem item) { - mItems.add(findInsertIndex(mItems, getOrdering(item.getOrder())),item); - return item; - } - - /** - * Returns the ordering across all items. This will grab the category from - * the upper bits, find out how to order the category with respect to other - * categories, and combine it with the lower bits. - * - * @param categoryOrder The category order for a particular item (if it has - * not been or/add with a category, the default category is - * assumed). - * @return An ordering integer that can be used to order this item across - * all the items (even from other categories). - */ - private static int getOrdering(int categoryOrder) { - final int index = (categoryOrder & CATEGORY_MASK) >> CATEGORY_SHIFT; - - if (index < 0 || index >= sCategoryToOrder.length) { - throw new IllegalArgumentException("order does not contain a valid category."); - } - - return (sCategoryToOrder[index] << CATEGORY_SHIFT) | (categoryOrder & USER_MASK); - } - - public int addIntentOptions(int groupId, int itemId, int order, - ComponentName caller, Intent[] specifics, Intent intent, int flags, - MenuItem[] outSpecificItems) { - PackageManager pm = mContext.getPackageManager(); - final List lri = - pm.queryIntentActivityOptions(caller, specifics, intent, 0); - final int N = lri != null ? lri.size() : 0; - - if ((flags & FLAG_APPEND_TO_GROUP) == 0) { - removeGroup(groupId); - } - - for (int i=0; i= 0) { - outSpecificItems[ri.specificIndex] = item; - } - } - - return N; - } - - public SubMenu addSubMenu(CharSequence title) { - // TODO Implement submenus - return null; - } - - public SubMenu addSubMenu(int titleRes) { - // TODO Implement submenus - return null; - } - - public SubMenu addSubMenu(int groupId, int itemId, int order, - CharSequence title) { - // TODO Implement submenus - return null; - } - - public SubMenu addSubMenu(int groupId, int itemId, int order, int titleRes) { - // TODO Implement submenus - return null; - } - - public void clear() { - mItems.clear(); - } - - public void close() { - } - - private int findItemIndex(int id) { - final ArrayList items = mItems; - final int itemCount = items.size(); - for (int i = 0; i < itemCount; i++) { - if (items.get(i).getItemId() == id) { - return i; - } - } - return -1; - } - - public MenuItem findItem(int id) { - return mItems.get(findItemIndex(id)); - } - - public MenuItem getItem(int index) { - return mItems.get(index); - } - - public boolean hasVisibleItems() { - final ArrayList items = mItems; - final int itemCount = items.size(); - - for (int i = 0; i < itemCount; i++) { - if (items.get(i).isVisible()) { - return true; - } - } - - return false; - } - - private ActionMenuItem findItemWithShortcut(int keyCode, KeyEvent event) { - // TODO Make this smarter. - final boolean qwerty = mIsQwerty; - final ArrayList items = mItems; - final int itemCount = items.size(); - - for (int i = 0; i < itemCount; i++) { - ActionMenuItem item = items.get(i); - final char shortcut = qwerty ? item.getAlphabeticShortcut() : - item.getNumericShortcut(); - if (keyCode == shortcut) { - return item; - } - } - return null; - } - - public boolean isShortcutKey(int keyCode, KeyEvent event) { - return findItemWithShortcut(keyCode, event) != null; - } - - public boolean performIdentifierAction(int id, int flags) { - final int index = findItemIndex(id); - if (index < 0) { - return false; - } - - return mItems.get(index).invoke(); - } - - public boolean performShortcut(int keyCode, KeyEvent event, int flags) { - ActionMenuItem item = findItemWithShortcut(keyCode, event); - if (item == null) { - return false; - } - - return item.invoke(); - } - - public void removeGroup(int groupId) { - final ArrayList items = mItems; - int itemCount = items.size(); - int i = 0; - while (i < itemCount) { - if (items.get(i).getGroupId() == groupId) { - items.remove(i); - itemCount--; - } else { - i++; - } - } - } - - public void removeItem(int id) { - mItems.remove(findItemIndex(id)); - } - - public void setGroupCheckable(int group, boolean checkable, - boolean exclusive) { - final ArrayList items = mItems; - final int itemCount = items.size(); - - for (int i = 0; i < itemCount; i++) { - ActionMenuItem item = items.get(i); - if (item.getGroupId() == group) { - item.setCheckable(checkable); - item.setExclusiveCheckable(exclusive); - } - } - } - - public void setGroupEnabled(int group, boolean enabled) { - final ArrayList items = mItems; - final int itemCount = items.size(); - - for (int i = 0; i < itemCount; i++) { - ActionMenuItem item = items.get(i); - if (item.getGroupId() == group) { - item.setEnabled(enabled); - } - } - } - - public void setGroupVisible(int group, boolean visible) { - final ArrayList items = mItems; - final int itemCount = items.size(); - - for (int i = 0; i < itemCount; i++) { - ActionMenuItem item = items.get(i); - if (item.getGroupId() == group) { - item.setVisible(visible); - } - } - } - - public void setQwertyMode(boolean isQwerty) { - mIsQwerty = isQwerty; - } - - public int size() { - return mItems.size(); - } - - ActionMenu clone(int size) { - ActionMenu out = new ActionMenu(getContext()); - out.mItems = new ArrayList<>(this.mItems.subList(0,size)); - return out; - } - - void removeInvisible() { - Iterator iter = mItems.iterator(); - while (iter.hasNext()) { - ActionMenuItem item = iter.next(); - if (!item.isVisible()) iter.remove(); - } - } -} diff --git a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ActionMenuItem.java b/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ActionMenuItem.java deleted file mode 100644 index 26719ade26..0000000000 --- a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ActionMenuItem.java +++ /dev/null @@ -1,296 +0,0 @@ -package com.cocosw.bottomsheet; - -/* - * Copyright (C) 2010 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import android.content.Context; -import android.content.Intent; -import android.graphics.drawable.Drawable; -import android.support.v4.content.ContextCompat; -import android.support.v4.internal.view.SupportMenuItem; -import android.support.v4.view.MenuItemCompat; -import android.view.ActionProvider; -import android.view.ContextMenu; -import android.view.MenuItem; -import android.view.SubMenu; -import android.view.View; - - - class ActionMenuItem implements SupportMenuItem { - - - private final int mId; - private final int mGroup; - private final int mCategoryOrder; - private final int mOrdering; - - private CharSequence mTitle; - private CharSequence mTitleCondensed; - private Intent mIntent; - private char mShortcutNumericChar; - private char mShortcutAlphabeticChar; - - private Drawable mIconDrawable; - private int mIconResId = NO_ICON; - - private Context mContext; - - private SupportMenuItem.OnMenuItemClickListener mClickListener; - - private static final int NO_ICON = 0; - - private int mFlags = ENABLED; - private static final int CHECKABLE = 0x00000001; - private static final int CHECKED = 0x00000002; - private static final int EXCLUSIVE = 0x00000004; - private static final int HIDDEN = 0x00000008; - private static final int ENABLED = 0x00000010; - - public ActionMenuItem(Context context, int group, int id, int categoryOrder, int ordering, - CharSequence title) { - mContext = context; - mId = id; - mGroup = group; - mCategoryOrder = categoryOrder; - mOrdering = ordering; - mTitle = title; - } - - public char getAlphabeticShortcut() { - return mShortcutAlphabeticChar; - } - - public int getGroupId() { - return mGroup; - } - - public Drawable getIcon() { - return mIconDrawable; - } - - public Intent getIntent() { - return mIntent; - } - - public int getItemId() { - return mId; - } - - public ContextMenu.ContextMenuInfo getMenuInfo() { - return null; - } - - public char getNumericShortcut() { - return mShortcutNumericChar; - } - - public int getOrder() { - return mOrdering; - } - - public SubMenu getSubMenu() { - return null; - } - - public CharSequence getTitle() { - return mTitle; - } - - public CharSequence getTitleCondensed() { - return mTitleCondensed != null ? mTitleCondensed : mTitle; - } - - public boolean hasSubMenu() { - return false; - } - - public boolean isCheckable() { - return (mFlags & CHECKABLE) != 0; - } - - public boolean isChecked() { - return (mFlags & CHECKED) != 0; - } - - public boolean isEnabled() { - return (mFlags & ENABLED) != 0; - } - - public boolean isVisible() { - return (mFlags & HIDDEN) == 0; - } - - public MenuItem setAlphabeticShortcut(char alphaChar) { - mShortcutAlphabeticChar = alphaChar; - return this; - } - - public MenuItem setCheckable(boolean checkable) { - mFlags = (mFlags & ~CHECKABLE) | (checkable ? CHECKABLE : 0); - return this; - } - - public ActionMenuItem setExclusiveCheckable(boolean exclusive) { - mFlags = (mFlags & ~EXCLUSIVE) | (exclusive ? EXCLUSIVE : 0); - return this; - } - - public MenuItem setChecked(boolean checked) { - mFlags = (mFlags & ~CHECKED) | (checked ? CHECKED : 0); - return this; - } - - public MenuItem setEnabled(boolean enabled) { - mFlags = (mFlags & ~ENABLED) | (enabled ? ENABLED : 0); - return this; - } - - public MenuItem setIcon(Drawable icon) { - mIconDrawable = icon; - mIconResId = NO_ICON; - return this; - } - - public MenuItem setIcon(int iconRes) { - mIconResId = iconRes; - if (iconRes>0) - mIconDrawable = ContextCompat.getDrawable(mContext, iconRes); - return this; - } - - public MenuItem setIntent(Intent intent) { - mIntent = intent; - return this; - } - - public MenuItem setNumericShortcut(char numericChar) { - mShortcutNumericChar = numericChar; - return this; - } - - public MenuItem setOnMenuItemClickListener(OnMenuItemClickListener menuItemClickListener) { - mClickListener = menuItemClickListener; - return this; - } - - public MenuItem setShortcut(char numericChar, char alphaChar) { - mShortcutNumericChar = numericChar; - mShortcutAlphabeticChar = alphaChar; - return this; - } - - public MenuItem setTitle(CharSequence title) { - mTitle = title; - return this; - } - - public MenuItem setTitle(int title) { - mTitle = mContext.getResources().getString(title); - return this; - } - - public MenuItem setTitleCondensed(CharSequence title) { - mTitleCondensed = title; - return this; - } - - public MenuItem setVisible(boolean visible) { - mFlags = (mFlags & HIDDEN) | (visible ? 0 : HIDDEN); - return this; - } - - public boolean invoke() { - if (mClickListener != null && mClickListener.onMenuItemClick(this)) { - return true; - } - - if (mIntent != null) { - mContext.startActivity(mIntent); - return true; - } - - return false; - } - - public void setShowAsAction(int show) { - // Do nothing. ActionMenuItems always show as action buttons. - } - - public SupportMenuItem setActionView(View actionView) { - throw new UnsupportedOperationException(); - } - - public View getActionView() { - return null; - } - - @Override - public MenuItem setActionProvider(android.view.ActionProvider actionProvider) { - throw new UnsupportedOperationException(); - } - - @Override - public android.view.ActionProvider getActionProvider() { - throw new UnsupportedOperationException(); - } - - @Override - public SupportMenuItem setActionView(int resId) { - throw new UnsupportedOperationException(); - } - - @Override - public android.support.v4.view.ActionProvider getSupportActionProvider() { - return null; - } - - @Override - public SupportMenuItem setSupportActionProvider(android.support.v4.view.ActionProvider actionProvider) { - throw new UnsupportedOperationException(); - } - - @Override - public SupportMenuItem setShowAsActionFlags(int actionEnum) { - setShowAsAction(actionEnum); - return this; - } - - @Override - public boolean expandActionView() { - return false; - } - - @Override - public boolean collapseActionView() { - return false; - } - - @Override - public boolean isActionViewExpanded() { - return false; - } - - @Override - public MenuItem setOnActionExpandListener(MenuItem.OnActionExpandListener listener) { - throw new UnsupportedOperationException(); - } - - @Override - public SupportMenuItem setSupportOnActionExpandListener(MenuItemCompat.OnActionExpandListener listener) { - // No need to save the listener; ActionMenuItem does not support collapsing items. - return this; - } - } diff --git a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/BottomSheet.java b/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/BottomSheet.java deleted file mode 100644 index 33eb1f131a..0000000000 --- a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/BottomSheet.java +++ /dev/null @@ -1,870 +0,0 @@ -/* - * Copyright 2011, 2015 Kai Liao - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.cocosw.bottomsheet; - -import android.annotation.SuppressLint; -import android.annotation.TargetApi; -import android.app.Activity; -import android.app.Dialog; -import android.content.Context; -import android.content.DialogInterface; -import android.content.res.Configuration; -import android.content.res.Resources; -import android.content.res.TypedArray; -import android.graphics.drawable.Drawable; -import android.os.Build; -import android.os.Bundle; -import android.support.annotation.DrawableRes; -import android.support.annotation.IntegerRes; -import android.support.annotation.MenuRes; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; -import android.support.annotation.StyleRes; -import android.transition.ChangeBounds; -import android.transition.Transition; -import android.transition.TransitionManager; -import android.util.DisplayMetrics; -import android.util.SparseIntArray; -import android.view.Gravity; -import android.view.LayoutInflater; -import android.view.Menu; -import android.view.MenuInflater; -import android.view.MenuItem; -import android.view.View; -import android.view.ViewConfiguration; -import android.view.ViewGroup; -import android.view.ViewTreeObserver; -import android.view.Window; -import android.view.WindowManager; -import android.widget.AdapterView; -import android.widget.BaseAdapter; -import android.widget.FrameLayout; -import android.widget.GridView; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.TextView; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.ArrayList; - - -/** - * One way to present a set of actions to a user is with bottom sheets, a sheet of paper that slides up from the bottom edge of the screen. Bottom sheets offer flexibility in the display of clear and simple actions that do not need explanation. - *

- * https://www.google.com/design/spec/components/bottom-sheets.html - *

- * Project: BottomSheet - * Created by Kai Liao on 2014/9/21. - */ -@SuppressWarnings("unused") -public class BottomSheet extends Dialog implements DialogInterface { - - private String moreText; - private Drawable close; - private Drawable more; - private boolean collapseListIcons; - private int mStatusBarHeight; - protected GridView list; - private SimpleSectionedGridAdapter adapter; - private Builder builder; - - private final SparseIntArray hidden = new SparseIntArray(); - - // translucent support - private static final String STATUS_BAR_HEIGHT_RES_NAME = "status_bar_height"; - private static final String NAV_BAR_HEIGHT_RES_NAME = "navigation_bar_height"; - private static final String NAV_BAR_HEIGHT_LANDSCAPE_RES_NAME = "navigation_bar_height_landscape"; - private static final String SHOW_NAV_BAR_RES_NAME = "config_showNavigationBar"; - private boolean mInPortrait; - private String sNavBarOverride; - private boolean mNavBarAvailable; - private float mSmallestWidthDp; - - - private ImageView icon; - - private int limit = -1; - private boolean cancelOnTouchOutside = true; - private boolean cancelOnSwipeDown = true; - private ActionMenu fullMenuItem; - private ActionMenu menuItem; - private ActionMenu actions; - private OnDismissListener dismissListener; - - BottomSheet(Context context) { - super(context, R.style.BottomSheet_Dialog); - } - - @SuppressWarnings("WeakerAccess") - protected BottomSheet(Context context, int theme) { - super(context, theme); - - TypedArray a = getContext() - .obtainStyledAttributes(null, R.styleable.BottomSheet, R.attr.customBottomSheetStyle, 0); - try { - more = a.getDrawable(R.styleable.BottomSheet_bs_moreDrawable); - close = a.getDrawable(R.styleable.BottomSheet_bs_closeDrawable); - moreText = a.getString(R.styleable.BottomSheet_bs_moreText); - collapseListIcons = a.getBoolean(R.styleable.BottomSheet_bs_collapseListIcons, true); - } finally { - a.recycle(); - } - - // https://github.com/jgilfelt/SystemBarTint/blob/master/library/src/com/readystatesoftware/systembartint/SystemBarTintManager.java - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { - WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); - mInPortrait = (context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT); - try { - Class c = Class.forName("android.os.SystemProperties"); - @SuppressWarnings("unchecked") Method m = c.getDeclaredMethod("get", String.class); - m.setAccessible(true); - sNavBarOverride = (String) m.invoke(null, "qemu.hw.mainkeys"); - } catch (Throwable e) { - sNavBarOverride = null; - } - - // check theme attrs - int[] as = {android.R.attr.windowTranslucentNavigation}; - a = context.obtainStyledAttributes(as); - try { - mNavBarAvailable = a.getBoolean(0, false); - } finally { - a.recycle(); - } - - // check window flags - WindowManager.LayoutParams winParams = ((Activity) context).getWindow().getAttributes(); - - int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION; - if ((winParams.flags & bits) != 0) { - mNavBarAvailable = true; - } - - mSmallestWidthDp = getSmallestWidthDp(wm); - if (mNavBarAvailable) - setTranslucentStatus(true); - mStatusBarHeight = getInternalDimensionSize(context.getResources(), STATUS_BAR_HEIGHT_RES_NAME); - } - } - - @SuppressLint("NewApi") - private float getSmallestWidthDp(WindowManager wm) { - DisplayMetrics metrics = new DisplayMetrics(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { - wm.getDefaultDisplay().getRealMetrics(metrics); - } else { - //this is not correct, but we don't really care pre-kitkat - wm.getDefaultDisplay().getMetrics(metrics); - } - float widthDp = metrics.widthPixels / metrics.density; - float heightDp = metrics.heightPixels / metrics.density; - return Math.min(widthDp, heightDp); - } - - @TargetApi(14) - private int getNavigationBarHeight(Context context) { - Resources res = context.getResources(); - int result = 0; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { - if (hasNavBar(context)) { - String key; - if (mInPortrait) { - key = NAV_BAR_HEIGHT_RES_NAME; - } else { - if (!isNavigationAtBottom()) - return 0; - key = NAV_BAR_HEIGHT_LANDSCAPE_RES_NAME; - } - return getInternalDimensionSize(res, key); - } - } - return result; - } - - @TargetApi(14) - private boolean hasNavBar(Context context) { - Resources res = context.getResources(); - int resourceId = res.getIdentifier(SHOW_NAV_BAR_RES_NAME, "bool", "android"); - if (resourceId != 0) { - boolean hasNav = res.getBoolean(resourceId); - // check override flag (see static block) - if ("1".equals(sNavBarOverride)) { - hasNav = false; - } else if ("0".equals(sNavBarOverride)) { - hasNav = true; - } - return hasNav; - } else { // fallback - return !ViewConfiguration.get(context).hasPermanentMenuKey(); - } - } - - private int getInternalDimensionSize(Resources res, String key) { - int result = 0; - int resourceId = res.getIdentifier(key, "dimen", "android"); - if (resourceId > 0) { - result = res.getDimensionPixelSize(resourceId); - } - return result; - } - - /** - * Should a navigation bar appear at the bottom of the screen in the current - * device configuration? A navigation bar may appear on the right side of - * the screen in certain configurations. - * - * @return True if navigation should appear at the bottom of the screen, False otherwise. - */ - private boolean isNavigationAtBottom() { - return (mSmallestWidthDp >= 600 || mInPortrait); - } - - /** - * Hacky way to get gridview's column number - */ - private int getNumColumns() { - try { - Field numColumns = GridView.class.getDeclaredField("mRequestedNumColumns"); - numColumns.setAccessible(true); - return numColumns.getInt(list); - } catch (Exception e) { - return 1; - } - } - - @Override - public void setCanceledOnTouchOutside(boolean cancel) { - super.setCanceledOnTouchOutside(cancel); - cancelOnTouchOutside = cancel; - } - - /** - * Sets whether this dialog is canceled when swipe it down - * - * @param cancel whether this dialog is canceled when swipe it down - */ - public void setCanceledOnSwipeDown(boolean cancel) { - cancelOnSwipeDown = cancel; - } - - protected void init(final Context context) { - setCanceledOnTouchOutside(cancelOnTouchOutside); - final ClosableSlidingLayout mDialogView = (ClosableSlidingLayout) View.inflate(context, R.layout.bottom_sheet_dialog, null); - setContentView(mDialogView); - if (!cancelOnSwipeDown) - mDialogView.swipeable = cancelOnSwipeDown; - mDialogView.setSlideListener(new ClosableSlidingLayout.SlideListener() { - @Override - public void onClosed() { - BottomSheet.this.dismiss(); - } - - @Override - public void onOpened() { - showFullItems(); - } - }); - - - this.setOnShowListener(new OnShowListener() { - @Override - public void onShow(DialogInterface dialogInterface) { - list.setAdapter(adapter); - list.startLayoutAnimation(); - if (builder.icon == null) - icon.setVisibility(View.GONE); - else { - icon.setVisibility(View.VISIBLE); - icon.setImageDrawable(builder.icon); - } - } - }); - int[] location = new int[2]; - mDialogView.getLocationOnScreen(location); - - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { - mDialogView.setPadding(0, location[0] == 0 ? mStatusBarHeight : 0, 0, 0); - mDialogView.getChildAt(0).setPadding(0, 0, 0, mNavBarAvailable ? getNavigationBarHeight(getContext()) + mDialogView.getPaddingBottom() : 0); - } - - final TextView title = (TextView) mDialogView.findViewById(R.id.bottom_sheet_title); - if (builder.title != null) { - title.setVisibility(View.VISIBLE); - title.setText(builder.title); - } - - icon = (ImageView) mDialogView.findViewById(R.id.bottom_sheet_title_image); - - - list = (GridView) mDialogView.findViewById(R.id.bottom_sheet_gridview); - mDialogView.mTarget = list; - if (!builder.grid) { - list.setNumColumns(1); - } - - if (builder.grid) { - for (int i = 0; i < getMenu().size(); i++) { - if (getMenu().getItem(i).getIcon() == null) - throw new IllegalArgumentException("You must set icon for each items in grid style"); - } - } - - if (builder.limit > 0) - limit = builder.limit * getNumColumns(); - else - limit = Integer.MAX_VALUE; - - mDialogView.setCollapsible(false); - - actions = builder.menu; - menuItem = actions; - // over the initial numbers - if (getMenu().size() > limit) { - fullMenuItem = builder.menu; - menuItem = builder.menu.clone(limit - 1); - ActionMenuItem item = new ActionMenuItem(context, 0, R.id.bs_more, 0, limit - 1, moreText); - item.setIcon(more); - menuItem.add(item); - actions = menuItem; - mDialogView.setCollapsible(true); - } - - BaseAdapter baseAdapter = new BaseAdapter() { - - - @Override - public int getCount() { - return actions.size() - hidden.size(); - } - - @Override - public MenuItem getItem(int position) { - return actions.getItem(position); - } - - @Override - public long getItemId(int position) { - return position; - } - - @Override - public int getViewTypeCount() { - return 1; - } - - @Override - public boolean isEnabled(int position) { - return getItem(position).isEnabled(); - } - - @Override - public boolean areAllItemsEnabled() { - return false; - } - - @Override - public View getView(int position, View convertView, ViewGroup parent) { - ViewHolder holder; - if (convertView == null) { - LayoutInflater inflater = (LayoutInflater) getContext() - .getSystemService(Context.LAYOUT_INFLATER_SERVICE); - if (builder.grid) - convertView = inflater.inflate(R.layout.bs_grid_entry, parent, false); - else - convertView = inflater.inflate(R.layout.bs_list_entry, parent, false); - holder = new ViewHolder(); - holder.title = (TextView) convertView.findViewById(R.id.bs_list_title); - holder.image = (ImageView) convertView.findViewById(R.id.bs_list_image); - convertView.setTag(holder); - } else { - holder = (ViewHolder) convertView.getTag(); - } - - for (int i = 0; i < hidden.size(); i++) { - if (hidden.valueAt(i) <= position) - position++; - } - - MenuItem item = getItem(position); - - holder.title.setText(item.getTitle()); - if (item.getIcon() == null) - holder.image.setVisibility(collapseListIcons ? View.GONE : View.INVISIBLE); - else { - holder.image.setVisibility(View.VISIBLE); - holder.image.setImageDrawable(item.getIcon()); - } - - holder.image.setEnabled(item.isEnabled()); - holder.title.setEnabled(item.isEnabled()); - - return convertView; - } - - class ViewHolder { - private TextView title; - private ImageView image; - } - }; - - adapter = new SimpleSectionedGridAdapter(context, baseAdapter, R.layout.bs_list_divider, R.id.headerlayout, R.id.header); - list.setAdapter(adapter); - adapter.setGridView(list); - - updateSection(); - - list.setOnItemClickListener(new AdapterView.OnItemClickListener() { - @Override - public void onItemClick(AdapterView parent, View view, int position, long id) { - if (((MenuItem) adapter.getItem(position)).getItemId() == R.id.bs_more) { - showFullItems(); - mDialogView.setCollapsible(false); - return; - } - - if (!((ActionMenuItem) adapter.getItem(position)).invoke()) { - if (builder.menulistener != null) - builder.menulistener.onMenuItemClick((MenuItem) adapter.getItem(position)); - else if (builder.listener != null) - builder.listener.onClick(BottomSheet.this, ((MenuItem) adapter.getItem(position)).getItemId()); - } - dismiss(); - } - }); - - if (builder.dismissListener != null) { - setOnDismissListener(builder.dismissListener); - } - setListLayout(); - } - - - private void updateSection() { - actions.removeInvisible(); - - if (!builder.grid && actions.size() > 0) { - int groupId = actions.getItem(0).getGroupId(); - ArrayList sections = new ArrayList<>(); - for (int i = 0; i < actions.size(); i++) { - if (actions.getItem(i).getGroupId() != groupId) { - groupId = actions.getItem(i).getGroupId(); - sections.add(new SimpleSectionedGridAdapter.Section(i, null)); - } - } - if (sections.size() > 0) { - SimpleSectionedGridAdapter.Section[] s = new SimpleSectionedGridAdapter.Section[sections.size()]; - sections.toArray(s); - adapter.setSections(s); - } else { - adapter.mSections.clear(); - } - } - } - - protected void showFullItems() { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { - Transition changeBounds = new ChangeBounds(); - changeBounds.setDuration(300); - TransitionManager.beginDelayedTransition(list, changeBounds); - } - actions = fullMenuItem; - updateSection(); - adapter.notifyDataSetChanged(); - list.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT)); - icon.setVisibility(View.VISIBLE); - icon.setImageDrawable(close); - icon.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - showShortItems(); - } - }); - setListLayout(); - } - - protected void showShortItems() { - actions = menuItem; - updateSection(); - adapter.notifyDataSetChanged(); - setListLayout(); - - if (builder.icon == null) - icon.setVisibility(View.GONE); - else { - icon.setVisibility(View.VISIBLE); - icon.setImageDrawable(builder.icon); - } - - list.setOnScrollListener(null); - } - - private boolean hasDivider() { - return adapter.mSections.size() > 0; - } - - private void setListLayout() { - // without divider, the height of gridview is correct - if (!hasDivider()) - return; - list.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { - @Override - public void onGlobalLayout() { - if (Build.VERSION.SDK_INT < 16) { - //noinspection deprecation - list.getViewTreeObserver().removeGlobalOnLayoutListener(this); - } else { - list.getViewTreeObserver().removeOnGlobalLayoutListener(this); - } - View lastChild = list.getChildAt(list.getChildCount() - 1); - if (lastChild != null) - list.setLayoutParams(new FrameLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, lastChild.getBottom() + lastChild.getPaddingBottom() + list.getPaddingBottom())); - } - }); - } - - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - init(getContext()); - - WindowManager.LayoutParams params = getWindow().getAttributes(); - params.height = ViewGroup.LayoutParams.WRAP_CONTENT; - params.gravity = Gravity.BOTTOM; - - TypedArray a = getContext().obtainStyledAttributes(new int[]{android.R.attr.layout_width}); - try { - params.width = a.getLayoutDimension(0, ViewGroup.LayoutParams.MATCH_PARENT); - } finally { - a.recycle(); - } - super.setOnDismissListener(new OnDismissListener() { - @Override - public void onDismiss(DialogInterface dialog) { - if (dismissListener != null) - dismissListener.onDismiss(dialog); - if (limit != Integer.MAX_VALUE) - showShortItems(); - } - }); - getWindow().setAttributes(params); - } - - @SuppressWarnings("SameParameterValue") - @TargetApi(19) - private void setTranslucentStatus(boolean on) { - Window win = getWindow(); - WindowManager.LayoutParams winParams = win.getAttributes(); - final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS; - if (on) { - winParams.flags |= bits; - } else { - winParams.flags &= ~bits; - } - - win.setAttributes(winParams); - // instance - win.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, - WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); - } - - public Menu getMenu() { - return builder.menu; - } - - /** - * If you make any changes to menu and try to apply it immediately to your bottomsheet, you should call this. - */ - public void invalidate() { - updateSection(); - adapter.notifyDataSetChanged(); - setListLayout(); - } - - @Override - public void setOnDismissListener(OnDismissListener listener) { - this.dismissListener = listener; - } - - /** - * Constructor using a context for this builder and the {@link com.cocosw.bottomsheet.BottomSheet} it creates. - */ - public static class Builder { - - protected final Context context; - private int theme; - private final ActionMenu menu; - private CharSequence title; - private boolean grid; - private OnClickListener listener; - private OnDismissListener dismissListener; - private Drawable icon; - private int limit = -1; - private MenuItem.OnMenuItemClickListener menulistener; - - - /** - * Constructor using a context for this builder and the {@link com.cocosw.bottomsheet.BottomSheet} it creates. - * - * @param context A Context for built BottomSheet. - */ - public Builder(@NonNull Activity context) { - this(context, R.style.BottomSheet_Dialog); - TypedArray ta = context.getTheme().obtainStyledAttributes(new int[]{R.attr.customBottomSheetStyle }); - try { - theme = ta.getResourceId(0, R.style.BottomSheet_Dialog); - } finally { - ta.recycle(); - } - } - - /** - * Constructor using a context for this builder and the {@link com.cocosw.bottomsheet.BottomSheet} it creates with given style - * - * @param context A Context for built BottomSheet. - * @param theme The theme id will be apply to BottomSheet - */ - public Builder(Context context, @StyleRes int theme) { - this.context = context; - this.theme = theme; - this.menu = new ActionMenu(context); - } - - /** - * Set menu resources as list item to display in BottomSheet - * - * @param xmlRes menu resource id - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder sheet(@MenuRes int xmlRes) { - new MenuInflater(context).inflate(xmlRes, menu); - return this; - } - - - /** - * Add one item into BottomSheet - * - * @param id ID of item - * @param iconRes icon resource - * @param textRes text resource - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder sheet(int id, @DrawableRes int iconRes, @StringRes int textRes) { - ActionMenuItem item = new ActionMenuItem(context, 0, id, 0, 0, context.getText(textRes)); - item.setIcon(iconRes); - menu.add(item); - return this; - } - - /** - * Add one item into BottomSheet - * - * @param id ID of item - * @param icon icon - * @param text text - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder sheet(int id, @NonNull Drawable icon, @NonNull CharSequence text) { - ActionMenuItem item = new ActionMenuItem(context, 0, id, 0, 0, text); - item.setIcon(icon); - menu.add(item); - return this; - } - - /** - * Add one item without icon into BottomSheet - * - * @param id ID of item - * @param textRes text resource - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder sheet(int id, @StringRes int textRes) { - menu.add(0, id, 0, textRes); - return this; - } - - /** - * Add one item without icon into BottomSheet - * - * @param id ID of item - * @param text text - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder sheet(int id, @NonNull CharSequence text) { - menu.add(0, id, 0, text); - return this; - } - - /** - * Set title for BottomSheet - * - * @param titleRes title for BottomSheet - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder title(@StringRes int titleRes) { - title = context.getText(titleRes); - return this; - } - - /** - * Remove an item from BottomSheet - * - * @param id ID of item - * @return This Builder object to allow for chaining of calls to set methods - */ - @Deprecated - public Builder remove(int id) { - menu.removeItem(id); - return this; - } - - /** - * Set title for BottomSheet - * - * @param icon icon for BottomSheet - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder icon(Drawable icon) { - this.icon = icon; - return this; - } - - /** - * Set title for BottomSheet - * - * @param iconRes icon resource id for BottomSheet - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder icon(@DrawableRes int iconRes) { - this.icon = context.getResources().getDrawable(iconRes); - return this; - } - - /** - * Set OnclickListener for BottomSheet - * - * @param listener OnclickListener for BottomSheet - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder listener(@NonNull OnClickListener listener) { - this.listener = listener; - return this; - } - - /** - * Set OnMenuItemClickListener for BottomSheet - * - * @param listener OnMenuItemClickListener for BottomSheet - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder listener(@NonNull MenuItem.OnMenuItemClickListener listener) { - this.menulistener = listener; - return this; - } - - - /** - * Show BottomSheet in dark color theme looking - * - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder darkTheme() { - theme = R.style.BottomSheet_Dialog_Dark; - return this; - } - - - /** - * Show BottomSheet - * - * @return Instance of bottomsheet - */ - public BottomSheet show() { - BottomSheet dialog = build(); - dialog.show(); - return dialog; - } - - /** - * Show items in grid instead of list - * - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder grid() { - this.grid = true; - return this; - } - - /** - * Set initial number of actions which will be shown in current sheet. - * If more actions need to be shown, a "more" action will be displayed in the last position. - * - * @param limitRes resource id for initial number of actions - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder limit(@IntegerRes int limitRes) { - limit = context.getResources().getInteger(limitRes); - return this; - } - - protected BottomSheet createDialog(Context context, int theme) { - return new BottomSheet(context, theme); - } - - /** - * Create a BottomSheet but not show it - * - * @return Instance of bottomsheet - */ - @SuppressLint("Override") - public BottomSheet build() { - BottomSheet dialog = createDialog(context, theme); - dialog.builder = this; - return dialog; - } - - /** - * Set title for BottomSheet - * - * @param title title for BottomSheet - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder title(CharSequence title) { - this.title = title; - return this; - } - - /** - * Set the OnDismissListener for BottomSheet - * - * @param listener OnDismissListener for Bottom - * @return This Builder object to allow for chaining of calls to set methods - */ - public Builder setOnDismissListener(@NonNull OnDismissListener listener) { - this.dismissListener = listener; - return this; - } - - public Menu getMenu() { - return menu; - } - } - - -} diff --git a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ClosableSlidingLayout.java b/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ClosableSlidingLayout.java deleted file mode 100644 index beee1783e5..0000000000 --- a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/ClosableSlidingLayout.java +++ /dev/null @@ -1,228 +0,0 @@ -package com.cocosw.bottomsheet; - -import android.annotation.TargetApi; -import android.content.Context; -import android.os.Build; -import android.support.annotation.NonNull; -import android.support.v4.view.MotionEventCompat; -import android.support.v4.view.ViewCompat; -import android.support.v4.widget.ViewDragHelper; -import android.util.AttributeSet; -import android.view.MotionEvent; -import android.view.View; -import android.widget.AbsListView; -import android.widget.FrameLayout; - -/** - * Project: gradle - * Created by LiaoKai(soarcn) on 2014/11/25. - */ -class ClosableSlidingLayout extends FrameLayout { - - private final float MINVEL; - private ViewDragHelper mDragHelper; - private SlideListener mListener; - private int height; - private int top; - private int mActivePointerId; - private boolean mIsBeingDragged; - private float mInitialMotionY; - private static final int INVALID_POINTER = -1; - View mTarget; - - private boolean collapsible = false; - private float yDiff; - - boolean swipeable = true; - - public ClosableSlidingLayout(Context context) { - this(context, null); - } - - public ClosableSlidingLayout(Context context, AttributeSet attrs) { - this(context, attrs, 0); - } - - @TargetApi(Build.VERSION_CODES.HONEYCOMB) - public ClosableSlidingLayout(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - mDragHelper = ViewDragHelper.create(this, 0.8f, new ViewDragCallback()); - MINVEL = getResources().getDisplayMetrics().density * 400; - } - - @Override - public boolean onInterceptTouchEvent(@NonNull MotionEvent event) { - final int action = MotionEventCompat.getActionMasked(event); - - if (!isEnabled() || canChildScrollUp()) { - // Fail fast if we're not in a state where a swipe is possible - return false; - } - - if (action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_UP) { - mActivePointerId = INVALID_POINTER; - mIsBeingDragged = false; - if (collapsible && -yDiff > mDragHelper.getTouchSlop()) { - expand(mDragHelper.getCapturedView(), 0); - } - mDragHelper.cancel(); - return false; - } - - switch (action) { - case MotionEvent.ACTION_DOWN: - height = getChildAt(0).getHeight(); - top = getChildAt(0).getTop(); - mActivePointerId = MotionEventCompat.getPointerId(event, 0); - mIsBeingDragged = false; - final float initialMotionY = getMotionEventY(event, mActivePointerId); - if (initialMotionY == -1) { - return false; - } - mInitialMotionY = initialMotionY; - yDiff = 0; - break; - case MotionEvent.ACTION_MOVE: - if (mActivePointerId == INVALID_POINTER) { - return false; - } - final float y = getMotionEventY(event, mActivePointerId); - if (y == -1) { - return false; - } - yDiff = y - mInitialMotionY; - if (swipeable && yDiff > mDragHelper.getTouchSlop() && !mIsBeingDragged) { - mIsBeingDragged = true; - mDragHelper.captureChildView(getChildAt(0), 0); - } - break; - } - mDragHelper.shouldInterceptTouchEvent(event); - return mIsBeingDragged; - } - - @Override - public void requestDisallowInterceptTouchEvent(boolean b) { - // Nope. - } - - /** - * @return Whether it is possible for the child view of this layout to - * scroll up. Override this if the child view is a custom view. - */ - private boolean canChildScrollUp() { - if (android.os.Build.VERSION.SDK_INT < 14) { - if (mTarget instanceof AbsListView) { - final AbsListView absListView = (AbsListView) mTarget; - return absListView.getChildCount() > 0 - && (absListView.getFirstVisiblePosition() > 0 || absListView.getChildAt(0) - .getTop() < absListView.getPaddingTop()); - } else { - return mTarget.getScrollY() > 0; - } - } else { - return ViewCompat.canScrollVertically(mTarget, -1); - } - } - - private float getMotionEventY(MotionEvent ev, int activePointerId) { - final int index = MotionEventCompat.findPointerIndex(ev, activePointerId); - if (index < 0) { - return -1; - } - return MotionEventCompat.getY(ev, index); - } - - @Override - public boolean onTouchEvent(MotionEvent ev) { - if (!isEnabled() || canChildScrollUp()) { - return super.onTouchEvent(ev); - } - - try { - if (swipeable) - mDragHelper.processTouchEvent(ev); - } catch (Exception ignored) { - } - return true; - } - - @Override - public void computeScroll() { - if (mDragHelper.continueSettling(true)) { - ViewCompat.postInvalidateOnAnimation(this); - } - } - - public void setSlideListener(SlideListener listener) { - mListener = listener; - } - - void setCollapsible(boolean collapsible) { - this.collapsible = collapsible; - } - - /** - * Callback - */ - private class ViewDragCallback extends ViewDragHelper.Callback { - - - @Override - public boolean tryCaptureView(View child, int pointerId) { - return true; - } - - @Override - public void onViewReleased(View releasedChild, float xvel, float yvel) { - if (yvel > MINVEL) { - dismiss(releasedChild, yvel); - } else { - if (releasedChild.getTop() >= top + height / 2) { - dismiss(releasedChild, yvel); - } else { - mDragHelper.smoothSlideViewTo(releasedChild, 0, top); - } - } - ViewCompat.postInvalidateOnAnimation(ClosableSlidingLayout.this); - } - - @Override - public void onViewPositionChanged(View changedView, int left, int top, int dx, int dy) { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) { - invalidate(); - } - if (height-top <1 && mListener!=null) { - mListener.onClosed(); - } - } - - @Override - public int clampViewPositionVertical(View child, int top, int dy) { - return Math.max(top, ClosableSlidingLayout.this.top); - } - } - - private void expand(View releasedChild, float yvel) { - if (mListener != null) { - mListener.onOpened(); - } - } - - private void dismiss(View view, float yvel) { - mDragHelper.smoothSlideViewTo(view, 0, top + height); - mDragHelper.cancel(); - ViewCompat.postInvalidateOnAnimation(ClosableSlidingLayout.this); - } - - - /** - * set listener - */ - interface SlideListener { - void onClosed(); - - void onOpened(); - } - -} \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/FillerView.java b/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/FillerView.java deleted file mode 100644 index 0f205c7089..0000000000 --- a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/FillerView.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.cocosw.bottomsheet; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.View; -import android.widget.LinearLayout; - -class FillerView extends LinearLayout { - private View mMeasureTarget; - - - public FillerView(Context context) { - super(context); - } - - - public void setMeasureTarget(View lastViewSeen) { - mMeasureTarget = lastViewSeen; - } - - - public FillerView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - - @Override - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - if(null != mMeasureTarget) - heightMeasureSpec = MeasureSpec.makeMeasureSpec( - mMeasureTarget.getMeasuredHeight(), MeasureSpec.EXACTLY); - super.onMeasure(widthMeasureSpec, heightMeasureSpec); - } -} \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/HeaderLayout.java b/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/HeaderLayout.java deleted file mode 100644 index f04b410d12..0000000000 --- a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/HeaderLayout.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.cocosw.bottomsheet; - - - -import android.content.Context; -import android.util.AttributeSet; -import android.widget.FrameLayout; - - -class HeaderLayout extends FrameLayout { - private int mHeaderWidth = 1; - - - public HeaderLayout(Context context) { - super(context); - } - - - public HeaderLayout(Context context, AttributeSet attrs) { - super(context, attrs); - } - - - public HeaderLayout(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - } - - public void setHeaderWidth(int width) { - mHeaderWidth = width; - } - - - @Override - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - int widthMeasureSpecNew = mHeaderWidth == 1 - ? widthMeasureSpec - : MeasureSpec.makeMeasureSpec(mHeaderWidth, MeasureSpec.getMode(widthMeasureSpec)); - super.onMeasure(widthMeasureSpecNew, heightMeasureSpec); - } -} \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/PinnedSectionGridView.java b/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/PinnedSectionGridView.java deleted file mode 100644 index a422ec3ee3..0000000000 --- a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/PinnedSectionGridView.java +++ /dev/null @@ -1,120 +0,0 @@ -package com.cocosw.bottomsheet; - - -/* - * Copyright 2013 Hari Krishna Dulipudi - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - - import android.content.Context; - import android.database.DataSetObserver; - import android.graphics.Canvas; - import android.graphics.Color; - import android.graphics.PointF; - import android.graphics.Rect; - import android.graphics.drawable.GradientDrawable; - import android.graphics.drawable.GradientDrawable.Orientation; - import android.os.Parcelable; - import android.util.AttributeSet; - import android.view.MotionEvent; - import android.view.SoundEffectConstants; - import android.view.View; - import android.view.ViewConfiguration; - import android.view.accessibility.AccessibilityEvent; - import android.widget.AbsListView; - import android.widget.GridView; - -/** - * ListView capable to pin views at its top while the rest is still scrolled. - */ - class PinnedSectionGridView extends GridView { - - - // -- class fields - - private int mNumColumns; - private int mHorizontalSpacing; - private int mColumnWidth; - private int mAvailableWidth; - - public PinnedSectionGridView(Context context) { - super(context); - } - - public PinnedSectionGridView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public PinnedSectionGridView(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - - @Override - public void setNumColumns(int numColumns) { - mNumColumns = numColumns; - super.setNumColumns(numColumns); - } - - public int getNumColumns(){ - return mNumColumns; - } - - @Override - public void setHorizontalSpacing(int horizontalSpacing) { - mHorizontalSpacing = horizontalSpacing; - super.setHorizontalSpacing(horizontalSpacing); - } - - public int getHorizontalSpacing(){ - return mHorizontalSpacing; - } - - @Override - public void setColumnWidth(int columnWidth) { - mColumnWidth = columnWidth; - super.setColumnWidth(columnWidth); - } - - public int getColumnWidth(){ - return mColumnWidth; - } - - public int getAvailableWidth(){ - return mAvailableWidth != 0 ? mAvailableWidth : getWidth(); - } - -// @Override -// protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { -// if (mNumColumns == GridView.AUTO_FIT) { -// mAvailableWidth = MeasureSpec.getSize(widthMeasureSpec); -// if (mColumnWidth > 0) { -// int availableSpace = MeasureSpec.getSize(widthMeasureSpec) - getPaddingLeft() - getPaddingRight(); -// // Client told us to pick the number of columns -// mNumColumns = (availableSpace + mHorizontalSpacing) / -// (mColumnWidth + mHorizontalSpacing); -// } else { -// // Just make up a number if we don't have enough info -// mNumColumns = 2; -// } -// if(null != getAdapter()){ -// if(getAdapter() instanceof SimpleSectionedGridAdapter){ -// ((SimpleSectionedGridAdapter)getAdapter()).setSections(); -// } -// } -// } -// super.onMeasure(widthMeasureSpec, heightMeasureSpec); -// } -} \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/SimpleSectionedGridAdapter.java b/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/SimpleSectionedGridAdapter.java deleted file mode 100644 index df5f6ed213..0000000000 --- a/android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/SimpleSectionedGridAdapter.java +++ /dev/null @@ -1,348 +0,0 @@ -package com.cocosw.bottomsheet; - - -import java.util.Arrays; -import java.util.Comparator; - -import android.content.Context; -import android.database.DataSetObserver; -import android.text.TextUtils; -import android.util.SparseArray; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.BaseAdapter; -import android.widget.GridView; -import android.widget.ListAdapter; -import android.widget.ListView; -import android.widget.TextView; - -class SimpleSectionedGridAdapter extends BaseAdapter{ - protected static final int TYPE_FILLER = 0; - protected static final int TYPE_HEADER = 1; - protected static final int TYPE_HEADER_FILLER = 2; - private boolean mValid = true; - private int mSectionResourceId; - private LayoutInflater mLayoutInflater; - private ListAdapter mBaseAdapter; - SparseArray

mSections = new SparseArray
(); - private Section[] mInitialSections = new Section[0]; - private Context mContext; - private View mLastViewSeen; - private int mHeaderWidth; - private int mNumColumns; - private int mWidth; - private int mColumnWidth; - private int mHorizontalSpacing; - private int mStrechMode; - private int requestedColumnWidth; - private int requestedHorizontalSpacing; - private GridView mGridView; - private int mHeaderLayoutResId; - private int mHeaderTextViewResId; - - public static class Section { - int firstPosition; - int sectionedPosition; - CharSequence title; - int type = 0; - - public Section(int firstPosition, CharSequence title) { - this.firstPosition = firstPosition; - this.title =title; - } - - public CharSequence getTitle() { - return title; - } - } - - public SimpleSectionedGridAdapter(Context context, BaseAdapter baseAdapter, int sectionResourceId, int headerLayoutResId, - int headerTextViewResId) { - mLayoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - mSectionResourceId = sectionResourceId; - mHeaderLayoutResId = headerLayoutResId; - mHeaderTextViewResId = headerTextViewResId; - mBaseAdapter = baseAdapter; - mContext = context; - mBaseAdapter.registerDataSetObserver(new DataSetObserver() { - @Override - public void onChanged() { - mValid = !mBaseAdapter.isEmpty(); - notifyDataSetChanged(); - } - - @Override - public void onInvalidated() { - mValid = false; - notifyDataSetInvalidated(); - } - }); - } - - public void setGridView(GridView gridView){ - if(!(gridView instanceof PinnedSectionGridView)){ - throw new IllegalArgumentException("Does your grid view extends PinnedSectionGridView?"); - } - mGridView = gridView; - mStrechMode = gridView.getStretchMode(); - mWidth = gridView.getWidth() - (mGridView.getPaddingLeft() + mGridView.getPaddingRight()); - mNumColumns = ((PinnedSectionGridView)gridView).getNumColumns(); - requestedColumnWidth = ((PinnedSectionGridView)gridView).getColumnWidth(); - requestedHorizontalSpacing = ((PinnedSectionGridView)gridView).getHorizontalSpacing(); - } - - private int getHeaderSize(){ - if(mHeaderWidth > 0){ - return mHeaderWidth; - } - if(mWidth != mGridView.getWidth()){ - mStrechMode = mGridView.getStretchMode(); - mWidth = ((PinnedSectionGridView)mGridView).getAvailableWidth() - (mGridView.getPaddingLeft() + mGridView.getPaddingRight()); - mNumColumns = ((PinnedSectionGridView)mGridView).getNumColumns(); - requestedColumnWidth = ((PinnedSectionGridView)mGridView).getColumnWidth(); - requestedHorizontalSpacing = ((PinnedSectionGridView)mGridView).getHorizontalSpacing(); - } - - int spaceLeftOver = mWidth - (mNumColumns * requestedColumnWidth) - - ((mNumColumns - 1) * requestedHorizontalSpacing); - switch (mStrechMode) { - case GridView.NO_STRETCH: // Nobody stretches - mWidth -= spaceLeftOver; - mColumnWidth = requestedColumnWidth; - mHorizontalSpacing = requestedHorizontalSpacing; - break; - - case GridView.STRETCH_COLUMN_WIDTH: - mColumnWidth = requestedColumnWidth + spaceLeftOver / mNumColumns; - mHorizontalSpacing = requestedHorizontalSpacing; - break; - - case GridView.STRETCH_SPACING: - mColumnWidth = requestedColumnWidth; - if (mNumColumns > 1) { - mHorizontalSpacing = requestedHorizontalSpacing + - spaceLeftOver / (mNumColumns - 1); - } else { - mHorizontalSpacing = requestedHorizontalSpacing + spaceLeftOver; - } - break; - - case GridView.STRETCH_SPACING_UNIFORM: - mColumnWidth = requestedColumnWidth; - mHorizontalSpacing = requestedHorizontalSpacing; - mWidth = mWidth - spaceLeftOver + (2 * mHorizontalSpacing); - break; - } - mHeaderWidth = mWidth + ((mNumColumns - 1) * (mColumnWidth + mHorizontalSpacing)) ; - return mHeaderWidth; - } - - - public void setSections(Section... sections) { - mInitialSections = sections; - setSections(); - } - - public void setSections() { - mSections.clear(); - - getHeaderSize(); - Arrays.sort(mInitialSections, new Comparator
() { - @Override - public int compare(Section o, Section o1) { - return (o.firstPosition == o1.firstPosition) - ? 0 - : ((o.firstPosition < o1.firstPosition) ? -1 : 1); - } - }); - - int offset = 0; // offset positions for the headers we're adding - for (int i = 0; i < mInitialSections.length; i++) { - Section section = mInitialSections[i]; - Section sectionAdd; - - for (int j = 0; j < mNumColumns - 1; j++) { - sectionAdd = new Section(section.firstPosition, section.title); - sectionAdd.type = TYPE_HEADER_FILLER; - sectionAdd.sectionedPosition = sectionAdd.firstPosition + offset; - mSections.append(sectionAdd.sectionedPosition, sectionAdd); - ++offset; - } - - sectionAdd = new Section(section.firstPosition, section.title); - sectionAdd.type = TYPE_HEADER; - sectionAdd.sectionedPosition = sectionAdd.firstPosition + offset; - mSections.append(sectionAdd.sectionedPosition, sectionAdd); - ++offset; - - if(i < mInitialSections.length - 1){ - int nextPos = mInitialSections[i+1].firstPosition; - int itemsCount = nextPos - section.firstPosition; - int dummyCount = mNumColumns - (itemsCount % mNumColumns); - if(mNumColumns != dummyCount){ - for (int k = 0 ;k < dummyCount; k++) { - sectionAdd = new Section(section.firstPosition, section.title); - sectionAdd.type = TYPE_FILLER; - sectionAdd.sectionedPosition = nextPos + offset; - mSections.append(sectionAdd.sectionedPosition, sectionAdd); - ++offset; - } - } - } - } - - notifyDataSetChanged(); - } - - public int positionToSectionedPosition(int position) { - int offset = 0; - for (int i = 0; i < mSections.size(); i++) { - if (mSections.valueAt(i).firstPosition > position) { - break; - } - ++offset; - } - return position + offset; - } - - public int sectionedPositionToPosition(int sectionedPosition) { - if (isSectionHeaderPosition(sectionedPosition)) { - return ListView.INVALID_POSITION; - } - - int offset = 0; - for (int i = 0; i < mSections.size(); i++) { - if (mSections.valueAt(i).sectionedPosition > sectionedPosition) { - break; - } - --offset; - } - return sectionedPosition + offset; - } - - public boolean isSectionHeaderPosition(int position) { - return mSections.get(position) != null; - } - - @Override - public int getCount() { - return (mValid ? mBaseAdapter.getCount() + mSections.size() : 0); - } - - @Override - public Object getItem(int position) { - return isSectionHeaderPosition(position) - ? mSections.get(position) - : mBaseAdapter.getItem(sectionedPositionToPosition(position)); - } - - @Override - public long getItemId(int position) { - return isSectionHeaderPosition(position) - ? Integer.MAX_VALUE - mSections.indexOfKey(position) - : mBaseAdapter.getItemId(sectionedPositionToPosition(position)); - } - - @Override - public int getItemViewType(int position) { - return isSectionHeaderPosition(position) - ? getViewTypeCount() - 1 - : mBaseAdapter.getItemViewType(sectionedPositionToPosition(position)); - } - - @Override - public boolean isEnabled(int position) { - //noinspection SimplifiableConditionalExpression - return isSectionHeaderPosition(position) - ? false - : mBaseAdapter.isEnabled(sectionedPositionToPosition(position)); - } - - @Override - public int getViewTypeCount() { - return mBaseAdapter.getViewTypeCount() + 1; // the section headings - } - - @Override - public boolean areAllItemsEnabled() { - return mBaseAdapter.areAllItemsEnabled(); - } - - @Override - public boolean hasStableIds() { - return mBaseAdapter.hasStableIds(); - } - - @Override - public boolean isEmpty() { - return mBaseAdapter.isEmpty(); - } - - @Override - public View getView(int position, View convertView, ViewGroup parent) { - if (isSectionHeaderPosition(position)) { - HeaderLayout header; - TextView view; - if (null == convertView) { - convertView = mLayoutInflater.inflate(mSectionResourceId, parent, false); - } else { - if (null == convertView.findViewById(mHeaderLayoutResId)) { - convertView = mLayoutInflater.inflate(mSectionResourceId, parent, false); - } - } - switch (mSections.get(position).type) { - case TYPE_HEADER: - header = (HeaderLayout) convertView.findViewById(mHeaderLayoutResId); - if (!TextUtils.isEmpty(mSections.get(position).title)) { - view = (TextView) convertView.findViewById(mHeaderTextViewResId); - view.setText(mSections.get(position).title); - } - header.setHeaderWidth(getHeaderSize()); - break; - case TYPE_HEADER_FILLER: - header = (HeaderLayout) convertView.findViewById(mHeaderLayoutResId); - if (!TextUtils.isEmpty(mSections.get(position).title)) { - view = (TextView) convertView.findViewById(mHeaderTextViewResId); - view.setText(mSections.get(position).title); - } - header.setHeaderWidth(0); - break; - default: - convertView = getFillerView(mLastViewSeen); - } - } else { - convertView = mBaseAdapter.getView(sectionedPositionToPosition(position), convertView, parent); - mLastViewSeen = convertView; - } - return convertView; - } - - private FillerView getFillerView(final View lastViewSeen) { - final FillerView fillerView = new FillerView(mContext); - fillerView.setMeasureTarget(lastViewSeen); - return fillerView; - } - - public int getHeaderLayoutResId() { - return mHeaderLayoutResId; - } - - public static class ViewHolder { - @SuppressWarnings("unchecked") - public static T get(View view, int id) { - SparseArray viewHolder = (SparseArray) view.getTag(); - if (viewHolder == null) { - viewHolder = new SparseArray(); - view.setTag(viewHolder); - } - View childView = viewHolder.get(id); - if (childView == null) { - childView = view.findViewById(id); - viewHolder.put(id, childView); - } - return (T) childView; - } - } - -} \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/anim/dock_bottom_enter.xml b/android/3rd_party/BottomSheet/src/main/res/anim/dock_bottom_enter.xml deleted file mode 100644 index c9d4283d20..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/anim/dock_bottom_enter.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - diff --git a/android/3rd_party/BottomSheet/src/main/res/anim/dock_bottom_exit.xml b/android/3rd_party/BottomSheet/src/main/res/anim/dock_bottom_exit.xml deleted file mode 100644 index d01e1e4526..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/anim/dock_bottom_exit.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/bs_ic_clear.png b/android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/bs_ic_clear.png deleted file mode 100644 index 45fef78a24527b42b407bae926a36ea31347c5d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpUty`Cdxq=Ptwl4p z{ylRlo!#GXqROlXtMg`D>b&&mTA=Tt%u8?9UMo;n**eYop4c9j*VFrZQ$)9i|MPcv z)%0GH(=^%m66e;b?>(IAKgcg$RGedFy>R!Z<0=fcP8ZrGei?K9Rc?+`T`=A9MXA&; uC+6CvE&Hz=wqJd~K1cTB77vhf664PD)<>>(j4%Rvgu&C*&t;ucLK6VunrF}e diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/bs_ic_clear_light.png b/android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/bs_ic_clear_light.png deleted file mode 100644 index ea21b1bf2d32c94ace88bc6ca0608f950bf0a8f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 244 zcmVxAF(T)`HvuDGVr0WPFgb)HmjIpnmU{E@&we83` zr#i-z(x4n7NKL6NJu(}hwMoJ+pYQEO+b$QLkpUGla6hgb+dqQDz2^@d=z;EY9%&0000I(3)EF2VS{N990fib~ zFff!FFfhDIU|_JC!N4G1FlSew4N!t9$=lt9;eUJonf*W>XMsm#F#`j)FbFd;%$g$s z6ujZ-;uw-~@9hmou0swytq-sGu1ycHSrk&GV%vMGHKc#h-J^nmrwp1SO%{Dp-~CW< zUt|iGZpgmXYD^pg3Jwhnj7%&r#uvi?)!r?a+U-t6En7D;J#*jms%wd*y9!S4u{ytU zkzs$}Qtx9dStg-dLDb~tZ+bHw#c#$}?VZwjdG#3?qy0O-sULnBAt{_O+ve_$6rcAO zOmxy?j%UOkKQ&{U&!Nv(U6Y^XNeaKH+ij)uLiLMZ_{`|usg=9G)x2dyas=2l{~2~M YwtYDNaIHmC9ng;qp00i_>zopr00N|du>b%7 diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/bs_ic_more_light.png b/android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/bs_ic_more_light.png deleted file mode 100644 index 9c7e47428cf0908343b942723d94718bd973a73e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 163 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpUtEKe85kcwMxFI#gp7znUBNb65| zqF1GTxhi^dLTaLN_Cn(gDlP2Zb(dLyivKvTEzMiIHu+89^O|!fmUOr+{^q?_a^@Q8 z7uSz%oHnsCmwEBFo-^70E2eBpNx5WSI48nn@9zcvMnJ6x+GRTfi$7=Z$Ib%s7(8A5 KT-G@yGywqf;XJSa diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/shadow_top.9.png b/android/3rd_party/BottomSheet/src/main/res/drawable-hdpi/shadow_top.9.png deleted file mode 100644 index 00696aa75702f92f2f2a0a20eb8dcb392703561b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 116 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh0wlLOK8*rW)}AhoAr*{UFKlOQFc3K4z;;TPkd-G2CR=Ho{jKO8;jTK;f0 QKw}s@UHx3vIVCg!0OE`(t^fc4 diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/bs_ic_clear.png b/android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/bs_ic_clear.png deleted file mode 100644 index 6c3a59fe654bd22934e83047d3bffe1f21d71a06..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJT2B|pkcwMxr|srtP~>rzY~+-f zr5f?9jLTBC;VXEat8`4xSz1)w|r>+-}0gLFtbBHLlx)3^8!{K3l>Z4>&c5a geuJOWHBfHVk8KjSjVFVdQ&MBb@03{(syZ`_I diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/bs_ic_clear_light.png b/android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/bs_ic_clear_light.png deleted file mode 100644 index cfb1679945df2eee490a9da09e02704c5d436482..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJc25__kcwMxr|srFpupoIsZcu2 z!D-WnC`rZUl-nuQo^W|b> zV&M=_aA*)b5vZKt!uoyH{KKE0$n03Q-1z(Hn8sPZr#!RcYB|h(?~eZDdw(|nwt2hQ zJCEPLcW1xe&5if%b|k00TWrlB>s?hPw*0YwwSdc_-76WuW`5vKVA`#e=pwaeMHbLq N44$rjF6*2UngD``T@(NS diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/bs_ic_more_light.png b/android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/bs_ic_more_light.png deleted file mode 100644 index 0e483d5f3b0fb6cd6384e9a94f66b2941017ca7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzPfr)ekcwMxFC64#FywH#IAzO% zuuLhB?Kc~3)lxo+{orRy;ZxcM)WE0o$Z+$zjCJ2qqn^BTu6(}c+jqGSdrhVuU0wg3 dfgvHC$#}Q%T&JehK0remJYD@<);T3K0RRG>Er|dC diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/shadow_top.9.png b/android/3rd_party/BottomSheet/src/main/res/drawable-mdpi/shadow_top.9.png deleted file mode 100644 index 1a784f3c12dfd6b0a38023ab42fef97d8fbe7a02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 108 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V3y@T|W;X*;#-1*YAso@k2?+^5`q>U1VBl?P z4ZWxk5g^3d#QO7sLc|1KAYh!TQ1V5Eymod6|2dJIF)78&qol`;+ E02{p>E&u=k diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-v21/bs_list_dark_selector.xml b/android/3rd_party/BottomSheet/src/main/res/drawable-v21/bs_list_dark_selector.xml deleted file mode 100644 index b5e07b3f29..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/drawable-v21/bs_list_dark_selector.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-v21/bs_list_selector.xml b/android/3rd_party/BottomSheet/src/main/res/drawable-v21/bs_list_selector.xml deleted file mode 100644 index bc8e1afdb6..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/drawable-v21/bs_list_selector.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/bs_ic_clear.png b/android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/bs_ic_clear.png deleted file mode 100644 index 2eb9589dd6307b9d20c948744606920c00047669..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=_dQ)4Ln>~)o#oAUSb>N2iP*YotJIBYTPnjpwu`aQ1 zy0qW%W#@!1ArV!EDtl$7-4mF2PiXQzk*W8@rrSwOw3C`_FY~k_=5NyxO_sCTMi8eO Z80x=@O59$z(7*sB;OXk;vd$@?2>`T0cToTU diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/bs_ic_clear_light.png b/android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/bs_ic_clear_light.png deleted file mode 100644 index 0aaf7e2df404b722a65b9865f4a5c278c3c668bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=FFaiwLn>~)ofXa1Y#`uzS+zAq z+bLWvWqYZ^LH)IB{p7yOy!d{nc=cK}PDY?|Ab6m)e#)gO#eMghbC;dn#&h*aa?g8J zkI1Go^HkS-GTR){rlq>(e$7q0IMp{#%Qr6%cquf;)_aBF=9vy>Pgb*Khuu?7`25MA z?XBCt&I5N(-k01H{nMId*YyAHDH1>9TiPb?S2A1k$GqwA>G@L?6zfBpdj3Rm3Vr&- z>T#dxl6}*q`sPdgPM7)*UD9{HwEplVZlz1!Nte18T{`{flC<)r=;Tkc7k|3_*zs?} ik+7yuf|3w7znIFuY4Jmm8~LFpKmwkwelF{r5}E+SyMQ|Y diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/bs_ic_more.png b/android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/bs_ic_more.png deleted file mode 100644 index 36328793dd3591367a1fbe31055fa73ab5227b34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 431 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD0wg^q?%xcg6p}rHd>I(3)EF2VS{N990fib~ zFff!FFfhDIU|_JC!N4G1FlSew4N!t9$=lt9;eUJonf*W>XMsm#F#`j)FbFd;%$g&? zz`&^P>EaktaqI0ZN3JFZkz*gzyEh$fDOqV1;HtOFOHg*v3fGdJJ3qE|EKqS*FKB!9 z|6Y-uTfN0&g&8OI?XF@2nu-@#G4|+gpDY@7Qw_@AFDM_<3sHy(7WLBa$XRsC@5RGify+P{>cJe!J$H z_cFfB&;P$y*lpo{{vc3aZ*hsN&HKHb##8&Q-_fY}*W9eLe(wPruY1xHvVNES>SYW3 zbdMo;)t*laywA#BE}#3I?auXAPVBLzSK~H6+j_Hd-&e~2 zM%<~>0y|G{d(gqPutVgV>3h%pkHn9A%A95bst1A(0bValm&j$NXKAMPzH;C5$NKr7 zohiGei%RU17{8|N$p5wZ=HCw1E%MCUZq{;t;Pko1A87C4-+$#r-3_6CKYe@OF+&WB YdHd+AXr>mdKI;Vst031?B4FCWD diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/shadow_top.9.png b/android/3rd_party/BottomSheet/src/main/res/drawable-xhdpi/shadow_top.9.png deleted file mode 100644 index 62083b02e8b93ecf4693f0f8c75f609c0dbdc6c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 115 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+0wn(&ce?|mtUO&DLn;`P6B81CoNtgfXcCbW z4)`L!=jzSoK0QpI|IM;dv*OYHV{e{Vzw1E6!I%!n0txe`~JMn9-t`< Mp00i_>zopr0KJVO9{>OV diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_clear.png b/android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_clear.png deleted file mode 100644 index 3ec1adb77dc9dfbf8f9b2f614b6f90a4320bc457..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 426 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7Ro>U@Y`>aSW-r_4bZq-ys7Yhl_bH zA|Ld`Fr0JgzhGUuiR03WAotBP4wil1_e6J7@^kT~S(!{g%`jkkbKBc%kM1SuP5FGM zcwcDzpX~0XM{hm4`6x)?x%c_fw>#st_5ZCF|J3LHOzq3j`Zq;&Q?s3}pWCFJ@^_o? zvn97G<(}-Baw+ip^Iy(OE?xAqb}w9irQxSI>(UDs8_T@j-1^iSDmCT*om+}lr{>&# zx%|zRTPp)Tyxcmu@-+YAxjmQ7=ad=g9@%i~SEn!wP_xu~eHrSFP~6#<;m)kl(PYz7%ez$B{)mk0g^7oE6lWbT zELl?aujqTir|Bt?Z)-joXQ~&3U-Ub~c9~E1>P#;yuMGl+U!UNXYR+u$6B4)S>D#l+ z%R2ehiBQ&$t~=K#?@+jYRYl`OtFPy*2d6f%SQTZ;!$J#4|ImrQ@4QBP#*yV;L86|n KelF{r5}E)D1H_mB diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_clear_light.png b/android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_clear_light.png deleted file mode 100644 index 61817c96bb557d786dff569801b4b57f81f2ffcb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 439 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7Ro>V65|WaSW-r_4dx$+(Qlm4vF$X z?m^AGtUCnGEt$Ebp@dtwa6^F5(+LK~_uhL}yMF%7pjxG z=`)nCbyz0l$No9|@I#I5`{R#4KCX(hHc?FKiBNvlVO#Vf=Fj%%kM`$FSDl+WyI}U8 z&t}g~EQ}RSDm9;6U+swH2hmhH;P z{e8rW_tbvX8CP3QZG2mIs%-UKKF;@X)>FglB;JP1+4pcu@JfNhS<9Qa+OGRO3%TT% z)R>_jD7a;^#o8^CS18}|ydwBkz3w?gj)+2+XZ{N zvvL{k>HFiDZ1DC%;KP>oixc;+ymW4cRZ*y;k=|>MW2L671&P6P)pl&siFVg}%M1%S bAkF`rDOEH7qoT925J=S1)z4*}Q$iB}$~(T$ diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_more.png b/android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_more.png deleted file mode 100644 index 045c2ae440126841f10898ed557ae843beda41c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 595 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q1xWh(YZ(J6g=CK)Uj~LMH3o);76yi2K%s^g z3=E|P3=FRl7#OT(FffQ0%-I!a1C(G&@^*J&_}|`tWO>_%)r1c48n{Iv*t)J zFfg9>ba4!+xb^mCpqF%_2y23PQtvKJ$3nrQNf-WhWSB2Vv2+w)@J;bx!LO*UKI6B! zv!nM_-{YU&ulWDT{JC#V1PCxNv2X||I5aSDf(S++Zvv)}fC3{_6{8ST6_OB>NW$U89iZIIVD-7CWKD+UA@@=4~o^k54Tp%qr zS!`GSZ;{D8Plc*zP3r-9_s(F^!UjYt$nw?ip0&R{aG;gylyqu z`k4ODHXjV+x4zZfv*rHjuhQx#ve$iDS?d2XeSYM#o#%~Kui11a_FVnbYkAz&H5M$e zka1#w1SBJq3M3$b!O8>|;sA#&D5P1y!3_*)4OqUHx3v IIVCg!09qy00ssI2 diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_more_light.png b/android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/bs_ic_more_light.png deleted file mode 100644 index dea04ab5464eaeccb3b40d81f4f628f25f6d555b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 272 zcmeAS@N?(olHy`uVBq!ia0vp^2_VeD1|%QND7OGo*F9YvLn>~)y>$7va5_f8 zvP~f?f8w2!6@4ZYg6B1>1>JDhF33a zduw`Z)3YT3)1EF}_xksZ2gU1>be^T0_T2n=`mDb>RhiG<>ZX{+$Yv@^tlcS?83{1OTP0ZRh|1 diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/shadow_top.9.png b/android/3rd_party/BottomSheet/src/main/res/drawable-xxhdpi/shadow_top.9.png deleted file mode 100644 index 4dcf1830ca234efda36932df293cdd529bc15f8d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^QXtI10wkH8TU>#Zou`Xqh{fr*R}S(rC~zFTkR);P zue$Jl;{yi;lHb3NVs_ChPEeaD)1k7c=bHQWz%OpUrGnx^6s1I}1S3j)(5;V7aV9 - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/drawable/bs_list_selector.xml b/android/3rd_party/BottomSheet/src/main/res/drawable/bs_list_selector.xml deleted file mode 100644 index 8d993f4f27..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/drawable/bs_list_selector.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/layout/bottom_sheet_dialog.xml b/android/3rd_party/BottomSheet/src/main/res/layout/bottom_sheet_dialog.xml deleted file mode 100644 index cdfbe6e152..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/layout/bottom_sheet_dialog.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/layout/bs_grid_entry.xml b/android/3rd_party/BottomSheet/src/main/res/layout/bs_grid_entry.xml deleted file mode 100644 index 77883fd0f9..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/layout/bs_grid_entry.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/layout/bs_list_divider.xml b/android/3rd_party/BottomSheet/src/main/res/layout/bs_list_divider.xml deleted file mode 100644 index 627e9b77ea..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/layout/bs_list_divider.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/layout/bs_list_entry.xml b/android/3rd_party/BottomSheet/src/main/res/layout/bs_list_entry.xml deleted file mode 100644 index bf3907f7a3..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/layout/bs_list_entry.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/values-land/integer.xml b/android/3rd_party/BottomSheet/src/main/res/values-land/integer.xml deleted file mode 100644 index 14b618e725..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/values-land/integer.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 4 - 2 - 3 - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/values-sw600dp-land/integer.xml b/android/3rd_party/BottomSheet/src/main/res/values-sw600dp-land/integer.xml deleted file mode 100644 index b9f4d35128..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/values-sw600dp-land/integer.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 5 - 2 - 4 - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/values-sw600dp/integer.xml b/android/3rd_party/BottomSheet/src/main/res/values-sw600dp/integer.xml deleted file mode 100644 index 59e2da2350..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/values-sw600dp/integer.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 4 - 3 - 5 - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/values-zh/string.xml b/android/3rd_party/BottomSheet/src/main/res/values-zh/string.xml deleted file mode 100644 index 3028014861..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/values-zh/string.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - 更多 - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/values/attrs.xml b/android/3rd_party/BottomSheet/src/main/res/values/attrs.xml deleted file mode 100644 index a526689586..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/values/attrs.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/values/colors.xml b/android/3rd_party/BottomSheet/src/main/res/values/colors.xml deleted file mode 100644 index c9cfaa2198..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - #1f000000 - #1fffffff - - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/values/dimens.xml b/android/3rd_party/BottomSheet/src/main/res/values/dimens.xml deleted file mode 100644 index f44cb5bb3f..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/values/dimens.xml +++ /dev/null @@ -1,7 +0,0 @@ - - -8dp - 0dp - 8dp - 8dp - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/values/ids.xml b/android/3rd_party/BottomSheet/src/main/res/values/ids.xml deleted file mode 100644 index 267747edcc..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/values/ids.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/values/integer.xml b/android/3rd_party/BottomSheet/src/main/res/values/integer.xml deleted file mode 100644 index 151505b1b0..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/values/integer.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 3 - 3 - 5 - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/values/string.xml b/android/3rd_party/BottomSheet/src/main/res/values/string.xml deleted file mode 100644 index b3d0b5166a..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/values/string.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - More - \ No newline at end of file diff --git a/android/3rd_party/BottomSheet/src/main/res/values/styles.xml b/android/3rd_party/BottomSheet/src/main/res/values/styles.xml deleted file mode 100644 index 1fc36082df..0000000000 --- a/android/3rd_party/BottomSheet/src/main/res/values/styles.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file