Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Extra functionality. #15

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
442 changes: 432 additions & 10 deletions .gitignore

Large diffs are not rendered by default.

147 changes: 0 additions & 147 deletions .idea/codeStyles/Project.xml

This file was deleted.

5 changes: 0 additions & 5 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

19 changes: 0 additions & 19 deletions .idea/gradle.xml

This file was deleted.

14 changes: 0 additions & 14 deletions .idea/misc.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
[![Release](https://jitpack.io/v/kroegerama/bottomsheet-imagepicker.svg)](https://jitpack.io/#kroegerama/bottomsheet-imagepicker)
[![Build Status](https://travis-ci.org/kroegerama/bottomsheet-imagepicker.svg?branch=master)](https://travis-ci.org/kroegerama/bottomsheet-imagepicker)
[![Release](https://jitpack.io/v/rtsketo/bottomsheet-imagepicker.svg)](https://jitpack.io/#rtsketo/bottomsheet-imagepicker)

# Fork Details

This is a variation of the https://github.com/kroegerama/bottomsheet-imagepicker library, with the following changes:
* Restores the functionality of enabling Camera and Gallery button in MultiSelect.
* * cameraButton(ButtonType.Button) to enable.
* * galleryButton(ButtonType.None) to disable.
* Adds the functionality of changing the color of Background, Text and Icons programmatically.
* * backgroundColor(color: ColorInt) to change the background color.
* * textColor(color: ColorInt) to change the text color.
* * iconColor(color: ColorInt) to change the icon color.


# BottomSheet Image Picker for Android

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
implementation 'com.google.android.material:material:1.1.0-rc02'
implementation 'com.google.android.material:material:1.1.0'

implementation 'com.kroegerama:android-kaiteki:2.9.1'

Expand Down
9 changes: 9 additions & 0 deletions app/src/main/java/com/kroegerama/imgpicker/demo/AcMain.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.kroegerama.imgpicker.demo

import android.graphics.Color
import android.net.Uri
import android.view.LayoutInflater
import android.widget.ImageView
Expand All @@ -26,6 +27,9 @@ class AcMain : BaseActivity(
.galleryButton(ButtonType.Button)
.singleSelectTitle(R.string.pick_single)
.peekHeight(R.dimen.peekHeight)
.backgroundColor(Color.BLACK)
.textColor(Color.WHITE)
.iconColor(Color.WHITE)
.requestTag("single")
.show(supportFragmentManager)
}
Expand All @@ -40,6 +44,11 @@ class AcMain : BaseActivity(
R.string.pick_multi_limit
)
.requestTag("multi")
.backgroundColor(Color.BLACK)
.textColor(Color.WHITE)
.iconColor(Color.WHITE)
.cameraButton(ButtonType.Button)
.galleryButton(ButtonType.None)
.show(supportFragmentManager)
}

Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/ac_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="Single"
android:text="@string/single"
app:layout_constraintEnd_toStartOf="@id/btnPickMulti"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -21,7 +21,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:text="Multi"
android:text="@string/multi"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/btnPickSingle"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -31,7 +31,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="Your selection:"
android:text="@string/your_selection"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
app:layout_constraintBottom_toTopOf="@id/scrollView"
app:layout_constraintEnd_toStartOf="@id/btnClear"
Expand All @@ -44,7 +44,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="Clear"
android:text="@string/clear"
app:layout_constraintBaseline_toBaselineOf="@id/lblScroller"
app:layout_constraintEnd_toEndOf="parent" />

Expand Down
Binary file modified app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions app/src/main/res/values-sk/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="pick_single">Vyberte obrázok</string>
<string name="pick_multi_limit">Vyberte ešte %1$d obrázkov</string>
<string name="single">Jeden</string>
<string name="multi">Viacero</string>
<string name="your_selection">Váš výber:</string>
<string name="clear">Vymazať</string>
</resources>
6 changes: 5 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources>
<string name="app_name">BottomSheet Demo</string>
<string name="app_name" translatable="false">BottomSheet Demo</string>

<string name="file_provider" translatable="false">com.kroegerama.imgpicker.demo.fileprovider</string>

Expand All @@ -14,4 +14,8 @@
<item quantity="other">Please select %1$d more images…</item>
</plurals>
<string name="pick_multi_limit">You have more than %1$d images selected…</string>
<string name="single">Single</string>
<string name="multi">Multi</string>
<string name="your_selection">Your selection:</string>
<string name="clear">Clear</string>
</resources>
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.61'
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()

}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.android.tools.build:gradle:4.0.0-rc01'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
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 @@
#Thu Jan 02 12:34:05 CET 2020
#Wed May 27 21:47:29 EEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
Empty file modified gradlew
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
implementation 'com.google.android.material:material:1.1.0-rc02'
implementation 'com.google.android.material:material:1.1.0'

implementation 'com.kroegerama:android-kaiteki:2.9.1'
implementation 'com.kroegerama:recyclerview-kaiteki:1.0.10'
Expand Down
Loading