Skip to content

Commit ca8ce68

Browse files
committed
fix zipfragment menu
1 parent df59425 commit ca8ce68

File tree

4 files changed

+171
-33
lines changed

4 files changed

+171
-33
lines changed

PowerFileExplorer/src/main/java/jp/sblo/pandora/jota/SettingsActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1997,7 +1997,7 @@ public static boolean isVersionUp(Context ctx)
19971997
}
19981998
if ( lastversion < 2 ){
19991999
editor.putString(KEY_FONT, "NORMAL");
2000-
editor.putString(KEY_FONT_SIZE, "16");
2000+
editor.putString(KEY_FONT_SIZE, "14");
20012001
editor.putString(KEY_DEFAULT_FOLDER, Environment.getExternalStorageDirectory().getPath());
20022002
}
20032003
if ( lastversion < 3 ){

PowerFileExplorer/src/main/java/net/gnu/explorer/ZipFragment.java

Lines changed: 89 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public class ZipFragment extends FileFrag implements View.OnClickListener {
111111
private static final int REQUEST_CODE_STORAGE_PERMISSION = 101;
112112

113113
private ScaleGestureDetector mScaleGestureDetector;
114-
//private ImageButton dirMore;
114+
private ImageButton dirMore;
115115
private TextView mMessageView;
116116

117117
private SearchFileNameTask searchTask = new SearchFileNameTask();
@@ -310,20 +310,22 @@ public void onViewCreated(View view, Bundle savedInstanceState) {
310310

311311
scrolltext = (HorizontalScrollView) view.findViewById(R.id.scroll_text);
312312
mDirectoryButtons = (LinearLayout) view.findViewById(R.id.directory_buttons);
313-
313+
dirMore = (ImageButton) view.findViewById(R.id.dirMore);
314+
314315
drawableDelete = activity.getDrawable(R.drawable.ic_delete_white_36dp);
315316
drawablePaste = activity.getDrawable(R.drawable.ic_content_paste_white_36dp);
316317
deletePastesBtn = (Button) view.findViewById(R.id.deletes_pastes);
317-
318+
318319
view.findViewById(R.id.copys).setOnClickListener(this);
319320
view.findViewById(R.id.cuts).setOnClickListener(this);
320321
deletePastesBtn.setOnClickListener(this);
321322
view.findViewById(R.id.renames).setOnClickListener(this);
322323
view.findViewById(R.id.shares).setOnClickListener(this);
323-
324+
dirMore.setOnClickListener(this);
325+
324326
view.findViewById(R.id.moreLeft).setVisibility(View.GONE);
325327
view.findViewById(R.id.moreRight).setVisibility(View.GONE);
326-
view.findViewById(R.id.dirMore).setVisibility(View.GONE);
328+
//view.findViewById(R.id.dirMore).setVisibility(View.GONE);
327329
view.findViewById(R.id.infos).setOnClickListener(this);
328330

329331
final View compresssBtn = view.findViewById(R.id.compresss);
@@ -372,7 +374,7 @@ public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
372374

373375
clearButton.setOnClickListener(this);
374376
searchButton.setOnClickListener(this);
375-
377+
376378
searchET.addTextChangedListener(textSearch);
377379
mScaleGestureDetector = new ScaleGestureDetector(getContext(), new ScaleGestureDetector.SimpleOnScaleGestureListener() {
378380

@@ -1099,6 +1101,69 @@ public void onClick(final View v) {
10991101
case R.id.clear:
11001102
searchET.setText("");
11011103
break;
1104+
case R.id.dirMore:
1105+
MenuBuilder menuBuilder = new MenuBuilder(activity);
1106+
1107+
if (activity.multiFiles) {
1108+
1109+
if (slidingTabsFragment.side == SlidingTabsFragment.Side.LEFT && activity.right.getVisibility() == View.VISIBLE
1110+
|| slidingTabsFragment.side == SlidingTabsFragment.Side.RIGHT && activity.left.getVisibility() == View.VISIBLE) {
1111+
menuBuilder.add("Hide");
1112+
} else {
1113+
menuBuilder.add("2 panels");
1114+
}
1115+
menuBuilder.add("Swap panels");
1116+
1117+
if (activity.left.getVisibility() == View.VISIBLE && activity.right.getVisibility() == View.VISIBLE) {
1118+
if (slidingTabsFragment.width <= 0) {
1119+
menuBuilder.add("Wider panel");
1120+
} else {
1121+
menuBuilder.add("2 panels equal");
1122+
}
1123+
}
1124+
1125+
if (activity.COPY_PATH != null || activity.MOVE_PATH != null || activity.EXTRACT_PATH != null || activity.EXTRACT_MOVE_PATH != null) {
1126+
menuBuilder.add("Clear Clipboard");
1127+
}
1128+
}
1129+
1130+
MenuPopupHelper optionsMenu = new MenuPopupHelper(activity , menuBuilder, dirMore);
1131+
1132+
menuBuilder.setCallback(new MenuBuilder.Callback() {
1133+
@Override
1134+
public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
1135+
Log.d(TAG, item.getTitle() + ".");
1136+
if ("Hide".equals(item.getTitle()) || "2 panels".equals(item.getTitle())) {
1137+
hide();
1138+
} else if ("Wider panel".equals(item.getTitle()) || "2 panels equal".equals(item.getTitle())) {
1139+
biggerequalpanel();
1140+
} else if ("Swap panels".equals(item.getTitle())) {
1141+
swap(v);
1142+
} else if ("Clear Clipboard".equals(item.getTitle())) {
1143+
activity.COPY_PATH = null;
1144+
activity.MOVE_PATH = null;
1145+
activity.EXTRACT_PATH = null;
1146+
activity.EXTRACT_MOVE_PATH = null;
1147+
if (activity.curExplorerFrag.selectedInList1.size() == 0 && activity.curExplorerFrag.commands.getVisibility() == View.VISIBLE) {
1148+
activity.curExplorerFrag.commands.setAnimation(AnimationUtils.loadAnimation(activity, R.anim.grow_from_bottom));
1149+
activity.curExplorerFrag.commands.setVisibility(View.GONE);
1150+
activity.curExplorerFrag.horizontalDivider6.setVisibility(View.GONE);
1151+
activity.curExplorerFrag.updateDelPaste();
1152+
}
1153+
if (activity.curContentFrag.selectedInList1.size() == 0 && activity.curContentFrag.commands.getVisibility() == View.VISIBLE) {
1154+
activity.curContentFrag.commands.setAnimation(AnimationUtils.loadAnimation(activity, R.anim.grow_from_bottom));
1155+
activity.curContentFrag.commands.setVisibility(View.GONE);
1156+
activity.curContentFrag.horizontalDivider6.setVisibility(View.GONE);
1157+
activity.curContentFrag.updateDelPaste();
1158+
}
1159+
}
1160+
return true;
1161+
}
1162+
@Override
1163+
public void onMenuModeChange(MenuBuilder menu) {}
1164+
});
1165+
optionsMenu.show();
1166+
break;
11021167
case R.id.copys:
11031168
activity.COPY_PATH = null;
11041169
activity.MOVE_PATH = null;
@@ -1667,24 +1732,24 @@ void moreInPanel(final View v) {
16671732
} else {
16681733
mi.setEnabled(false);
16691734
}
1670-
mi = menu.findItem(R.id.hide);
1671-
if (slidingTabsFragment.side == SlidingTabsFragment.Side.LEFT && activity.multiFiles && activity.right.getVisibility() == View.VISIBLE
1672-
|| slidingTabsFragment.side == SlidingTabsFragment.Side.RIGHT && activity.left.getVisibility() == View.VISIBLE) {
1673-
mi.setTitle("Hide");
1674-
} else {
1675-
mi.setTitle("2 panels");
1676-
}
1677-
mi = menu.findItem(R.id.biggerequalpanel);
1678-
if (activity.left.getVisibility() == View.GONE || activity.right.getVisibility() == View.GONE) {
1679-
mi.setEnabled(false);
1680-
} else {
1681-
mi.setEnabled(true);
1682-
if (slidingTabsFragment.width <= 0) {
1683-
mi.setTitle("Wider panel");
1684-
} else {
1685-
mi.setTitle("2 panels equal");
1686-
}
1687-
}
1735+
// mi = menu.findItem(R.id.hide);
1736+
// if (slidingTabsFragment.side == SlidingTabsFragment.Side.LEFT && activity.multiFiles && activity.right.getVisibility() == View.VISIBLE
1737+
// || slidingTabsFragment.side == SlidingTabsFragment.Side.RIGHT && activity.left.getVisibility() == View.VISIBLE) {
1738+
// mi.setTitle("Hide");
1739+
// } else {
1740+
// mi.setTitle("2 panels");
1741+
// }
1742+
// mi = menu.findItem(R.id.biggerequalpanel);
1743+
// if (activity.left.getVisibility() == View.GONE || activity.right.getVisibility() == View.GONE) {
1744+
// mi.setEnabled(false);
1745+
// } else {
1746+
// mi.setEnabled(true);
1747+
// if (slidingTabsFragment.width <= 0) {
1748+
// mi.setTitle("Wider panel");
1749+
// } else {
1750+
// mi.setTitle("2 panels equal");
1751+
// }
1752+
// }
16881753
popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
16891754
public boolean onMenuItemClick(MenuItem item) {
16901755
Log.d(TAG, item.getTitle() + ".");

PowerFileExplorer/src/main/res/layout/compress.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
android:layout_width="wrap_content"
139139
android:layout_height="wrap_content"
140140
android:layout_alignParentLeft="true"
141-
android:text="File "
141+
android:text="Archive "
142142
android:minEms="4"
143143
android:textAppearance="?android:attr/textAppearanceLarge"
144144
android:paddingLeft="6dp"
@@ -216,7 +216,12 @@
216216
android:textSize="14sp"
217217
android:checked="true"
218218
android:textAppearance="?android:attr/textAppearanceLarge" />
219-
219+
<RadioButton
220+
android:text="zpaq "
221+
android:tag="zpaq"
222+
android:id="@+id/zpaq"
223+
android:textSize="14sp"
224+
android:textAppearance="?android:attr/textAppearanceLarge" />
220225
<RadioButton
221226
android:text="tbz2 "
222227
android:tag="tbz2"
@@ -243,12 +248,7 @@
243248
android:id="@+id/tar"
244249
android:textSize="14sp"
245250
android:textAppearance="?android:attr/textAppearanceLarge"/>
246-
<RadioButton
247-
android:text="zpaq "
248-
android:tag="zpaq"
249-
android:id="@+id/zpaq"
250-
android:textSize="14sp"
251-
android:textAppearance="?android:attr/textAppearanceLarge" />
251+
252252
</RadioGroup>
253253
</LinearLayout>
254254

README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
11
# PowerFileExplorer
22
An extreme powerful file explorer, two custom panels, built-in images/document preview, media player, pdf/image viewer, text editor, apps, processes, traffic manager, compress/descompress zip, 7z, zpaq, gz, xz, bz2, tgz, txz, tbz2...
33

4+
5+
# Prepare for build
6+
Copy attached android.jar onto %your-android-sdk%/platforms/android-23/ (needs overwrite)
7+
8+
(You should backup original android.jar)
9+
10+
# Power File Manager
11+
12+
[<img alt="Get it on AFH" height="80" width="207" src="https://www.androidfilehost.com/images/afh.png">](https://www.androidfilehost.com/?w=files&flid=73967)
13+
14+
This project is still in developement phase . I would love if other developers improve the code and make it a better
15+
explorer than it's now.
16+
17+
18+
Overview
19+
---
20+
- Open Source, light and smooth
21+
- Basic features like cut, copy, delete, compress, extract etc. easily accessible
22+
- Work on multiple tabs at same time
23+
- Navigation drawer for quick navigation
24+
- Browse, preview, extract items in compressed files easily
25+
- Text Editor with multi tabs
26+
- Media Player
27+
- Pdf, epub, html viewer, previewer (click on the icon)
28+
- App Manager to open, backup, or directly uninstall any app
29+
- Quickly access history, access bookmarks or search for any file
30+
- All features freely available without any ads
31+
- lots more...
32+
33+
Warning
34+
---
35+
Basic r/w operations might not work on external memory on Kitkat devices. Don't use cut/paste from or to external SD Card. You might lose your files.
36+
37+
Top Features
38+
============
39+
**Full Featured File Manager (File Explorer)** It is a Super File Manager which provides all features of file management including cut, copy, delete, rename, compress, extract. You can check the file file details, full integrated search within the file system. New file and New folders can be created in a second.
40+
41+
**Smart Library File Explorer (File Manager)** Categorize all files into Downloads from internet, Images, Pictures, Camera Photos, Videos, Movies, Audio , Music, Documents (pdf, xls, ppt etc), Archives (zip, 7z, zpaq, rar etc) and APK. Easily navigate the library with a single tap. You can also bookmark all your favourite folders so you can have quick access at any point of time
42+
43+
**Storage File Manager (File Explorer)** Access all files and folder from different types of storages like EMMC, MMC cars, SD Cards, Internal Storage, External Storage , Phone Memory, USB Storage with support for FAT file system
44+
45+
**App Manager and Process Manager** Free memory by killing tasks and speed up your phone instantly. Quickly and easily uninstall multiple unwanted applications and free up phone storage space which is very valuable. App Manager helps you save your favorite apps on to memory and install them back again when needed
46+
47+
**Network Manager** Transfer files with FTP Server from phone to PC. All you have to do is open the IP address in browser and all your files on the phone are easily accessible. You can also share files from your phone using bluetooth etc
48+
49+
**Document Editor** you can easily edit files on the go. Support for every type of text files such as HTML, XHTML, TXT etc. It is very simple and handy.
50+
51+
Other Features
52+
==============
53+
* The only app to Show Folder sizes across storages
54+
* Completely Open source project on github
55+
* Complete App is designed from scratch using material design principles
56+
* Acts as a Standalone File Picker from other applications such as attaching document files from gmail
57+
* Has high quality thumbnail support in list / gridview for all types of file like images, videos, album art for music files and applications
58+
59+
60+
61+
62+
63+
###License:
64+
65+
This file is part of Power File Manager.
66+
Power File Manager is free software: you can redistribute it and/or modify
67+
it under the terms of the GNU General Public License as published by
68+
the Free Software Foundation, either version 3 of the License, or
69+
(at your option) any later version.
70+
This program is distributed in the hope that it will be useful,
71+
but WITHOUT ANY WARRANTY; without even the implied warranty of
72+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
73+
GNU General Public License for more details.
74+
You should have received a copy of the GNU General Public License
75+
along with this program. If not, see <http://www.gnu.org/licenses/>.
76+

0 commit comments

Comments
 (0)