Skip to content

Commit

Permalink
Merge pull request #104 from Mindinventory/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
akashmi authored Sep 8, 2023
2 parents 5643c1d + 4bb448c commit 2faf654
Show file tree
Hide file tree
Showing 16 changed files with 1,113 additions and 1,011 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Lassi is simplest way to pick media (either image, video, audio or doc)
.setMaxCount(5)
.setGridSize(3)
.setMediaType(MediaType.VIDEO) // MediaType : VIDEO IMAGE, AUDIO OR DOC
.setCompressionRation(10) // compress image for single item selection (can be 0 to 100)
.setCompressionRatio(10) // compress image for single item selection (can be 0 to 100)
.setMinTime(15) // for MediaType.VIDEO only
.setMaxTime(30) // for MediaType.VIDEO only
.setSupportedFileTypes("mp4", "mkv", "webm", "avi", "flv", "3gp") // Filter by limited media format (Optional)
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ plugins {

android {
namespace 'com.lassi.app'
compileSdk 33
compileSdk 34
defaultConfig {
applicationId "com.lassi.app"
minSdk 21
targetSdk 33
targetSdk 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -48,13 +48,13 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.10.0'
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation project(path: ':lassi')
implementation 'androidx.recyclerview:recyclerview:1.3.0'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'androidx.cardview:cardview:1.0.0'

implementation 'com.github.bumptech.glide:glide:4.14.2'
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/java/com/lassi/app/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.lassi.common.utils.KeyUtils
import com.lassi.data.media.MiMedia
import com.lassi.domain.media.LassiOption
import com.lassi.domain.media.MediaType
import com.lassi.domain.media.SortingOption
import com.lassi.presentation.builder.Lassi
import com.lassi.presentation.common.decoration.GridSpacingItemDecoration
import com.lassi.presentation.cropper.CropImageView
Expand Down Expand Up @@ -55,6 +56,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener {
val intent = Lassi(this)
.with(LassiOption.CAMERA_AND_GALLERY)
.setMaxCount(1)
.setAscSort(SortingOption.ASCENDING)
.setGridSize(2)
.setPlaceHolder(R.drawable.ic_image_placeholder)
.setErrorDrawable(R.drawable.ic_image_placeholder)
Expand All @@ -68,7 +70,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener {
.setGalleryBackgroundColor(R.color.colorGrey)
.setCropType(CropImageView.CropShape.OVAL)
.setCropAspectRatio(1, 1)
.setCompressionRation(10)
.setCompressionRatio(10)
.setMinFileSize(0)
.setMaxFileSize(10000)
.enableActualCircleCrop()
Expand Down Expand Up @@ -177,7 +179,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener {
.setMediaType(MediaType.IMAGE)
.setCropType(CropImageView.CropShape.OVAL)
.setCropAspectRatio(1, 1)
.setCompressionRation(0)
.setCompressionRatio(0)
.setMinFileSize(0)
.setMaxFileSize(1000000)
.enableActualCircleCrop()
Expand Down Expand Up @@ -208,7 +210,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener {
.setGalleryBackgroundColor(R.color.colorGrey)
.setCropType(CropImageView.CropShape.OVAL)
.setCropAspectRatio(1, 1)
.setCompressionRation(0)
.setCompressionRatio(0)
.setMinFileSize(0)
.setMaxFileSize(10000)
.enableActualCircleCrop()
Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
agp_version = '8.1.1'
}
ext.kotlin_version = '1.8.20'
repositories {
google()
Expand All @@ -11,7 +14,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.1'
classpath "com.android.tools.build:gradle:$agp_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// NOTE: Do not place your application dependencies here; they belong
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon May 15 16:07:45 IST 2023
#Thu Aug 31 11:56:21 IST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
26 changes: 13 additions & 13 deletions lassi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ group='com.github.Mindinventory'

android {
namespace 'com.lassi'
compileSdk 33
compileSdk 34
defaultConfig {
minSdk 21
targetSdk 33
versionCode 25
versionName "1.2.0"
targetSdk 34
versionCode 26
versionName "1.3.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
Expand Down Expand Up @@ -49,10 +49,10 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.10.0'
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation "androidx.recyclerview:recyclerview:1.3.0"
implementation "androidx.recyclerview:recyclerview:1.3.1"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.github.livefront:bridge:v1.2.0'
testImplementation 'junit:junit:4.13.2'
Expand All @@ -62,25 +62,25 @@ dependencies {
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'

// Google material
implementation 'com.google.android.material:material:1.8.0'
implementation 'com.google.android.material:material:1.9.0'

// glide
implementation 'com.github.bumptech.glide:glide:4.14.2'
kapt 'com.github.bumptech.glide:compiler:4.14.2'
implementation 'androidx.exifinterface:exifinterface:1.3.6'

implementation "androidx.activity:activity-ktx:1.7.1"
implementation 'androidx.fragment:fragment-ktx:1.5.7'
implementation "androidx.activity:activity-ktx:1.7.2"
implementation 'androidx.fragment:fragment-ktx:1.6.1'

implementation "androidx.multidex:multidex:2.0.1"

// Room DB
implementation 'androidx.room:room-runtime:2.5.1'
kapt 'androidx.room:room-compiler:2.5.1'
implementation 'androidx.room:room-ktx:2.5.1'
implementation 'androidx.room:room-runtime:2.5.2'
kapt 'androidx.room:room-compiler:2.5.2'
implementation 'androidx.room:room-ktx:2.5.2'

//Coroutine
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'

//Gson
implementation 'com.google.code.gson:gson:2.10'
Expand Down
10 changes: 7 additions & 3 deletions lassi/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

<!-- Required only if your app targets Android 13. -->
<!-- Required only if your app targets Android 13+. -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />

<!-- Required to maintain app compatibility. -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />

<application
android:requestLegacyExternalStorage="true"
Expand Down
3 changes: 3 additions & 0 deletions lassi/src/main/java/com/lassi/common/utils/KeyUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ object KeyUtils {
const val TEN_SECOND_INTERVAL = 10 * 1000L
const val SETTINGS_REQUEST_CODE = 100
const val DEFAULT_FILE_SIZE = 0L
const val DESCENDING_ORDER = 0
const val ASCENDING_ORDER = 1
const val DEFAULT_ORDER = 2
}
Loading

0 comments on commit 2faf654

Please sign in to comment.