8000 fix bug and modify readme by molihuan · Pull Request #10 · molihuan/mlhfileselectorlib · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix bug and modify readme #10

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

Merged
merged 1 commit into from
Dec 31, 2022
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 LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright [2020] molihuan

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
41 changes: 29 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ dependencyResolutionManagement {
```java
dependencies {
...
// 请将"版本"替换成具体的版本号,如 1.1.7
// 请将"版本"替换成具体的版本号,如 1.1.11
implementation 'io.github.molihuan:pathselector:版本'
}
```
Expand All @@ -103,10 +103,10 @@ PathSelector.build(this, MConstants.BUILD_DIALOG)//Dialog构建方式
.setMorePopupItemListeners(
new CommonItemListener("OK") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {

/**取消dialog弹窗
* pathSelectFragment.getSelectConfigData().buildController.getDialogFragment().dismiss();
* pathSelectFragment.dismiss();
*/

StringBuilder builder = new StringBuilder();
Expand Down Expand Up @@ -144,7 +144,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_ACTIVITY
.setMorePopupItemListeners(
new CommonItemListener("OK") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {

StringBuilder builder = new StringBuilder();
builder.append("you selected:\n");
Expand Down Expand Up @@ -180,7 +180,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_FRAGMENT
.setMorePopupItemListeners(
new CommonItemListener("OK") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {

StringBuilder builder = new StringBuilder();
builder.append("you selected:\n");
Expand Down Expand Up @@ -250,14 +250,14 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)
.setMorePopupItemListeners(//设置右上角选项回调
new CommonItemListener("SelectAll") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
pathSelectFragment.selectAllFile(true);
return false;
}
},
new CommonItemListener("DeselectAll") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
pathSelectFragment.selectAllFile(false);
return false;
}
Expand All @@ -266,7 +266,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)
.setHandleItemListeners(//设置长按弹出选项回调
new CommonItemListener("OK") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
StringBuilder builder = new StringBuilder();
builder.append("you selected:\n");
for (FileBean fileBean : selectedFiles) {
Expand All @@ -278,7 +278,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)
},
new CommonItemListener("cancel") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
pathSelectFragment.openCloseMultipleMode(false);
return false;
}
Expand All @@ -304,7 +304,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)
//R.drawable.ic_test_mlh是你自己的图片资源id
new CommonItemListener(new FontBean("OK", 18, Color.RED, R.drawable.ic_test_mlh)) {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
Mtools.toast("You Click");
return false;
}
Expand Down Expand Up @@ -335,7 +335,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)
}

@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
Mtools.toast("You Click");
return false;
}
Expand Down Expand Up @@ -508,4 +508,21 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)

开源项目以及其依赖项目。

### [LICENSE ](https://github.com/molihuan/mlhfileselectorlib/blob/master/LICENSE)
### LICENSE

```
Copyright [2020] molihuan

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

42 changes: 29 additions & 13 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ dependencyResolutionManagement {
```java
dependencies {
...
// Please replace "version" with a specific version number, e.g. 1.1.7
// Please replace "version" with a specific version number, e.g. 1.1.11
implementation 'io.github.molihuan:pathselector:version'
}
```
B422 Expand All @@ -103,10 +103,10 @@ PathSelector.build(this, MConstants.BUILD_DIALOG)//Dialog build mode
.setMorePopupItemListeners(
new CommonItemListener("OK") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {

/**dialog.dismiss()
* pathSelectFragment.getSelectConfigData().buildController.getDialogFragment().dismiss();
/**Dialog dismiss
* pathSelectFragment.dismiss();
*/

StringBuilder builder = new StringBuilder();
Expand Down Expand Up @@ -144,7 +144,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_ACTIVITY
.setMorePopupItemListeners(
new CommonItemListener("OK") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {

StringBuilder builder = new StringBuilder();
builder.append("you selected:\n");
Expand Down Expand Up @@ -180,7 +180,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_FRAGMENT
.setMorePopupItemListeners(
new CommonItemListener("OK") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {

StringBuilder builder = new StringBuilder();
builder.append("you selected:\n");
Expand Down Expand Up @@ -250,14 +250,14 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)
.setMorePopupItemListeners(//Set the top right option callback
new CommonItemListener("SelectAll") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
pathSelectFragment.selectAllFile(true);
return false;
}
},
new CommonItemListener("DeselectAll") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
pathSelectFragment.selectAllFile(false);
return false;
}
Expand All @@ -266,7 +266,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)
.setHandleItemListeners(//Set long press pop-up option callback
new CommonItemListener("OK") {
10A2D @Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
StringBuilder builder = new StringBuilder();
builder.append("you selected:\n");
for (FileBean fileBean : selectedFiles) {
Expand All @@ -278,7 +278,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)
},
new CommonItemListener("cancel") {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
pathSelectFragment.openCloseMultipleMode(false);
return false;
}
Expand All @@ -304,7 +304,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)
//R.drawable.ic_test_mlh is your own image resource id
new CommonItemListener(new FontBean("OK", 18, Color.RED, R.drawable.ic_test_mlh)) {
@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
Mtools.toast("You Click");
return false;
}
Expand Down Expand Up @@ -335,7 +335,7 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)
}

@Override
public boolean onClick(View v, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
public boolean onClick(View v, TextView tv, List<FileBean> selectedFiles, String currentPath, BasePathSelectFragment pathSelectFragment) {
Mtools.toast("You Click");
return false;
}
Expand Down Expand Up @@ -509,4 +509,20 @@ PathSelectFragment selector = PathSelector.build(this, MConstants.BUILD_DIALOG)

Open source projects and their dependencies.

### [LICENSE ](https://github.com/molihuan/mlhfileselectorlib/blob/master/LICENSE)
### LICENSE

```
Copyright [2020] molihuan

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
Binary file modified app/release/app-release.apk
Binary file not shown.
Loading
0