Reformated the code and optimized imports

This commit is contained in:
Vlad Mihalachi 2013-09-28 09:44:24 +02:00
parent fca3410f26
commit 474ce28737
13 changed files with 162 additions and 55 deletions

View File

@ -66,6 +66,7 @@ public class HomeActivity extends Activity {
*/
protected DrawerLayout mDrawerLayout;
/**
* {@inheritDoc}
*/
@ -78,7 +79,7 @@ public class HomeActivity extends Activity {
// Replace fragment
getFragmentManager()
.beginTransaction()
.replace(R.id.fragment_editor, new NoFileOpenedFragment())
.replace(R.id.fragment_editor, new NoFileOpenedFragment())
.commit();
/* First Time we open this activity */
if (savedInstanceState == null) {
@ -102,6 +103,7 @@ public class HomeActivity extends Activity {
mDrawerToggle.syncState();
}
/**
* {@inheritDoc}
*/
@ -112,6 +114,7 @@ public class HomeActivity extends Activity {
EventBus.getDefault().register(this);
}
/**
* {@inheritDoc}
*/
@ -122,6 +125,7 @@ public class HomeActivity extends Activity {
EventBus.getDefault().unregister(this);
}
/**
* {@inheritDoc}
*/
@ -135,6 +139,7 @@ public class HomeActivity extends Activity {
super.onDestroy();
}
/**
* {@inheritDoc}
*/
@ -144,6 +149,7 @@ public class HomeActivity extends Activity {
mDrawerToggle.onConfigurationChanged(newConfig);
}
/**
* {@inheritDoc}
*/
@ -153,6 +159,7 @@ public class HomeActivity extends Activity {
return super.onCreateOptionsMenu(menu);
}
/**
* {@inheritDoc}
*/
@ -161,7 +168,7 @@ public class HomeActivity extends Activity {
/* If we clicked on the Navigation Drawer Menu item */
if (mDrawerToggle.onOptionsItemSelected(item)) {
return true;
} else switch (item.getItemId()){
} else switch (item.getItemId()) {
case R.id.im_open:
startActivityForResult(new Intent(HomeActivity.this, SelectFileActivity.class)
.putExtra("path", "")
@ -176,6 +183,7 @@ public class HomeActivity extends Activity {
}
}
/**
* {@inheritDoc}
*/
@ -183,13 +191,16 @@ public class HomeActivity extends Activity {
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK && requestCode == SELECT_FILE_CODE) {
String path = data.getStringExtra("path");
if(!TextUtils.isEmpty(path)){
EventBus.getDefault().postSticky(new NewFileOpened(path));
String path = data.getStringExtra("path");
if (!TextUtils.isEmpty(path)) {
EventBus.getDefault().postSticky(new NewFileOpened(path));
}
}
}
/**
* {@inheritDoc}
*/
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
@ -197,25 +208,25 @@ public class HomeActivity extends Activity {
}
/**
*
* @param event
*/
public void onEvent(FileSelectedEvent event){
public void onEvent(FileSelectedEvent event) {
// Close the drawer
mDrawerLayout.closeDrawer(Gravity.LEFT);
// Replace fragment
getFragmentManager()
.beginTransaction()
.replace(R.id.fragment_editor, EditorFragment.newInstance(event.getPath()))
.replace(R.id.fragment_editor, EditorFragment.newInstance(event.getPath()))
.commit();
}
/**
* When a file is saved
* Invoked by the EditorFragment
*
* @param event The event called
*/
public void onEvent(FileSavedEvent event){
public void onEvent(FileSavedEvent event) {
try {
closeKeyBoard();
} catch (NullPointerException e) {
@ -244,7 +255,7 @@ public class HomeActivity extends Activity {
// Replace fragment
getFragmentManager()
.beginTransaction()
.replace(R.id.fragment_editor, new NoFileOpenedFragment())
.replace(R.id.fragment_editor, new NoFileOpenedFragment())
.commit();
}
}
@ -252,9 +263,10 @@ public class HomeActivity extends Activity {
/**
* When a file can't be opened
* Invoked by the EditorFragment
*
* @param event The event called
*/
public void onEvent(ErrorOpeningFileEvent event){
public void onEvent(ErrorOpeningFileEvent event) {
//
mDrawerLayout.openDrawer(Gravity.LEFT);
//
@ -262,7 +274,7 @@ public class HomeActivity extends Activity {
// Replace fragment
getFragmentManager()
.beginTransaction()
.replace(R.id.fragment_editor, new NoFileOpenedFragment())
.replace(R.id.fragment_editor, new NoFileOpenedFragment())
.commit();
}
@ -284,7 +296,7 @@ public class HomeActivity extends Activity {
/**
* Setup the navigation drawer
*/
private void setupNavigationDrawer(){
private void setupNavigationDrawer() {
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
/* Action Bar */
final ActionBar ab = getActionBar();
@ -299,11 +311,17 @@ public class HomeActivity extends Activity {
R.string.nome_app_turbo_editor,
R.string.nome_app_turbo_editor) {
/**
* {@inheritDoc}
*/
@Override
public void onDrawerClosed(View view) {
invalidateOptionsMenu();
}
/**
* {@inheritDoc}
*/
@Override
public void onDrawerOpened(View drawerView) {
invalidateOptionsMenu();
@ -316,7 +334,7 @@ public class HomeActivity extends Activity {
/**
* Show a dialog with the changelog
*/
private void showChangeLog(){
private void showChangeLog() {
final String currentVersion = AppInfoHelper.getCurrentVersion(this);
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
final String lastVersion = preferences.getString("last_version", currentVersion);
@ -329,7 +347,7 @@ public class HomeActivity extends Activity {
/**
* Parses the intent
*/
private void parseIntent(Intent intent){
private void parseIntent(Intent intent) {
final String action = intent.getAction();
final String type = intent.getType();

View File

@ -12,7 +12,8 @@ import android.widget.TextView;
import com.vmihalachi.turboeditor.R;
public class LicensesActivity extends Activity implements AdapterView.OnItemClickListener{
public class LicensesActivity extends Activity implements AdapterView.OnItemClickListener {
/**
* {@inheritDoc}
@ -27,6 +28,7 @@ public class LicensesActivity extends Activity implements AdapterView.OnItemClic
listView.setAdapter(adapter);
}
/**
* {@inheritDoc}
*/
@ -34,14 +36,14 @@ public class LicensesActivity extends Activity implements AdapterView.OnItemClic
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
String openSourceLib = ((TextView) view.findViewById(android.R.id.text1)).getText().toString();
Intent browserIntent = null;
if(openSourceLib.equals("ChangeLog Library")){
if (openSourceLib.equals("ChangeLog Library")) {
browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/gabrielemariotti/changeloglib?source=c#license"));
} else if(openSourceLib.equals("EventBus")){
} else if (openSourceLib.equals("EventBus")) {
browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/greenrobot/EventBus?source=c#license"));
} else if(openSourceLib.equals("commons-io")){
} else if (openSourceLib.equals("commons-io")) {
browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://commons.apache.org/proper/commons-io/"));
}
if(browserIntent != null){
if (browserIntent != null) {
startActivity(browserIntent);
}
}

View File

@ -30,6 +30,9 @@ import com.vmihalachi.turboeditor.fragment.ChangelogDialogFragment;
import com.vmihalachi.turboeditor.helper.AppInfoHelper;
public class PreferenceAbout extends PreferenceActivity {
/**
* {@inheritDoc}
*/
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -44,6 +47,9 @@ public class PreferenceAbout extends PreferenceActivity {
market = findPreference("aboutactivity_authormarket");
if (email != null) {
email.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
/**
* {@inheritDoc}
*/
@Override
public boolean onPreferenceClick(final Preference preference) {
Intent i = new Intent(Intent.ACTION_SEND);
@ -61,6 +67,9 @@ public class PreferenceAbout extends PreferenceActivity {
}
if (changelog != null) {
changelog.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
/**
* {@inheritDoc}
*/
@Override
public boolean onPreferenceClick(final Preference preference) {
ChangelogDialogFragment.showChangeLogDialog(getFragmentManager());
@ -70,6 +79,9 @@ public class PreferenceAbout extends PreferenceActivity {
}
if (open_source_licenses != null) {
open_source_licenses.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
/**
* {@inheritDoc}
*/
@Override
public boolean onPreferenceClick(final Preference preference) {
startActivity(new Intent(PreferenceAbout.this, LicensesActivity.class));
@ -79,6 +91,9 @@ public class PreferenceAbout extends PreferenceActivity {
}
if (market != null) {
market.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
/**
* {@inheritDoc}
*/
@Override
public boolean onPreferenceClick(final Preference preference) {
try {

View File

@ -57,6 +57,9 @@ public class SelectFileActivity extends Activity implements AdapterView.OnItemCl
.getAbsolutePath();
/**
* {@inheritDoc}
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -85,6 +88,9 @@ public class SelectFileActivity extends Activity implements AdapterView.OnItemCl
finish();
}
/**
* {@inheritDoc}
*/
@Override
public void onItemClick(AdapterView<?> parent,
View view, int position, long id) {
@ -106,6 +112,9 @@ public class SelectFileActivity extends Activity implements AdapterView.OnItemCl
}
}
/**
* {@inheritDoc}
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_select_file, menu);
@ -114,6 +123,9 @@ public class SelectFileActivity extends Activity implements AdapterView.OnItemCl
return super.onCreateOptionsMenu(menu);
}
/**
* {@inheritDoc}
*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int i = item.getItemId();
@ -145,6 +157,9 @@ public class SelectFileActivity extends Activity implements AdapterView.OnItemCl
private class UpdateList extends
AsyncTask<String, Void, LinkedList<AdapterDetailedList.FileDetail>> {
/**
* {@inheritDoc}
*/
@Override
protected LinkedList<AdapterDetailedList.FileDetail> doInBackground(final String... params) {
try {
@ -196,6 +211,9 @@ public class SelectFileActivity extends Activity implements AdapterView.OnItemCl
}
}
/**
* {@inheritDoc}
*/
@Override
protected void onPostExecute(final LinkedList<AdapterDetailedList.FileDetail> names) {
boolean isRoot = currentFolder.equals("/");
@ -207,6 +225,9 @@ public class SelectFileActivity extends Activity implements AdapterView.OnItemCl
public final Comparator<File> getFileNameComparator() {
return new AlphanumComparator() {
/**
* {@inheritDoc}
*/
@Override
public String getTheString(Object obj) {
return ((File) obj).getName()

View File

@ -73,6 +73,9 @@ public class AdapterDetailedList extends
}
}
/**
* {@inheritDoc}
*/
@Override
public View getView(final int position,
View convertView, final ViewGroup parent) {
@ -109,29 +112,22 @@ public class AdapterDetailedList extends
final String ext = FilenameUtils.getExtension(fileName);
if (fileDetail.isFolder()) {
viewHolder.icon.setImageResource(R.color.file_folder);
}
else if (Arrays.asList(MimeTypes.MIME_HTML).contains(ext) || ext.endsWith("html")) {
} else if (Arrays.asList(MimeTypes.MIME_HTML).contains(ext) || ext.endsWith("html")) {
viewHolder.icon.setImageResource(R.color.file_html);
}
else if (Arrays.asList(MimeTypes.MIME_CODE).contains(ext)
} else if (Arrays.asList(MimeTypes.MIME_CODE).contains(ext)
|| fileName.endsWith("css")
|| fileName.endsWith("js")) {
viewHolder.icon.setImageResource(R.color.file_code);
}
else if (Arrays.asList(MimeTypes.MIME_ARCHIVE).contains(ext)) {
} else if (Arrays.asList(MimeTypes.MIME_ARCHIVE).contains(ext)) {
viewHolder.icon.setImageResource(R.color.file_archive);
}
else if (Arrays.asList(MimeTypes.MIME_MUSIC)
} else if (Arrays.asList(MimeTypes.MIME_MUSIC)
.contains(ext)) {
viewHolder.icon.setImageResource(R.color.file_media_music);
}
else if (Arrays.asList(MimeTypes.MIME_PICTURE).contains(ext)) {
} else if (Arrays.asList(MimeTypes.MIME_PICTURE).contains(ext)) {
viewHolder.icon.setImageResource(R.color.file_media_picture);
}
else if (Arrays.asList(MimeTypes.MIME_VIDEO).contains(ext)) {
} else if (Arrays.asList(MimeTypes.MIME_VIDEO).contains(ext)) {
viewHolder.icon.setImageResource(R.color.file_media_video);
}
else {
} else {
viewHolder.icon.setImageResource(R.color.file_text);
}
}

View File

@ -23,7 +23,7 @@ public class FileSelectedEvent {
private String path;
public FileSelectedEvent(String path){
public FileSelectedEvent(String path) {
this.path = path;
}

View File

@ -37,6 +37,9 @@ public class ChangelogDialogFragment extends DialogFragment {
public ChangelogDialogFragment() {
}
/**
* {@inheritDoc}
*/
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
@ -54,6 +57,9 @@ public class ChangelogDialogFragment extends DialogFragment {
}
)
.setPositiveButton(R.string.vota, new DialogInterface.OnClickListener() {
/**
* {@inheritDoc}
*/
@Override
public void onClick(final DialogInterface dialog, final int which) {
try {
@ -66,7 +72,7 @@ public class ChangelogDialogFragment extends DialogFragment {
}
public static final void showChangeLogDialog(FragmentManager fragmentManager){
public static final void showChangeLogDialog(FragmentManager fragmentManager) {
ChangelogDialogFragment changelogDialogFragment = new ChangelogDialogFragment();
FragmentTransaction ft = fragmentManager.beginTransaction();
Fragment prev = fragmentManager.findFragmentByTag("changelogdemo_dialog");

View File

@ -89,6 +89,7 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
return frag;
}
/**
* {@inheritDoc}
*/
@ -98,6 +99,7 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
setHasOptionsMenu(true);
}
/**
* {@inheritDoc}
*/
@ -110,6 +112,7 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
return rootView;
}
/**
* {@inheritDoc}
*/
@ -151,6 +154,7 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
super.onCreateOptionsMenu(menu, inflater);
}
/**
* {@inheritDoc}
*/
@ -185,6 +189,7 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
dialogFrag.show(getFragmentManager().beginTransaction(), "encodingDialog");
}
/**
* {@inheritDoc}
*/
@ -224,7 +229,7 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
}
}
private void configureEditText(){
private void configureEditText() {
this.mEditor.setHorizontallyScrolling(!this.sWrapText);
if (!this.sWrapText) {
int paddingLeft = (int) PixelDipConverter.convertDpToPixel(25, getActivity());
@ -237,6 +242,9 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
class SaveFile extends AsyncTask<Void, Void, Void> {
/**
* {@inheritDoc}
*/
@Override
protected Void doInBackground(final Void... voids) {
try {
@ -249,6 +257,9 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
return null;
}
/**
* {@inheritDoc}
*/
@Override
protected void onPostExecute(final Void aVoid) {
super.onPostExecute(aVoid);
@ -257,11 +268,10 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
}
public static class Editor extends EditText {
protected static final int
ID_SELECT_ALL =android. R.id.selectAll,
ID_SELECT_ALL = android.R.id.selectAll,
ID_CUT = android.R.id.cut,
ID_COPY = android.R.id.copy,
ID_PASTE = android.R.id.paste,
@ -300,6 +310,9 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
private final Runnable updateRunnable =
new Runnable() {
/**
* {@inheritDoc}
*/
@Override
public void run() {
replaceTextKeepCursor(getText());
@ -332,6 +345,9 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
// Syntax editor
setFilters(new InputFilter[]{
new InputFilter() {
/**
* {@inheritDoc}
*/
@Override
public CharSequence filter(
CharSequence source,
@ -355,6 +371,9 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
}});
}
/**
* {@inheritDoc}
*/
@Override
public boolean onKeyShortcut(
final int keyCode, final KeyEvent event) {
@ -383,6 +402,9 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
return super.onKeyShortcut(keyCode, event);
}
/**
* {@inheritDoc}
*/
@Override
public boolean onTextContextMenuItem(
final int id) {
@ -397,6 +419,9 @@ public class EditorFragment extends Fragment implements EncodingDialogFragment.E
}
}
/**
* {@inheritDoc}
*/
@Override
public void onDraw(final Canvas canvas) {
if (!EditorFragment.sWrapText) {

View File

@ -48,6 +48,9 @@ public class EncodingDialogFragment extends DialogFragment implements TextView.O
return f;
}
/**
* {@inheritDoc}
*/
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
final Bundle savedInstanceState) {
@ -68,6 +71,9 @@ public class EncodingDialogFragment extends DialogFragment implements TextView.O
final Button button = (Button) view.findViewById(android.R.id.button1);
button.setOnClickListener(new View.OnClickListener() {
/**
* {@inheritDoc}
*/
@Override
public void onClick(final View v) {
returnData();
@ -86,6 +92,9 @@ public class EncodingDialogFragment extends DialogFragment implements TextView.O
this.dismiss();
}
/**
* {@inheritDoc}
*/
@Override
public boolean onEditorAction(final TextView v, final int actionId, final KeyEvent event) {
if (EditorInfo.IME_ACTION_DONE == actionId) {

View File

@ -51,6 +51,7 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
private List<String> fileNames;
private ArrayAdapter<String> arrayAdapter;
/**
* {@inheritDoc}
*/
@ -61,6 +62,7 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
return rootView;
}
/**
* {@inheritDoc}
*/
@ -70,6 +72,7 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
getListView().setMultiChoiceModeListener(this);
}
/**
* {@inheritDoc}
*/
@ -82,6 +85,7 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
refreshList();
}
/**
* {@inheritDoc}
*/
@ -92,6 +96,7 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
EventBus.getDefault().unregister(this);
}
/**
* {@inheritDoc}
*/
@ -106,6 +111,7 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
EventBus.getDefault().post(new FileSelectedEvent(filePath));
}
/**
* {@inheritDoc}
*/
@ -113,6 +119,7 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
public void onItemCheckedStateChanged(ActionMode actionMode, int position, long l, boolean isChecked) {
}
/**
* {@inheritDoc}
*/
@ -123,6 +130,7 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
return true;
}
/**
* {@inheritDoc}
*/
@ -131,6 +139,7 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
return false;
}
/**
* {@inheritDoc}
*/
@ -144,7 +153,7 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
SparseBooleanArray checkedItems = getListView().getCheckedItemPositions();
// If we have some checked positions
if (checkedItems != null) {
for (int i=0; i<checkedItems.size(); i++) {
for (int i = 0; i < checkedItems.size(); i++) {
// check if the value is checked
if (checkedItems.valueAt(i)) {
// remove the checked path, but don't refresh the list
@ -162,6 +171,7 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
}
}
/**
* {@inheritDoc}
*/
@ -174,15 +184,16 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
/**
* When a new file is opened
* Invoked by the main activity which receive the intent
*
* @param event The event called
*/
public void onEvent(NewFileOpened event){
public void onEvent(NewFileOpened event) {
EventBus.getDefault().removeStickyEvent(event);
// File paths saved in preferences
String[] savedPaths = PreferenceHelper.getSavedPaths(getActivity());
for(int i = 0; i < savedPaths.length; i++){
for (int i = 0; i < savedPaths.length; i++) {
// We don't need to save the file path twice
if(savedPaths[i].equals(event.getFilePath())){
if (savedPaths[i].equals(event.getFilePath())) {
// Send the event that a file was selected
EventBus.getDefault().post(new FileSelectedEvent(event.getFilePath()));
return;
@ -194,12 +205,12 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
EventBus.getDefault().post(new FileSelectedEvent(event.getFilePath()));
}
private void addPath(String path){
private void addPath(String path) {
// Add a path and refresh the list
addPath(path, true);
}
private void addPath(String path, boolean refreshTheList){
private void addPath(String path, boolean refreshTheList) {
// File paths saved in preferences
String[] savedPaths = PreferenceHelper.getSavedPaths(getActivity());
// StringBuilder
@ -213,35 +224,35 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
// Put the string and commit
PreferenceHelper.setSavedPaths(getActivity(), sb);
// Update list
if(refreshTheList){
if (refreshTheList) {
refreshList();
}
}
private void removePath(String path){
private void removePath(String path) {
// Remove the path and refresh the list
removePath(path, true);
}
private void removePath(String path, boolean refresh){
private void removePath(String path, boolean refresh) {
// File paths saved in preferences
String[] savedPaths = PreferenceHelper.getSavedPaths(getActivity());
// StringBuilder
StringBuilder sb = new StringBuilder();
// for cycle
for (int count = 0; count < savedPaths.length; count++) {
if(path.equals(savedPaths[count])) continue;
if (path.equals(savedPaths[count])) continue;
sb.append(savedPaths[count]).append(",");
}
// Put the string and commit
PreferenceHelper.setSavedPaths(getActivity(), sb);
// Update list
if(refresh){
if (refresh) {
refreshList();
}
}
private void refreshList(){
private void refreshList() {
// File paths saved in preferences
String[] savedPaths = PreferenceHelper.getSavedPaths(getActivity());
// File names for the list
@ -249,10 +260,10 @@ public class NavigationDrawerListFragment extends ListFragment implements AbsLis
// StringBuilder that will contain the file paths
StringBuilder sb = new StringBuilder();
// for cycle to convert paths to names
for(String path : savedPaths){
for (String path : savedPaths) {
File file = new File(path);
// Check that the file exist
if(file.exists()){
if (file.exists()) {
fileNames.add(FilenameUtils.getName(path));
sb.append(path).append(",");
}

View File

@ -29,6 +29,7 @@ import com.vmihalachi.turboeditor.R;
public class NoFileOpenedFragment extends Fragment {
/**
* {@inheritDoc}
*/

View File

@ -21,7 +21,7 @@ package com.vmihalachi.turboeditor.util;
public class MimeTypes {
public static final String[] MIME_TEXT = {
"ajx","am","asa","asc","asp","aspx","awk","bat","c","cdf","cf","cfg","cfm","cgi","cnf","conf","cpp","css","csv","ctl","dat","dhtml","diz","file","forward","grp","h","hpp","hqx","hta","htaccess","htc","htm","html","htpasswd","htt","htx","in","inc","info","ini","ink","java","js","jsp","key","log","logfile","m3u","m4","m4a","mak","map","model","msg","nfo","nsi","info","old","pas","patch","perl","php","php2","php3","php4","php5","php6","phtml","pix","pl","pm","po","pwd","py","qmail","rb","rbl","rbw","readme","reg","rss","rtf","ruby","session","setup","sh","shtm","shtml","sql","ssh","stm","style","svg","tcl","text","threads","tmpl","tpl","txt","ubb","vbs","xhtml","xml","xrc","xsl"
"ajx", "am", "asa", "asc", "asp", "aspx", "awk", "bat", "c", "cdf", "cf", "cfg", "cfm", "cgi", "cnf", "conf", "cpp", "css", "csv", "ctl", "dat", "dhtml", "diz", "file", "forward", "grp", "h", "hpp", "hqx", "hta", "htaccess", "htc", "htm", "html", "htpasswd", "htt", "htx", "in", "inc", "info", "ini", "ink", "java", "js", "jsp", "key", "log", "logfile", "m3u", "m4", "m4a", "mak", "map", "model", "msg", "nfo", "nsi", "info", "old", "pas", "patch", "perl", "php", "php2", "php3", "php4", "php5", "php6", "phtml", "pix", "pl", "pm", "po", "pwd", "py", "qmail", "rb", "rbl", "rbw", "readme", "reg", "rss", "rtf", "ruby", "session", "setup", "sh", "shtm", "shtml", "sql", "ssh", "stm", "style", "svg", "tcl", "text", "threads", "tmpl", "tpl", "txt", "ubb", "vbs", "xhtml", "xml", "xrc", "xsl"
};
public static final String[] MIME_CODE = {
"xml", "php", "asp", "json", "wiki"
@ -30,7 +30,7 @@ public class MimeTypes {
"htm"
};
public static final String[] MIME_PICTURE = {
"png", "jpeg", "jpg", "ico", "gif", "bmp","tiff"
"png", "jpeg", "jpg", "ico", "gif", "bmp", "tiff"
};
public static final String[] MIME_MUSIC = {
"mp3", "avi", "flac", "mpga"

View File

@ -37,6 +37,9 @@ public class CapitalizedTextView extends TextView {
super(context, attrs, defStyle);
}
/**
* {@inheritDoc}
*/
@Override
public void setText(final CharSequence text, final BufferType type) {
super.setText(text.toString().toUpperCase(), type);