This file contains hidden or 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
@Override | |
public boolean onCreateOptionsMenu(Menu menu) | |
{ | |
// TODO: Implement this method | |
menu.clear(); | |
MenuInflater inflator = getMenuInflater(); | |
inflator.inflate(R.menu.sidebar_menu, menu); | |
SubMenu subMenu = menu.addSubMenu("Themes"); | |
subMenu.add(0 , blue , 0 , "Blue"); | |
subMenu.add(0, pink , 1, "Pink"); |
This file contains hidden or 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
public File exportFile(File src) { | |
// extension example for image jpg without the dot | |
try { | |
String dstPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString(); | |
File dst = new File(dstPath); //if folder does not exist | |
if (!dst.exists()) { | |
if (!dst.mkdir()) { | |
return null; | |
} | |
} |