Skip to content
Permalink
Browse files

进一步优化文件选择器

  • Loading branch information...
Alm
Alm committed Sep 19, 2019
1 parent a725627 commit 35b91dac10901e0d85c1054b19f671a80531b7d8
@@ -18,17 +18,17 @@ allprojects {
#### //依赖本库,在app模块的build.gradle加入加粗的代码,版本号也可改成master-SNAPSHOT直接拿最新代码编译。
<blockquote>
dependencies {
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-viewinject:4.5.6' //运行期注解的butterknife</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-viewinject-annotations:4.5.6' //viewinject的扩展包,要基于viewinject</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-multiproxy:4.5.6' //多渠道开发框架</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-orm:4.5.6' //android系统数据库操作框架</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-mvp:4.5.6' //mvp设计理念</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-widget:4.5.6' //自定义控件,各种UI效果</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-util:4.5.6'//开发工具类</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-xpermission:4.5.6'//动态权限申请</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-av:4.5.6' //音视频开发工具</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-xskin:4.5.6'//一键换肤</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-filechooser:4.5.6'//文件和文件夹路径选择器</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-viewinject:4.5.7' //运行期注解的butterknife</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-viewinject-annotations:4.5.7' //viewinject的扩展包,要基于viewinject</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-multiproxy:4.5.7' //多渠道开发框架</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-orm:4.5.7' //android系统数据库操作框架</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-mvp:4.5.7' //mvp设计理念</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-widget:4.5.7' //自定义控件,各种UI效果</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-util:4.5.7'//开发工具类</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-xpermission:4.5.7'//动态权限申请</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-av:4.5.7 //音视频开发工具</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-xskin:4.5.7'//一键换肤</h3>
<h3>compile 'com.github.JackWHLiu.jackknife:jackknife-filechooser:4.5.7'//文件和文件夹路径选择器</h3>
}
</blockquote>

@@ -45,8 +45,8 @@ ext {
min_sdk : 11,
target_sdk : 26,
build_tools_version : "27.0.3",
release_version_code : 251,
release_version_name : "4.5.6"
release_version_code : 252,
release_version_name : "4.5.7"
]
}

@@ -9,7 +9,8 @@
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true">
<activity android:name=".ui.FileExplorerActivity">
<activity android:name="com.lwh.jackknife.fileexplorer.ui.FileExplorerActivity"
android:theme="@style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="com.lwh.jackknife.action.CHOOSE_FILE"/>
<action android:name="com.lwh.jackknife.action.CHOOSE_FOLDER"/>
@@ -28,22 +28,19 @@
public static final int REQUEST_CODE_CHOOSE_BOTH_FILE_AND_FOLDER = 3;

public static void chooseFile(Activity activity) {
Intent intent = new Intent();
intent.setPackage(activity.getPackageName());
Intent intent = new Intent(activity, FileExplorerActivity.class);
intent.setAction(FileExplorerActivity.ACTION_CHOOSE_FILE);
activity.startActivityForResult(intent, REQUEST_CODE_CHOOSE_FILE);
}

public static void chooseFolder(Activity activity) {
Intent intent = new Intent();
intent.setPackage(activity.getPackageName());
Intent intent = new Intent(activity, FileExplorerActivity.class);
intent.setAction(FileExplorerActivity.ACTION_CHOOSE_FOLDER);
activity.startActivityForResult(intent, REQUEST_CODE_CHOOSE_FOLDER);
}

public static void chooseFileAndFolder(Activity activity) {
Intent intent = new Intent();
intent.setPackage(activity.getPackageName());
Intent intent = new Intent(activity, FileExplorerActivity.class);
intent.setAction(FileExplorerActivity.ACTION_CHOOSE_BOTH_FILE_AND_FOLDER);
activity.startActivityForResult(intent, REQUEST_CODE_CHOOSE_BOTH_FILE_AND_FOLDER);
}

0 comments on commit 35b91da

Please sign in to comment.
You can’t perform that action at this time.