Compare commits
2 Commits
master
...
fix-on-att
| Author | SHA1 | Date |
|---|---|---|
|
|
1735899c9c | |
|
|
ce565e6e8a |
|
|
@ -14,12 +14,12 @@ def gitCommitCount =
|
|||
Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.2"
|
||||
compileSdkVersion 24
|
||||
buildToolsVersion "23.0.3"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 24
|
||||
versionCode gitCommitCount
|
||||
versionName gitTag
|
||||
}
|
||||
|
|
@ -27,9 +27,9 @@ android {
|
|||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.android.support:appcompat-v7:23.4.0'
|
||||
compile 'com.android.support:support-v4:23.4.0'
|
||||
compile 'com.android.support:recyclerview-v7:23.4.0'
|
||||
compile 'com.android.support:appcompat-v7:24.0.0'
|
||||
compile 'com.android.support:support-v4:24.0.0'
|
||||
compile 'com.android.support:recyclerview-v7:24.0.0'
|
||||
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,11 @@
|
|||
|
||||
package com.nononsenseapps.filepicker;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
|
@ -350,9 +352,27 @@ public abstract class AbstractFilePickerFragment<T> extends Fragment
|
|||
return checkable;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onAttach(Activity activity) {
|
||||
super.onAttach(activity);
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
||||
onAttachToContext(activity);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(23)
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
onAttachToContext(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when attached to activity/context
|
||||
* @param context we attached to
|
||||
*/
|
||||
protected void onAttachToContext(Context context) {
|
||||
try {
|
||||
mListener = (OnFilePickedListener) context;
|
||||
} catch (ClassCastException e) {
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ def gitCommitCount =
|
|||
Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.2"
|
||||
compileSdkVersion 24
|
||||
buildToolsVersion "23.0.3"
|
||||
|
||||
packagingOptions {
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
|
|
@ -25,7 +25,7 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
minSdkVersion 18
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 24
|
||||
versionCode gitCommitCount
|
||||
versionName gitTag
|
||||
archivesBaseName = "nononsensefilepicker-sample-${gitTag}".toString()
|
||||
|
|
|
|||
Loading…
Reference in New Issue