Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova 7+ Support #5

Merged
merged 4 commits into from
Jun 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-image-picker",
"version": "1.2.0",
"version": "1.2.3",
"description": "This plugin allows selection of multiple images from the camera roll / gallery in a phonegap app",
"cordova": {
"id": "cordova-plugin-image-picker",
Expand Down
68 changes: 34 additions & 34 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-image-picker"
version="1.1.1">
version="1.2.3">

<dependency id="cordova-plugin-donkeyfont" url="https://github.com/zenput/cordova-plugin-donkeyfont" commit="v1.0" />
<dependency id="cordova-plugin-donkeyfont" url="https://github.com/zenput/cordova-plugin-donkeyfont" commit="v1.0.1" />
<name>ImagePicker</name>

<description>
Expand Down Expand Up @@ -75,47 +75,47 @@
</feature>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest/application">
<config-file target="app/src/main/AndroidManifest.xml" parent="/manifest/application">
<activity android:label="@string/multi_app_name" android:name="com.synconset.MultiImageChooserActivity" android:theme="@android:style/Theme.Holo.Light">
</activity>
</config-file>

<config-file target="AndroidManifest.xml" parent="/manifest">
<config-file target="app/src/main/AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</config-file>

<source-file src="src/android/com/synconset/ImagePicker/ImagePicker.java" target-dir="src/com/synconset" />
<source-file src="src/android/com/synconset/ImagePicker/FakeR.java" target-dir="src/com/synconset" />
<source-file src="src/android/com/synconset/ImagePicker/ImagePicker.java" target-dir="app/src/main/java/com/synconset" />
<source-file src="src/android/com/synconset/ImagePicker/FakeR.java" target-dir="app/src/main/java/com/synconset" />

<source-file src="src/android/Library/src/ImageFetcher.java" target-dir="src/com/synconset"/>
<source-file src="src/android/Library/src/MultiImageChooserActivity.java" target-dir="src/com/synconset"/>
<source-file src="src/android/Library/src/ImageFetcher.java" target-dir="app/src/main/java/com/synconset"/>
<source-file src="src/android/Library/src/MultiImageChooserActivity.java" target-dir="app/src/main/java/com/synconset"/>

<source-file src="src/android/Library/res/anim/image_pop_in.xml" target-dir="res/anim"/>
<source-file src="src/android/Library/res/drawable/grid_background.xml" target-dir="res/drawable"/>
<source-file src="src/android/Library/res/drawable-hdpi/image_bg.9.png" target-dir="res/drawable-hdpi"/>
<source-file src="src/android/Library/res/drawable-hdpi/loading_icon.png" target-dir="res/drawable-hdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_discard_dark.png" target-dir="res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_discard_light.png" target-dir="res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_done_dark.png" target-dir="res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_done_light.png" target-dir="res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_launcher.png" target-dir="res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_discard_dark.png" target-dir="res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_discard_light.png" target-dir="res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_done_dark.png" target-dir="res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_done_light.png" target-dir="res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_launcher.png" target-dir="res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/layout/actionbar_custom_view_done_discard.xml" target-dir="res/layout"/>
<source-file src="src/android/Library/res/layout/actionbar_discard_button.xml" target-dir="res/layout"/>
<source-file src="src/android/Library/res/layout/actionbar_done_button.xml" target-dir="res/layout"/>
<source-file src="src/android/Library/res/layout/multiselectorgrid.xml" target-dir="res/layout"/>
<source-file src="src/android/Library/res/values/multiimagechooser_strings_en.xml" target-dir="res/values"/>
<source-file src="src/android/Library/res/values/themes.xml" target-dir="res/values"/>
<source-file src="src/android/Library/res/anim/image_pop_in.xml" target-dir="app/src/main/res/anim"/>
<source-file src="src/android/Library/res/drawable/grid_background.xml" target-dir="app/src/main/res/drawable"/>
<source-file src="src/android/Library/res/drawable-hdpi/image_bg.9.png" target-dir="app/src/main/res/drawable-hdpi"/>
<source-file src="src/android/Library/res/drawable-hdpi/loading_icon.png" target-dir="app/src/main/res/drawable-hdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_discard_dark.png" target-dir="app/src/main/res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_discard_light.png" target-dir="app/src/main/res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_done_dark.png" target-dir="app/src/main/res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_action_done_light.png" target-dir="app/src/main/res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-mdpi/ic_launcher.png" target-dir="app/src/main/res/drawable-mdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_discard_dark.png" target-dir="app/src/main/res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_discard_light.png" target-dir="app/src/main/res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_done_dark.png" target-dir="app/src/main/res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_action_done_light.png" target-dir="app/src/main/res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/drawable-xhdpi/ic_launcher.png" target-dir="app/src/main/res/drawable-xhdpi"/>
<source-file src="src/android/Library/res/layout/actionbar_custom_view_done_discard.xml" target-dir="app/src/main/res/layout"/>
<source-file src="src/android/Library/res/layout/actionbar_discard_button.xml" target-dir="app/src/main/res/layout"/>
<source-file src="src/android/Library/res/layout/actionbar_done_button.xml" target-dir="app/src/main/res/layout"/>
<source-file src="src/android/Library/res/layout/multiselectorgrid.xml" target-dir="app/src/main/res/layout"/>
<source-file src="src/android/Library/res/values/multiimagechooser_strings_en.xml" target-dir="app/src/main/res/values"/>
<source-file src="src/android/Library/res/values/themes.xml" target-dir="app/src/main/res/values"/>

<source-file src="src/android/Library/res/values-de/multiimagechooser_strings_de.xml" target-dir="res/values-de"/>
<source-file src="src/android/Library/res/values-es/multiimagechooser_strings_es.xml" target-dir="res/values-es"/>
<source-file src="src/android/Library/res/values-fr/multiimagechooser_strings_fr.xml" target-dir="res/values-fr"/>
<source-file src="src/android/Library/res/values-hu/multiimagechooser_strings_hu.xml" target-dir="res/values-hu"/>
<source-file src="src/android/Library/res/values-ja/multiimagechooser_strings_ja.xml" target-dir="res/values-ja"/>
<source-file src="src/android/Library/res/values-ko/multiimagechooser_strings_ko.xml" target-dir="res/values-ko"/>
<source-file src="src/android/Library/res/values-de/multiimagechooser_strings_de.xml" target-dir="app/src/main/res/values-de"/>
<source-file src="src/android/Library/res/values-es/multiimagechooser_strings_es.xml" target-dir="app/src/main/res/values-es"/>
<source-file src="src/android/Library/res/values-fr/multiimagechooser_strings_fr.xml" target-dir="app/src/main/res/values-fr"/>
<source-file src="src/android/Library/res/values-hu/multiimagechooser_strings_hu.xml" target-dir="app/src/main/res/values-hu"/>
<source-file src="src/android/Library/res/values-ja/multiimagechooser_strings_ja.xml" target-dir="app/src/main/res/values-ja"/>
<source-file src="src/android/Library/res/values-ko/multiimagechooser_strings_ko.xml" target-dir="app/src/main/res/values-ko"/>
</platform>
</plugin>
2 changes: 1 addition & 1 deletion src/android/Library/src/ImageFetcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public BitmapFetcherTask getBitmapDownloaderTask() {
private final HashMap<Integer, Bitmap> sHardBitmapCache = new LinkedHashMap<Integer, Bitmap>(
HARD_CACHE_CAPACITY / 2, 0.75f, true) {
@Override
protected boolean removeEldestEntry(LinkedHashMap.Entry<Integer, Bitmap> eldest) {
protected boolean removeEldestEntry(HashMap.Entry<Integer, Bitmap> eldest) {
if (size() > HARD_CACHE_CAPACITY) {
// Entries push-out of hard reference cache are transferred to
// soft reference cache
Expand Down