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
| // Add this template in Preferences > Java > Editor > Templates > New | |
| // I stored this snippet with newFragment name, but you can use any name you want | |
| public static Fragment newInstance() { | |
| return new ${fragment}; | |
| } | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, ViewGroup container, | |
| Bundle savedInstanceState) { |
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
| // Add this template in Preferences > Java > Editor > Templates > New | |
| // I stored this snippet with newLoader name, but you can use any name you want | |
| // To use this loader your class should implements LoaderCallbacks<Cursor> | |
| private static final int ${loaderName} = 0; | |
| @Override | |
| public Loader<Cursor> onCreateLoader(int id, Bundle args) { | |
| switch (id) { | |
| case ${loaderName}: |
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
| // Add this template in Preferences > Java > Editor > Templates > New | |
| // I stored this snippet with newTable name, but you can use any name you want | |
| public static class ${tableName} implements BaseColumns { | |
| public static final String CONTENT_PATH = ${name}; | |
| public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, CONTENT_PATH); | |
| public static final String CONTENT_ITEM_TYPE = DataHelper.contentItemType(AUTHORITY, CONTENT_PATH); | |
| public static final String CONTENT_DIR_TYPE = DataHelper.contentType(AUTHORITY, CONTENT_PATH); |
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
| // Add this template in Preferences > Java > Editor > Templates > New | |
| // I stored this snippet with newField name, but you can use any name you want | |
| public static final String ${name} = DataHelper.field(DB_TABLE, "${value}"); |
NewerOlder