-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9af927
commit 3dcaa3c
Showing
7 changed files
with
76 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package thercn.wmw; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import android.os.FileUtils; | ||
|
||
public class FileUtils { | ||
|
||
public static boolean createFile(String filePath, boolean isDir) throws IOException | ||
{ | ||
File file = new File(filePath); | ||
if (!isDir) { | ||
return file.mkdirs(); | ||
} | ||
return file.createNewFile(); | ||
} | ||
public static boolean deleteFile(String filePath){ | ||
File file = new File(filePath); | ||
return file.delete(); | ||
} | ||
public static int moveFile(String sourcePath, String targetPath) throws IOException, InterruptedException | ||
{ | ||
Process move = Runtime.getRuntime().exec("mv " + sourcePath + " " + targetPath); | ||
return move.waitFor(); | ||
} | ||
public static int copyFile(String sourcePath, String targetPath) throws IOException, InterruptedException | ||
{ | ||
Process move = Runtime.getRuntime().exec("cp -r " + sourcePath + " " + targetPath); | ||
return move.waitFor(); | ||
} | ||
public static void renameFile(String name,String newName) throws IOException, InterruptedException | ||
{ | ||
moveFile(name,newName); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="colorPrimary">#009688</color> | ||
<color name="colorPrimaryDark">#00796B</color> | ||
<color name="colorAccent">#FF9800</color> | ||
</resources> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="colorPrimary">#3F51B5</color> | ||
<color name="colorPrimaryDark">#303F9F</color> | ||
<color name="colorAccent">#FF4081</color> | ||
<color name="colorTextIndigo">#ffffff</color> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<style name="NoActionBar" parent="@android:style/Theme" /> | ||
<style name="MainTheme" parent="Theme.AppCompat.Light" > | ||
<item name="colorPrimary">@color/colorPrimary</item> | ||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | ||
<item name="colorAccent">@color/colorAccent</item> | ||
</style> | ||
</resources> |