diff --git a/.gitignore b/.gitignore index 86536af7d3..a894ed26c6 100644 --- a/.gitignore +++ b/.gitignore @@ -39,8 +39,8 @@ Icon # Android Studio .idea/* #.idea/workspace.xml - remove # and delete .idea if it better suit your needs. -.gradle/* -build/* +.gradle/ +build/ .settings bin/ gen/ @@ -52,3 +52,4 @@ gradlew.bat .project AmazeFileManager.iml libs/libs.iml +.idea/ diff --git a/AmazeFileManager.iml b/AmazeFileManager.iml index b3fa02023b..e3c3dd9e89 100644 --- a/AmazeFileManager.iml +++ b/AmazeFileManager.iml @@ -8,12 +8,15 @@ - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -54,13 +63,13 @@ - - - - - - - + + + + + + + @@ -76,7 +85,9 @@ + + @@ -91,13 +102,17 @@ + + + + + + - - diff --git a/build.gradle b/build.gradle index 32a9310f7c..3aabefca57 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ repositories { android { compileSdkVersion 23 - buildToolsVersion '23.0.2' + buildToolsVersion '23.0.1' packagingOptions { exclude 'proguard-project.txt' diff --git a/local.properties b/local.properties index 8c70c0411f..e287b759d1 100644 --- a/local.properties +++ b/local.properties @@ -7,5 +7,5 @@ # Location of the SDK. This is only used by Gradle. # For customization when using a Version Control System, please read the # header note. -#Sun Nov 22 01:49:11 IST 2015 -sdk.dir=/home/arpitkh96/android-sdk-linux +#Tue Nov 24 21:13:26 IST 2015 +sdk.dir=/home/vishal/work/android-studio/plugins/android-sdk-linux diff --git a/src/main/java/com/amaze/filemanager/fragments/Main.java b/src/main/java/com/amaze/filemanager/fragments/Main.java index fd0f019521..9e2c4ac74d 100644 --- a/src/main/java/com/amaze/filemanager/fragments/Main.java +++ b/src/main/java/com/amaze/filemanager/fragments/Main.java @@ -976,9 +976,11 @@ public void loadlist(String path, boolean back, int openMode) { void initNoFileLayout() { nofilesview = rootView.findViewById(R.id.nofilelayout); if (theme1 == 0) - ((ImageView) nofilesview.findViewById(R.id.image)).setColorFilter(Color.parseColor - ("#666666")); - else ((TextView) nofilesview.findViewById(R.id.nofiletext)).setTextColor(Color.WHITE); + ((ImageView) nofilesview.findViewById(R.id.image)).setColorFilter(Color.parseColor("#666666")); + else { + nofilesview.setBackgroundColor(getResources().getColor(R.color.holo_dark_background)); + ((TextView) nofilesview.findViewById(R.id.nofiletext)).setTextColor(Color.WHITE); + } } public boolean checkforpath(String path){ diff --git a/src/main/res/layout/main_frag.xml b/src/main/res/layout/main_frag.xml index f68cbbb0b2..fd22d14f4f 100644 --- a/src/main/res/layout/main_frag.xml +++ b/src/main/res/layout/main_frag.xml @@ -46,6 +46,7 @@ android:id="@+id/nofilelayout" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@android:color/white" android:visibility="gone"> = oldPath.length()) { + if (newPath.length() >= oldPath.length() && + newPathBuilder.delete(oldPath.length(), newPath.length()).toString().equals(oldPath) && + oldPath.length()!=0) { + // navigate forward - stringBuilder.append(newPath); - stringBuilder.delete(0, oldPath.length()); + newPathBuilder.delete(0, newPathBuilder.length()); + newPathBuilder.append(newPath); + newPathBuilder.delete(0, oldPath.length()); animPath.setAnimation(slideIn); animPath.animate().setListener(new AnimatorListenerAdapter() { @Override @@ -1939,7 +1948,7 @@ public void onAnimationEnd(Animator animation) { public void onAnimationStart(Animator animation) { super.onAnimationStart(animation); animPath.setVisibility(View.VISIBLE); - animPath.setText(stringBuilder.toString()); + animPath.setText(newPathBuilder.toString()); //bapath.setText(oldPath); scroll.post(new Runnable() { @@ -1949,11 +1958,14 @@ public void run() { } }); } - }).start(); - } else if (newPath.length() <= oldPath.length()) { + }).setStartDelay(500).start(); + } else if (newPath.length() <= oldPath.length() && + oldPathBuilder.delete(newPath.length(), oldPath.length()).toString().equals(newPath)) { + // navigate backwards - stringBuilder.append(oldPath); - stringBuilder.delete(0, newPath.length()); + oldPathBuilder.delete(0, oldPathBuilder.length()); + oldPathBuilder.append(oldPath); + oldPathBuilder.delete(0, newPath.length()); animPath.setAnimation(slideOut); animPath.animate().setListener(new AnimatorListenerAdapter() { @Override @@ -1974,7 +1986,7 @@ public void run() { public void onAnimationStart(Animator animation) { super.onAnimationStart(animation); animPath.setVisibility(View.VISIBLE); - animPath.setText(stringBuilder.toString()); + animPath.setText(oldPathBuilder.toString()); bapath.setText(newPath); scroll.post(new Runnable() { @@ -1984,7 +1996,93 @@ public void run() { } }); } - }).start(); + }).setStartDelay(500).start(); + } else if (oldPath.isEmpty()) { + + // case when app starts + // FIXME: COUNTER is incremented twice on app startup + COUNTER++; + if (COUNTER==2) { + + animPath.setAnimation(slideIn); + animPath.setText(newPath); + animPath.animate().setListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationStart(Animator animation) { + super.onAnimationStart(animation); + animPath.setVisibility(View.VISIBLE); + bapath.setText(""); + scroll.post(new Runnable() { + @Override + public void run() { + scroll1.fullScroll(View.FOCUS_RIGHT); + } + }); + } + + @Override + public void onAnimationEnd(Animator animation) { + super.onAnimationEnd(animation); + animPath.setVisibility(View.GONE); + bapath.setText(newPath); + } + }).setStartDelay(500).start(); + } + + } else { + + // completely different path + // first slide out of old path followed by slide in of new path + animPath.setAnimation(slideOut); + animPath.animate().setListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationStart(Animator animator) { + super.onAnimationStart(animator); + animPath.setVisibility(View.VISIBLE); + animPath.setText(oldPath); + bapath.setText(""); + + scroll.post(new Runnable() { + @Override + public void run() { + scroll1.fullScroll(View.FOCUS_LEFT); + } + }); + } + + @Override + public void onAnimationEnd(Animator animator) { + super.onAnimationEnd(animator); + + //animPath.setVisibility(View.GONE); + animPath.setText(newPath); + bapath.setText(""); + animPath.setAnimation(slideIn); + + animPath.animate().setListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + super.onAnimationEnd(animation); + animPath.setVisibility(View.GONE); + bapath.setText(newPath); + } + + @Override + public void onAnimationStart(Animator animation) { + super.onAnimationStart(animation); + // we should not be having anything here in path bar + animPath.setVisibility(View.VISIBLE); + bapath.setText(""); + scroll.post(new Runnable() { + @Override + public void run() { + scroll1.fullScroll(View.FOCUS_RIGHT); + } + }); + } + }).start(); + } + }).setStartDelay(500).start(); } }