diff --git a/build.gradle b/build.gradle index 6038229b..886f6698 100644 --- a/build.gradle +++ b/build.gradle @@ -1,23 +1,16 @@ buildscript { - ext.kotlin_version = '1.7.20' + ext.kotlin_version = '1.9.24' ext.core_ktx_version = '1.9.0' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' + classpath 'com.android.tools.build:gradle:8.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } -ext { - sdk = [ - compileSdk: 33, - targetSdk : 33, - minSdk : 21 - ] -} allprojects { repositories { diff --git a/gradle.properties b/gradle.properties index e77c8538..9ab1aedf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,6 +16,18 @@ # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true + +# Enable AndroidX android.useAndroidX=true -org.gradle.jvmargs=-XX:MaxMetaspaceSize=1g -org.gradle.jvmargs=-Xmx2g + +# JVM arguments for Gradle daemon - combine heap size and metaspace settings +org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 + +# Enable parallel builds and configuration cache for better performance +org.gradle.parallel=true +org.gradle.caching=true +org.gradle.configureondemand=true + +# Kotlin incremental compilation +kotlin.incremental=true +kotlin.incremental.android=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 13372aef..a4b76b95 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 14e92a46..9355b415 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Sun Feb 14 17:02:05 WIB 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip diff --git a/gradlew b/gradlew index 9d82f789..f5feea6d 100755 --- a/gradlew +++ b/gradlew @@ -1,74 +1,130 @@ -#!/usr/bin/env bash +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# 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 +# +# https://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. +# +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum -warn ( ) { +warn () { echo "$*" -} +} >&2 -die ( ) { +die () { echo echo "$*" echo exit 1 -} +} >&2 # 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 - ;; +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac -# 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\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - 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" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -77,84 +133,120 @@ 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. + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + 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 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 +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac 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 +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) -# 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"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # 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\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=$((i+1)) + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg 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 "$@" +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 8a0b282a..9b42019c 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,90 +1,94 @@ -@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 +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@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 + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@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="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +: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 %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 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! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/imagepicker/build.gradle b/imagepicker/build.gradle index 1921b3c9..41c2ce34 100644 --- a/imagepicker/build.gradle +++ b/imagepicker/build.gradle @@ -2,16 +2,16 @@ plugins { id "com.android.library" id "kotlin-android" id "kotlin-parcelize" + id "maven-publish" } android { - final sdk = rootProject.ext.sdk - compileSdkVersion sdk.compileSdk + compileSdk 35 defaultConfig { - minSdkVersion sdk.minSdk - targetSdkVersion sdk.targetSdk + minSdk 21 + targetSdk 35 } buildFeatures { @@ -26,8 +26,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } lint { @@ -44,24 +44,49 @@ android { namespace 'com.esafirm.imagepicker' } +kotlin { + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of(17)) + } +} + +// Create sourcesJar task tasks.register("sourcesJar", Jar) { from android.sourceSets.main.java.srcDirs archiveClassifier.set('sources') } -artifacts { - archives sourcesJar +// Publishing configuration +afterEvaluate { + publishing { + publications { + imagepicker(MavenPublication) { + groupId = 'com.github.turvoiz' + artifactId = 'android-image-picker' + version = 'v1.0.8' + + // Add artifacts manually instead of using components.release + artifact bundleReleaseAar + artifact sourcesJar + + // Add POM configuration + pom { + packaging = 'aar' + name = 'Android Image Picker' + description = 'A simple library to select images from gallery and camera' + } + } + } + } } dependencies { implementation "com.github.bumptech.glide:glide:4.14.2" implementation 'androidx.recyclerview:recyclerview:1.2.1' - implementation 'androidx.appcompat:appcompat:1.5.1' - - implementation "androidx.core:core-ktx:$core_ktx_version" + implementation "androidx.core:core-ktx:1.10.1" testImplementation platform("org.junit:junit-bom:5.9.1") testImplementation "org.junit.jupiter:junit-jupiter" testImplementation 'com.natpryce:hamkrest:1.8.0.1' -} +} \ No newline at end of file diff --git a/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImagePickerActivity.kt b/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImagePickerActivity.kt index 8ece339f..1b64e208 100644 --- a/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImagePickerActivity.kt +++ b/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImagePickerActivity.kt @@ -1,37 +1,58 @@ package com.esafirm.imagepicker.features import android.app.Activity +import android.app.ActivityManager import android.content.Context import android.content.Intent +import android.graphics.Bitmap +import android.graphics.BitmapFactory +import android.graphics.Color import android.graphics.PorterDuff +import android.os.Build import android.os.Bundle +import android.util.Log import android.view.Menu import android.view.MenuItem +import android.view.View +import android.view.WindowInsetsController +import android.widget.Toast import androidx.activity.result.ActivityResult import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.ActionBar import androidx.appcompat.app.AppCompatActivity -import androidx.appcompat.widget.Toolbar +import androidx.core.content.ContextCompat +import androidx.core.view.ViewCompat +import androidx.core.view.WindowInsetsCompat import com.esafirm.imagepicker.R +import com.esafirm.imagepicker.databinding.EfActivityImagePickerBinding import com.esafirm.imagepicker.features.cameraonly.CameraOnlyConfig +import com.esafirm.imagepicker.features.common.BaseConfig import com.esafirm.imagepicker.helper.ConfigUtils import com.esafirm.imagepicker.helper.ImagePickerUtils import com.esafirm.imagepicker.helper.IpCrasher import com.esafirm.imagepicker.helper.LocaleManager import com.esafirm.imagepicker.helper.ViewUtils import com.esafirm.imagepicker.model.Image +import java.io.File class ImagePickerActivity : AppCompatActivity(), ImagePickerInteractionListener { + companion object { + private const val TAG = "ImagePickerActivity" + private const val DEFAULT_MAX_WIDTH = 1920 + private const val DEFAULT_MAX_HEIGHT = 1080 + private const val MIN_IMAGE_SIZE = 1 + } + private val cameraModule = ImagePickerComponentsHolder.cameraModule private var actionBar: ActionBar? = null private lateinit var imagePickerFragment: ImagePickerFragment + private lateinit var binding: EfActivityImagePickerBinding private val config: ImagePickerConfig? by lazy { intent.extras!!.getParcelable(ImagePickerConfig::class.java.simpleName) } - private val cameraOnlyConfig: CameraOnlyConfig? by lazy { intent.extras?.getParcelable(CameraOnlyConfig::class.java.simpleName) } @@ -41,19 +62,7 @@ class ImagePickerActivity : AppCompatActivity(), ImagePickerInteractionListener private val startForCameraResult = registerForActivityResult( ActivityResultContracts.StartActivityForResult() ) { result: ActivityResult -> - val resultCode = result.resultCode - if (resultCode == Activity.RESULT_CANCELED) { - cameraModule.removeImage(this) - setResult(RESULT_CANCELED) - finish() - return@registerForActivityResult - } - if (resultCode == Activity.RESULT_OK) { - cameraModule.getImage(this, result.data) { images -> - val resultIntent = ImagePickerUtils.createResultIntent(images) - finishPickImages(resultIntent) - } - } + handleCameraResult(result) } override fun attachBaseContext(newBase: Context) { @@ -62,24 +71,53 @@ class ImagePickerActivity : AppCompatActivity(), ImagePickerInteractionListener public override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + Log.d(TAG, "Starting ImagePickerActivity") + + try { + initializeActivity(savedInstanceState) + } catch (e: Exception) { + Log.e(TAG, "Error in onCreate", e) + handleImageError(e, "onCreate") + finish() + } + } + + private fun initializeActivity(savedInstanceState: Bundle?) { setResult(RESULT_CANCELED) /* This should not happen */ val intent = intent if (intent == null || intent.extras == null) { + Log.e(TAG, "Intent or extras is null") IpCrasher.openIssue() } if (isCameraOnly) { - val cameraIntent = cameraModule.getCameraIntent(this, cameraOnlyConfig!!) - startForCameraResult.launch(cameraIntent) + handleCameraOnlyMode() return } val currentConfig = config!! + + // Validate configuration before use + if (!validateConfig(currentConfig)) { + Log.e(TAG, "Invalid configuration") + handleImageError(Exception("Invalid configuration"), "configuration") + finish() + return + } + setTheme(currentConfig.theme) - setContentView(R.layout.ef_activity_image_picker) + + // Apply system bar colors + setupSystemBars(currentConfig) + + // Initialize ViewBinding + binding = EfActivityImagePickerBinding.inflate(layoutInflater) + setContentView(binding.root) + setupView(currentConfig) + setupImageProcessing(currentConfig) if (savedInstanceState != null) { // The fragment has been restored. @@ -93,6 +131,357 @@ class ImagePickerActivity : AppCompatActivity(), ImagePickerInteractionListener } } + private fun handleCameraOnlyMode() { + try { + // Apply system bar colors even for camera-only mode + cameraOnlyConfig?.let { setupSystemBars(it) } + + val cameraIntent = cameraModule.getCameraIntent(this, cameraOnlyConfig!!) + startForCameraResult.launch(cameraIntent) + } catch (e: Exception) { + Log.e(TAG, "Error in camera-only mode", e) + handleImageError(e, "camera-only mode") + finish() + } + } + + private fun handleCameraResult(result: ActivityResult) { + val resultCode = result.resultCode + Log.d(TAG, "Camera result received with code: $resultCode") + + if (resultCode == Activity.RESULT_CANCELED) { + cameraModule.removeImage(this) + setResult(RESULT_CANCELED) + finish() + return + } + + if (resultCode == Activity.RESULT_OK) { + try { + cameraModule.getImage(this, result.data) { images -> + if (images != null) { + processImages(images) + } + } + } catch (e: Exception) { + Log.e(TAG, "Error processing camera result", e) + handleImageError(e, "camera result processing") + setResult(RESULT_CANCELED) + finish() + } + } + } + + private fun processImages(images: List) { + try { + Log.d(TAG, "Processing ${images.size} images") + + // Validate images before processing + val validImages = images.filter { image -> + validateImage(image.path) + } + + if (validImages.isEmpty()) { + Log.e(TAG, "No valid images found") + handleImageError(Exception("No valid images found"), "image validation") + setResult(RESULT_CANCELED) + finish() + return + } + + Log.d(TAG, "Found ${validImages.size} valid images out of ${images.size}") + + val resultIntent = ImagePickerUtils.createResultIntent(validImages) + finishPickImages(resultIntent) + } catch (e: Exception) { + Log.e(TAG, "Error processing images", e) + handleImageError(e, "image processing") + setResult(RESULT_CANCELED) + finish() + } + } + + private fun validateImage(imagePath: String): Boolean { + return try { + Log.d(TAG, "Validating image: $imagePath") + + // Check if file exists + val file = File(imagePath) + if (!file.exists()) { + Log.e(TAG, "Image file does not exist: $imagePath") + return false + } + + if (file.length() == 0L) { + Log.e(TAG, "Image file is empty: $imagePath") + return false + } + + // Check if we can decode bounds + val options = BitmapFactory.Options().apply { + inJustDecodeBounds = true + } + BitmapFactory.decodeFile(imagePath, options) + + val isValid = options.outWidth > MIN_IMAGE_SIZE && options.outHeight > MIN_IMAGE_SIZE + if (!isValid) { + Log.e(TAG, "Invalid image dimensions: ${options.outWidth}x${options.outHeight} for $imagePath") + } else { + Log.d(TAG, "Valid image: ${options.outWidth}x${options.outHeight} for $imagePath") + } + + isValid + } catch (e: Exception) { + Log.e(TAG, "Error validating image file: $imagePath", e) + false + } + } + + private fun decodeSampledBitmapFromFile(imagePath: String, reqWidth: Int = maxImageWidth, reqHeight: Int = maxImageHeight): Bitmap? { + return try { + Log.d(TAG, "Decoding bitmap from: $imagePath") + + // First decode with inJustDecodeBounds=true to check dimensions + val options = BitmapFactory.Options().apply { + inJustDecodeBounds = true + } + BitmapFactory.decodeFile(imagePath, options) + + if (options.outWidth <= 0 || options.outHeight <= 0) { + Log.e(TAG, "Invalid image dimensions: ${options.outWidth}x${options.outHeight}") + return null + } + + // Calculate inSampleSize + options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight) + + // Decode bitmap with inSampleSize set + options.inJustDecodeBounds = false + options.inPreferredConfig = Bitmap.Config.RGB_565 // Use less memory + + val bitmap = BitmapFactory.decodeFile(imagePath, options) + + if (bitmap == null) { + Log.e(TAG, "Failed to decode bitmap from: $imagePath") + } else { + Log.d(TAG, "Successfully decoded bitmap: ${bitmap.width}x${bitmap.height}") + } + + bitmap + } catch (e: OutOfMemoryError) { + Log.e(TAG, "Out of memory while decoding bitmap: $imagePath", e) + System.gc() // Suggest garbage collection + null + } catch (e: Exception) { + Log.e(TAG, "Error decoding bitmap: $imagePath", e) + null + } + } + + private fun calculateInSampleSize(options: BitmapFactory.Options, reqWidth: Int, reqHeight: Int): Int { + val (height: Int, width: Int) = options.run { outHeight to outWidth } + var inSampleSize = 1 + + if (height > reqHeight || width > reqWidth) { + val halfHeight: Int = height / 2 + val halfWidth: Int = width / 2 + + while (halfHeight / inSampleSize >= reqHeight && halfWidth / inSampleSize >= reqWidth) { + inSampleSize *= 2 + } + } + + Log.d(TAG, "Calculated inSampleSize: $inSampleSize for ${width}x${height} -> ${reqWidth}x${reqHeight}") + return inSampleSize + } + + private fun validateConfig(config: ImagePickerConfig): Boolean { + return try { + // Check if theme is valid + if (config.theme != 0) { + setTheme(config.theme) + } + + // Validate color values if they're not NO_COLOR + if (config.statusBarColor != ImagePickerConfig.NO_COLOR) { + // Ensure it's a valid color by trying to parse it + val colorString = String.format("#%08X", config.statusBarColor and 0xFFFFFFFF.toInt()) + Color.parseColor(colorString) + } + + if (config.navigationBarColor != ImagePickerConfig.NO_COLOR) { + val colorString = String.format("#%08X", config.navigationBarColor and 0xFFFFFFFF.toInt()) + Color.parseColor(colorString) + } + + if (config.arrowColor != ImagePickerConfig.NO_COLOR) { + val colorString = String.format("#%08X", config.arrowColor and 0xFFFFFFFF.toInt()) + Color.parseColor(colorString) + } + + Log.d(TAG, "Configuration validation passed") + true + } catch (e: Exception) { + Log.e(TAG, "Invalid configuration", e) + false + } + } + + private var maxImageWidth: Int = DEFAULT_MAX_WIDTH + private var maxImageHeight: Int = DEFAULT_MAX_HEIGHT + private var imageCacheSize: Int = 0 + + private fun setupImageProcessing(config: ImagePickerConfig) { + try { + // Set maximum image size limits - use defaults since config doesn't have these properties + maxImageWidth = DEFAULT_MAX_WIDTH + maxImageHeight = DEFAULT_MAX_HEIGHT + + // Adjust based on device screen size if possible + val displayMetrics = resources.displayMetrics + val screenWidth = displayMetrics.widthPixels + val screenHeight = displayMetrics.heightPixels + + // Use screen dimensions as reasonable limits (with some padding) + maxImageWidth = minOf(DEFAULT_MAX_WIDTH, screenWidth * 2) + maxImageHeight = minOf(DEFAULT_MAX_HEIGHT, screenHeight * 2) + + // Set reasonable memory limits + val activityManager = getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager + val memoryClass = activityManager.memoryClass + imageCacheSize = 1024 * 1024 * memoryClass / 8 // Use 1/8th of available memory + + // Set bitmap options for better memory management + BitmapFactory.Options().apply { + inPreferredConfig = Bitmap.Config.RGB_565 + inPurgeable = true + inInputShareable = true + } + + Log.d(TAG, "Image processing setup - Max size: ${maxImageWidth}x${maxImageHeight}, Cache size: $imageCacheSize, Screen: ${screenWidth}x${screenHeight}") + } catch (e: Exception) { + Log.e(TAG, "Error setting up image processing", e) + // Fallback to defaults if anything goes wrong + maxImageWidth = DEFAULT_MAX_WIDTH + maxImageHeight = DEFAULT_MAX_HEIGHT + } + } + + private fun handleImageError(error: Exception, context: String) { + Log.e(TAG, "Image processing error in $context", error) + + // Show user-friendly error message + runOnUiThread { + val message = when (error) { + is OutOfMemoryError -> "Image too large. Please try a smaller image." + is SecurityException -> "Permission denied accessing image." + else -> "Error processing image. Please try again." + } + + Toast.makeText(this, message, Toast.LENGTH_LONG).show() + } + } + + private fun setupSystemBars(config: BaseConfig) { + try { + val statusBarColor = when (config) { + is ImagePickerConfig -> config.statusBarColor + else -> ImagePickerConfig.NO_COLOR + } + + val navigationBarColor = when (config) { + is ImagePickerConfig -> config.navigationBarColor + else -> ImagePickerConfig.NO_COLOR + } + + val lightStatusBar = when (config) { + is ImagePickerConfig -> config.lightStatusBar + else -> false + } + + val lightNavigationBar = when (config) { + is ImagePickerConfig -> config.lightNavigationBar + else -> false + } + + window.apply { + // Set status bar color + if (statusBarColor != ImagePickerConfig.NO_COLOR) { + this.statusBarColor = statusBarColor + Log.d(TAG, "Set status bar color: $statusBarColor") + } + + // Set navigation bar color + if (navigationBarColor != ImagePickerConfig.NO_COLOR) { + this.navigationBarColor = navigationBarColor + Log.d(TAG, "Set navigation bar color: $navigationBarColor") + } + + // Modern approach for Android 11+ (API 30+) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + // Ensure the decor view is available + val decorView = window.decorView + if (decorView != null) { + val controller = decorView.windowInsetsController + if (controller != null) { + // Set status bar appearance + if (lightStatusBar) { + controller.setSystemBarsAppearance( + WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS, + WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS + ) + } else { + controller.setSystemBarsAppearance( + 0, + WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS + ) + } + + // Set navigation bar appearance + if (lightNavigationBar) { + controller.setSystemBarsAppearance( + WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS, + WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS + ) + } else { + controller.setSystemBarsAppearance( + 0, + WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS + ) + } + } + } + } else { + // Fallback for older versions + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + if (lightStatusBar) { + decorView.systemUiVisibility = decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR + } else { + decorView.systemUiVisibility = decorView.systemUiVisibility and View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv() + } + } + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + if (lightNavigationBar) { + decorView.systemUiVisibility = decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR + } else { + decorView.systemUiVisibility = decorView.systemUiVisibility and View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv() + } + } + } + } + } catch (e: Exception) { + Log.e(TAG, "Error setting up system bars", e) + } + } + + override fun onDestroy() { + super.onDestroy() + Log.d(TAG, "ImagePickerActivity destroyed") + // ViewBinding doesn't require explicit cleanup for Activities + // as the binding is automatically cleared when the Activity is destroyed + } + /** * Create option menus. */ @@ -102,12 +491,16 @@ class ImagePickerActivity : AppCompatActivity(), ImagePickerInteractionListener } override fun onPrepareOptionsMenu(menu: Menu): Boolean { - if (!isCameraOnly) { - menu.findItem(R.id.menu_camera).isVisible = config?.isShowCamera ?: true - menu.findItem(R.id.menu_done).apply { - title = ConfigUtils.getDoneButtonText(this@ImagePickerActivity, config!!) - isVisible = imagePickerFragment.isShowDoneButton + try { + if (!isCameraOnly) { + menu.findItem(R.id.menu_camera).isVisible = config?.isShowCamera ?: true + menu.findItem(R.id.menu_done).apply { + title = ConfigUtils.getDoneButtonText(this@ImagePickerActivity, config!!) + isVisible = imagePickerFragment.isShowDoneButton + } } + } catch (e: Exception) { + Log.e(TAG, "Error preparing options menu", e) } return super.onPrepareOptionsMenu(menu) } @@ -116,45 +509,57 @@ class ImagePickerActivity : AppCompatActivity(), ImagePickerInteractionListener * Handle option menu's click event */ override fun onOptionsItemSelected(item: MenuItem): Boolean { - val id = item.itemId - if (id == android.R.id.home) { - onBackPressed() - return true - } - if (id == R.id.menu_done) { - imagePickerFragment.onDone() - return true - } - if (id == R.id.menu_camera) { - imagePickerFragment.captureImage() - return true + try { + val id = item.itemId + if (id == android.R.id.home) { + onBackPressed() + return true + } + if (id == R.id.menu_done) { + imagePickerFragment.onDone() + return true + } + if (id == R.id.menu_camera) { + imagePickerFragment.captureImage() + return true + } + } catch (e: Exception) { + Log.e(TAG, "Error handling options item selection", e) } return super.onOptionsItemSelected(item) } override fun onBackPressed() { - if (this::imagePickerFragment.isInitialized) { - if (!imagePickerFragment.handleBack()) { + try { + if (this::imagePickerFragment.isInitialized) { + if (!imagePickerFragment.handleBack()) { + super.onBackPressed() + } + } else { super.onBackPressed() } - } else { + } catch (e: Exception) { + Log.e(TAG, "Error handling back press", e) super.onBackPressed() } } private fun setupView(config: ImagePickerConfig) { - val toolbar = findViewById(R.id.toolbar) - setSupportActionBar(toolbar) - actionBar = supportActionBar - actionBar?.run { - val arrowDrawable = ViewUtils.getArrowIcon(this@ImagePickerActivity) - val arrowColor = config.arrowColor - if (arrowColor != ImagePickerConfig.NO_COLOR && arrowDrawable != null) { - arrowDrawable.setColorFilter(arrowColor, PorterDuff.Mode.SRC_ATOP) + try { + setSupportActionBar(binding.toolbar.root as androidx.appcompat.widget.Toolbar) + actionBar = supportActionBar + actionBar?.run { + val arrowDrawable = ViewUtils.getArrowIcon(this@ImagePickerActivity) + val arrowColor = config.arrowColor + if (arrowColor != ImagePickerConfig.NO_COLOR && arrowDrawable != null) { + arrowDrawable.setColorFilter(arrowColor, PorterDuff.Mode.SRC_ATOP) + } + setDisplayHomeAsUpEnabled(true) + setHomeAsUpIndicator(arrowDrawable) + setDisplayShowTitleEnabled(true) } - setDisplayHomeAsUpEnabled(true) - setHomeAsUpIndicator(arrowDrawable) - setDisplayShowTitleEnabled(true) + } catch (e: Exception) { + Log.e(TAG, "Error setting up view", e) } } @@ -163,20 +568,35 @@ class ImagePickerActivity : AppCompatActivity(), ImagePickerInteractionListener /* --------------------------------------------------- */ override fun setTitle(title: String?) { - actionBar?.title = title - invalidateOptionsMenu() + try { + actionBar?.title = title + invalidateOptionsMenu() + } catch (e: Exception) { + Log.e(TAG, "Error setting title", e) + } } override fun cancel() { - finish() + try { + finish() + } catch (e: Exception) { + Log.e(TAG, "Error canceling", e) + } } override fun selectionChanged(imageList: List?) { // Do nothing when the selection changes. + // This method is intentionally left empty as per original implementation } override fun finishPickImages(result: Intent?) { - setResult(RESULT_OK, result) - finish() + try { + setResult(RESULT_OK, result) + finish() + } catch (e: Exception) { + Log.e(TAG, "Error finishing pick images", e) + setResult(RESULT_CANCELED) + finish() + } } -} +} \ No newline at end of file diff --git a/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImagePickerConfig.kt b/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImagePickerConfig.kt index 2e266a41..47ae9f62 100644 --- a/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImagePickerConfig.kt +++ b/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImagePickerConfig.kt @@ -1,5 +1,6 @@ package com.esafirm.imagepicker.features +import android.graphics.Color import android.os.Parcelable import androidx.annotation.StyleRes import com.esafirm.imagepicker.features.common.BaseConfig @@ -28,7 +29,12 @@ class ImagePickerConfig( override var savePath: ImagePickerSavePath = ImagePickerSavePath.DEFAULT, override var returnMode: ReturnMode = ReturnMode.NONE, override var isSaveImage: Boolean = true, - var showDoneButtonAlways: Boolean = false + var showDoneButtonAlways: Boolean = false, + // System bar colors + var statusBarColor: Int = Color.parseColor("#33cccc"), + var navigationBarColor: Int =Color.parseColor("#33cccc"), + var lightStatusBar: Boolean = false, + var lightNavigationBar: Boolean = false ) : BaseConfig(), Parcelable { @IgnoredOnParcel diff --git a/imagepicker/src/main/java/com/esafirm/imagepicker/helper/diff/ValueComparison.kt b/imagepicker/src/main/java/com/esafirm/imagepicker/helper/diff/ValueComparison.kt index d8cf4e39..c0e36756 100644 --- a/imagepicker/src/main/java/com/esafirm/imagepicker/helper/diff/ValueComparison.kt +++ b/imagepicker/src/main/java/com/esafirm/imagepicker/helper/diff/ValueComparison.kt @@ -4,13 +4,13 @@ import androidx.recyclerview.widget.DiffUtil typealias ValueComparison = (T, T) -> Boolean -class DefaultValueComparison : ValueComparison { +class DefaultValueComparison : ValueComparison { override fun invoke(p1: T, p2: T): Boolean { return p1 == p2 } } -class SimpleDiffUtilCallBack( +class SimpleDiffUtilCallBack( private val areItemTheSame: ValueComparison = DefaultValueComparison(), private val areContentTheSame: ValueComparison = DefaultValueComparison() ) : DiffUtil.ItemCallback() { diff --git a/imagepicker/src/main/res/layout/ef_activity_image_picker.xml b/imagepicker/src/main/res/layout/ef_activity_image_picker.xml index 1decb9da..c616d81c 100644 --- a/imagepicker/src/main/res/layout/ef_activity_image_picker.xml +++ b/imagepicker/src/main/res/layout/ef_activity_image_picker.xml @@ -3,7 +3,8 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/main" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:fitsSystemWindows="true"> - - + \ No newline at end of file diff --git a/imagepicker/src/main/res/values-v35/styles.xml b/imagepicker/src/main/res/values-v35/styles.xml new file mode 100644 index 00000000..b2fdc503 --- /dev/null +++ b/imagepicker/src/main/res/values-v35/styles.xml @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/imagepicker/src/main/res/values/styles.xml b/imagepicker/src/main/res/values/styles.xml index 80c4dd53..fa3461ec 100644 --- a/imagepicker/src/main/res/values/styles.xml +++ b/imagepicker/src/main/res/values/styles.xml @@ -4,6 +4,10 @@ true false true + true + @android:color/transparent + true +