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
import android.app.Activity; | |
import android.app.AlertDialog; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import com.kbeanie.imagechooser.api.ChooserType; | |
import com.kbeanie.imagechooser.api.ChosenImage; | |
import com.kbeanie.imagechooser.api.ChosenImages; | |
import com.kbeanie.imagechooser.api.ImageChooserListener; | |
import com.kbeanie.imagechooser.api.ImageChooserManager; |
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
public class MoneyFormatEditText extends EditText { | |
public MoneyFormatEditText(Context context) { | |
super(context); | |
setupTextWatcher(); | |
} | |
public MoneyFormatEditText(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
setupTextWatcher(); | |
} |
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
final static String DATABASE_NAME = "your-database-name"; | |
final static String FOLDER_EXTERNAL_DIRECTORY = Environment.getExternalStorageDirectory() + "/folder"; | |
//______________________________________________________________________________________________ | |
/** | |
* Call this method from any activity in your app ( | |
* for example -> DatabaseUtil.copyDatabaseToExtStg(MainActivity.this); | |
* this method will copy the database of your application into SDCard folder "shanraisshan/MyDatabase.sqlite" (DATABASE_NAME) | |
*/ |
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
// Check permission,... | |
// View image or download | |
$filePath = '/data/.../demo-image.jpg'; | |
$name = basename($filePath); | |
if($params['mode'] == 'view'){ | |
header("Content-Type: " . mime_content_type($filePath)); | |
header('Content-disposition: inline; filename="' . $name . '"'); | |
} else { | |
header("Content-Type: application/octet-stream"); |
OlderNewer