Fix Folder open if no file

This commit is contained in:
Zerglrisk 2016-06-20 22:03:12 +09:00
parent 66a86dc513
commit 9b7de55f55
8 changed files with 86 additions and 319 deletions

View File

@ -1,201 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
<value />
</option>
<option name="IMPORT_LAYOUT_TABLE">
<value>
<package name="android" withSubpackages="true" static="false" />
<emptyLine />
<package name="com" withSubpackages="true" static="false" />
<emptyLine />
<package name="junit" withSubpackages="true" static="false" />
<emptyLine />
<package name="net" withSubpackages="true" static="false" />
<emptyLine />
<package name="org" withSubpackages="true" static="false" />
<emptyLine />
<package name="java" withSubpackages="true" static="false" />
<emptyLine />
<package name="javax" withSubpackages="true" static="false" />
<emptyLine />
<package name="" withSubpackages="true" static="false" />
<emptyLine />
<package name="" withSubpackages="true" static="true" />
<emptyLine />
</value>
</option>
<option name="RIGHT_MARGIN" value="100" />
<AndroidXmlCodeStyleSettings>
<option name="USE_CUSTOM_SETTINGS" value="true" />
</AndroidXmlCodeStyleSettings>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<codeStyleSettings language="XML">
<option name="FORCE_REARRANGE_MODE" value="1" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_NAMESPACE>Namespace:</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_NAMESPACE>Namespace:</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_width</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_height</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:layout_.*</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:width</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:height</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
</value>
</option>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
</component>
</project>

View File

@ -1,9 +0,0 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Copyright (C) 2014 Vlad Mihalachi&#10;&#10;This file is part of Turbo Editor.&#10;&#10;Turbo Editor is free software: you can redistribute it and/or modify&#10;it under the terms of the GNU General Public License as published by&#10;the Free Software Foundation, either version 3 of the License, or&#10;(at your option) any later version.&#10;&#10;Turbo Editor is distributed in the hope that it will be useful,&#10;but WITHOUT ANY WARRANTY; without even the implied warranty of&#10;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the&#10;GNU General Public License for more details.&#10;&#10;You should have received a copy of the GNU General Public License&#10;along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;." />
<option name="keyword" value="Copyright" />
<option name="allowReplaceKeyword" value="Copyright" />
<option name="myName" value="Copyright Vlad Mihalachi" />
<option name="myLocal" value="true" />
</copyright>
</component>

View File

@ -1,3 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="mac" />
</component>

View File

@ -1,14 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
<inspection_tool class="AndroidLintMissingQuantity" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AndroidLintMissingTranslation" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AndroidLintNewApi" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AndroidLintUnusedQuantity" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
</inspection_tool>
</profile>
</component>

View File

@ -1,7 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</settings>
</component>

View File

@ -3,57 +3,57 @@
<item
is-multidex="true"
jar="D:\Github\turbo-editor-master\app-pro\build\intermediates\exploded-aar\turbo-editor-master.libraries\sharedCode\unspecified\jars\libs\markdownview-1.2.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="5ed80bc9b7c7cc01862df04a5f94c9f7a4a5b31d">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\8\markdownview-1.2_9086f67003cd23fefdb889fac76a64c86c83c727\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\Github\turbo-editor-master\app-pro\build\intermediates\incremental-runtime-classes\debug\instant-run.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="bb897ef8dc4cc6fc93bb2431a07a4689891755ba">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\instant-run_c94206c451e246c7fe8e1811a7eafc5607b00bdc\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\Github\turbo-editor-master\app-pro\build\intermediates\exploded-aar\com.github.gabrielemariotti.changeloglib\library\1.5.2\jars\classes.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="494089d9d84042634d2be0355702e96805f847d3">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\com.github.gabrielemariotti.changeloglib-library-1.5.2_ba0ca3e25afe812605eb882aefb1760c9b8e2284\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\Github\turbo-editor-master\app-pro\build\intermediates\exploded-aar\turbo-editor-master.libraries\sharedCode\unspecified\jars\libs\juniversalchardet-1.0.3.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="f15ada9c3a03b373b9d94fcd74fa712b1a174cc5">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\8\juniversalchardet-1.0.3_adbe91f1208660d7c95a4163b6181179be929820\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\Github\turbo-editor-master\app-pro\build\intermediates\exploded-aar\com.android.support\support-v4\22.2.1\jars\libs\internal_impl-22.2.1.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="c471eaaba13ff64f6e0383d1c30a9cdc9a97efeb">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\internal_impl-22.2.1_b562ad010c3b50fc993ffa793ca9b8c8caca2af8\classes.dex" />
</item>
<item
is-multidex="true"
jar="C:\Users\Kuro\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.4\5fe28b9518e58819180a43a850fbc0dd24b7c050\commons-lang3-3.4.jar"
jar="C:\Users\Ruyin\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.4\5fe28b9518e58819180a43a850fbc0dd24b7c050\commons-lang3-3.4.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="5fe28b9518e58819180a43a850fbc0dd24b7c050">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\commons-lang3-3.4_f0efd4f28e377a363a347dab008a5f3580250a5e\classes.dex" />
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\commons-lang3-3.4_3befc2d6cbd96ef212830b4b1effb5ee4322bbb2\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\GitHub\turbo-editor\app-pro\build\intermediates\exploded-aar\com.android.support\support-v4\22.2.1\jars\libs\internal_impl-22.2.1.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="c471eaaba13ff64f6e0383d1c30a9cdc9a97efeb">
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\internal_impl-22.2.1_c950bc0bdad66a65b0b64aa46b9c975ebeab75bc\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\GitHub\turbo-editor\app-pro\build\intermediates\exploded-aar\turbo-editor.libraries\sharedCode\unspecified\jars\libs\juniversalchardet-1.0.3.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="90af1f254ba3bd56b8e0549af8622fe61ee98fab">
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\8\juniversalchardet-1.0.3_3fca8c099135619b0ba5461d227915cccc3d4a7f\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\GitHub\turbo-editor\app-pro\build\intermediates\exploded-aar\com.android.support\support-v4\22.2.1\jars\classes.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="f8efd0096475e0daf054267b61544e10dc776503">
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\com.android.support-support-v4-22.2.1_83977f7ccb1f66357c988c3c5056a27d835bcee4\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\GitHub\turbo-editor\app-pro\build\intermediates\exploded-aar\turbo-editor.libraries\sharedCode\unspecified\jars\libs\markdownview-1.2.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="78343fbc621816217c7ad11b5f49b3b16df436be">
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\8\markdownview-1.2_d9761cce8d81624f51c2a4cc7af1768b970db035\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\GitHub\turbo-editor\app-pro\build\intermediates\exploded-aar\com.github.gabrielemariotti.changeloglib\library\1.5.2\jars\classes.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="494089d9d84042634d2be0355702e96805f847d3">
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\com.github.gabrielemariotti.changeloglib-library-1.5.2_9ff1bb58786f88db46e17addd2bea081f6fc92fc\classes.dex" />
</item>
<item
is-multidex="true"
@ -62,52 +62,52 @@
optimize="false"
revision="22.0.1"
sha1="b1b6ea3b7e4aa4f492509a4952029cd8e48019ad">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\commons-io-2.4_4031085fab5fc9c36ddba15db50a2d9c43b9209c\classes.dex" />
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\commons-io-2.4_4031085fab5fc9c36ddba15db50a2d9c43b9209c\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\Github\turbo-editor-master\app-pro\build\intermediates\exploded-aar\com.android.support\appcompat-v7\22.2.1\jars\classes.jar"
jar="D:\GitHub\turbo-editor\app-pro\build\intermediates\incremental-runtime-classes\debug\instant-run.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="afda0b5a0d53a7e47b536c4085359e52dc44f207">
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\instant-run_7345dce6c79e31e65904f7af1435434153a05c9a\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\GitHub\turbo-editor\app-pro\build\intermediates\exploded-aar\com.android.support\appcompat-v7\22.2.1\jars\classes.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="4486e953d1f35f8ccab098b1dd67146366d5f731">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\com.android.support-appcompat-v7-22.2.1_ab228ebc02a7419075f49c97319c366888a0ba5d\classes.dex" />
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\com.android.support-appcompat-v7-22.2.1_0a3a0fad1f09562cc35fd49f89589e2ab87b3523\classes.dex" />
</item>
<item
is-multidex="true"
jar="C:\Users\Kuro\.gradle\caches\modules-2\files-2.1\com.nineoldandroids\library\2.4.0\e9b63380f3a242dbdbf103a2355ad7e43bad17cb\library-2.4.0.jar"
jar="C:\Android\android-sdk\extras\android\m2repository\com\android\support\support-annotations\24.0.0-alpha2\support-annotations-24.0.0-alpha2.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="8071e1e6cd07e9253720313d6c14286a7ee424e0">
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\support-annotations-24.0.0-alpha2_278d4cc19e808b1490ef48b3d165bfe2d48c2853\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\GitHub\turbo-editor\app-pro\build\intermediates\incremental-classes\debug\instant-run-bootstrap.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="aff23d1607adfe9b00bfd5f47fd46a4dbba59e34">
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\instant-run-bootstrap_4b9edcf3341b124c34a6e46388175dd778208c2d\classes.dex" />
</item>
<item
is-multidex="true"
jar="C:\Users\Ruyin\.gradle\caches\modules-2\files-2.1\com.nineoldandroids\library\2.4.0\e9b63380f3a242dbdbf103a2355ad7e43bad17cb\library-2.4.0.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="e9b63380f3a242dbdbf103a2355ad7e43bad17cb">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\library-2.4.0_cd56bb62c3e927f49bb8c7fe38d72d2278aba54e\classes.dex" />
</item>
<item
is-multidex="true"
jar="C:\Android\android-sdk\extras\android\m2repository\com\android\support\support-annotations\24.0.0\support-annotations-24.0.0.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="2943c74db6d4346ab8c6531adac91fa05c137c40">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\support-annotations-24.0.0_08092e92df2a2ee2660f1695f67043ce40d40c01\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\Github\turbo-editor-master\app-pro\build\intermediates\incremental-classes\debug\instant-run-bootstrap.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="a288f1967eac028e38b084025dd451ede6f954b9">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\instant-run-bootstrap_c86c92d779f8bc86e7fb304ce790a5d751781702\classes.dex" />
</item>
<item
is-multidex="true"
jar="D:\Github\turbo-editor-master\app-pro\build\intermediates\exploded-aar\com.android.support\support-v4\22.2.1\jars\classes.jar"
jumboMode="true"
optimize="false"
revision="22.0.1"
sha1="f8efd0096475e0daf054267b61544e10dc776503">
<dex dex="D:\Github\turbo-editor-master\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\com.android.support-support-v4-22.2.1_4173030437133b535eafc92cae20505602e11d37\classes.dex" />
<dex dex="D:\GitHub\turbo-editor\app-pro\build\intermediates\transforms\dex\debug\folders\1000\10\library-2.4.0_6e1b76d004fccd97dee535eef9a7b444450b727f\classes.dex" />
</item>
</items>

View File

@ -178,7 +178,6 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
private PageSystemButtons pageSystemButtons;
private static String currentEncoding = "UTF-16";
private Toolbar toolbar;
/*
Navigation Drawer
*/
@ -356,10 +355,11 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
refreshList(newUri, true, false);
arrayAdapter.selectPosition(newUri);
}
Uri particularUri = Uri.parse("file://" + fileList[0].getPath());
final GreatUri newUri = new GreatUri(particularUri, AccessStorageApi.getPath(this, particularUri), AccessStorageApi.getName(this, particularUri));
newFileToOpen(newUri, "");
if(fileList.length > 0) {
Uri particularUri = Uri.parse("file://" + fileList[0].getPath());
final GreatUri newUri = new GreatUri(particularUri, AccessStorageApi.getPath(this, particularUri), AccessStorageApi.getName(this, particularUri));
newFileToOpen(newUri, "");
}
} else {
@ -1235,7 +1235,6 @@ public abstract class MainActivity extends ActionBarActivity implements IHomeAct
subActivity.putExtra("action", SelectFileActivity.Actions.SelectFile);
AnimationUtils.startActivityWithScale(this, subActivity, true, SELECT_FOLDER_CODE, view);
}
public void CreateFile(View view) {

View File

@ -89,6 +89,8 @@ public class SelectFileActivity extends ActionBarActivity implements SearchView.
wantAFile = true; //action == Actions.SelectFile;
mfabOkMode = false;
folderOpenMode = getIntent().getBooleanExtra("foldermode", false);
if(folderOpenMode)
setTitle("Open Folder");
listView = (ListView) findViewById(android.R.id.list);
listView.setOnItemClickListener(this);