android-boilerplate
android-boilerplate copied to clipboard
Activity package hardcoded in some imports
Some of the generated files (I noticed this in activities) have the package and/or imports hard-coded to the default (original author's) path, e.g:
import com.mparaiso.crud.R;
import com.mparaiso.crud.dao.*;
import com.mparaiso.crud.model.*;
These should be changed to the path indicated by the manifest.
Hi! thanks sorry i did not see it before(dont know why github is not sending me notifications when an issue is opened ) ,i'll look into it ! if you have other suggestions dont hesitate,just be patient.
Cool. I have a few more suggestions:
-
db/provider/provider.java
has a redundant semicolon at the end of thestatic
segment`. -
formatting could be better (indentation etc.), but it is easily resolved using automated tools.
-
I thing that it will be beneficial to abstract the models
public ArrayList<ExtractedFeature> findAll() { ArrayList<ExtractedFeature> result = new ArrayList<ExtractedFeature>(); try { Cursor c = context.getContentResolver(). acquireContentProviderClient(Provider.CONTENT_URI) .query(Uri.withAppendedPath(Provider.CONTENT_URI, TABLE_NAME), PROJECTION, null, null, null); if (c.moveToFirst()) { do { ...
by:
public ArrayList<ExtractedFeature> findAll() { return query(null, null, null); } protected ArrayList<ExtractedFeature> query(String selection, String[] selectionArgs, String sortOrder) { ArrayList<ExtractedFeature> result = new ArrayList<ExtractedFeature>(); try { Cursor c = context.getContentResolver(). acquireContentProviderClient(Provider.CONTENT_URI) .query(Uri.withAppendedPath(Provider.CONTENT_URI, TABLE_NAME), PROJECTION, selection, selectionArgs, sortOrder); if (c.moveToFirst()) { do { ...
will make it easier to filter data by calling the
query()
method.
Thanks for fixing the imports issue :)