Commit 0c1048db authored by Alan McNatty's avatar Alan McNatty
Browse files

Fixed a few bugs an added some flashing lights (no really ;).

The 2nd last commit with UI changes for help/introduction changes moved about some of the list-adapter set-up which didn't work to well adjusting to changes in the list. These are now fixed.

There is still issues in th ArtefactSettingsActivity when thumbnails are added. The UI does not adjust tofit them it properly.
parent ebf87f80
...@@ -249,17 +249,17 @@ public class ArtefactDataSQLHelper extends SQLiteOpenHelper { ...@@ -249,17 +249,17 @@ public class ArtefactDataSQLHelper extends SQLiteOpenHelper {
SQLiteDatabase db = this.getWritableDatabase(); SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues(); ContentValues values = new ContentValues();
values.put(ArtefactDataSQLHelper.TIME, System.currentTimeMillis()); values.put(ArtefactDataSQLHelper.TIME, System.currentTimeMillis());
if ( filename != null ) // if ( filename != null )
values.put(ArtefactDataSQLHelper.FILENAME, filename); values.put(ArtefactDataSQLHelper.FILENAME, filename);
if ( title != null ) // if ( title != null )
values.put(ArtefactDataSQLHelper.TITLE, title); values.put(ArtefactDataSQLHelper.TITLE, title);
if ( description != null ) // if ( description != null )
values.put(ArtefactDataSQLHelper.DESCRIPTION, description); values.put(ArtefactDataSQLHelper.DESCRIPTION, description);
if ( tags != null ) // if ( tags != null )
values.put(ArtefactDataSQLHelper.TAGS, tags); values.put(ArtefactDataSQLHelper.TAGS, tags);
if ( saved_id != null ) if ( saved_id != null )
values.put(ArtefactDataSQLHelper.SAVED_ID, saved_id); values.put(ArtefactDataSQLHelper.SAVED_ID, saved_id);
if ( journal_id != null ) // if ( journal_id != null )
values.put(ArtefactDataSQLHelper.JOURNAL_ID, journal_id); values.put(ArtefactDataSQLHelper.JOURNAL_ID, journal_id);
values.put(ArtefactDataSQLHelper.IS_DRAFT, is_draft); values.put(ArtefactDataSQLHelper.IS_DRAFT, is_draft);
values.put(ArtefactDataSQLHelper.ALLOW_COMMENTS, allow_comments); values.put(ArtefactDataSQLHelper.ALLOW_COMMENTS, allow_comments);
......
...@@ -84,12 +84,6 @@ public class ArtefactExpandableListAdapterActivity extends Activity { ...@@ -84,12 +84,6 @@ public class ArtefactExpandableListAdapterActivity extends Activity {
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.windowtitle); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.windowtitle);
adapter = new ArtefactExpandableListAdapter(this, new ArrayList<String>(),
new ArrayList<ArrayList<Artefact>>());
listview = (ExpandableListView) findViewById(R.id.listView);
listview.setAdapter(adapter);
// A content view has now be set so lets set the title. // A content view has now be set so lets set the title.
((TextView) findViewById(R.id.windowtitle_text)).setText(getString(R.string.app_name)); ((TextView) findViewById(R.id.windowtitle_text)).setText(getString(R.string.app_name));
...@@ -139,6 +133,11 @@ public class ArtefactExpandableListAdapterActivity extends Activity { ...@@ -139,6 +133,11 @@ public class ArtefactExpandableListAdapterActivity extends Activity {
// Else we have some artefacts to show lets load them up in our ExpandableListAdapter // Else we have some artefacts to show lets load them up in our ExpandableListAdapter
} else { } else {
adapter = new ArtefactExpandableListAdapter(this, new ArrayList<String>(),
new ArrayList<ArrayList<Artefact>>());
listview = (ExpandableListView) findViewById(R.id.listView);
listview.setAdapter(adapter);
// Hide the introduction bits // Hide the introduction bits
((RelativeLayout) findViewById(R.id.introduction)).setVisibility(View.GONE); ((RelativeLayout) findViewById(R.id.introduction)).setVisibility(View.GONE);
((RelativeLayout) findViewById(R.id.artefacts)).setVisibility(View.VISIBLE); ((RelativeLayout) findViewById(R.id.artefacts)).setVisibility(View.VISIBLE);
......
...@@ -219,6 +219,7 @@ public class ArtifactSettingsActivity extends Activity implements OnClickListene ...@@ -219,6 +219,7 @@ public class ArtifactSettingsActivity extends Activity implements OnClickListene
ia = new ImageAdapter(this, uris); ia = new ImageAdapter(this, uris);
Gallery gallery = (Gallery) findViewById(R.id.FileGallery); Gallery gallery = (Gallery) findViewById(R.id.FileGallery);
gallery.setAdapter(ia); gallery.setAdapter(ia);
gallery.invalidate();
} }
private void setDefaultTitle(String f) { private void setDefaultTitle(String f) {
...@@ -494,7 +495,7 @@ public class ArtifactSettingsActivity extends Activity implements OnClickListene ...@@ -494,7 +495,7 @@ public class ArtifactSettingsActivity extends Activity implements OnClickListene
break; break;
} }
if ( uris == null ) { if ( uris == null || uris.length == 0 ) {
if ( a == null ) { if ( a == null ) {
a = new Artefact(imageFile); a = new Artefact(imageFile);
} }
......
...@@ -147,6 +147,8 @@ public class TransferService extends IntentService { ...@@ -147,6 +147,8 @@ public class TransferService extends IntentService {
notification.setLatestEventInfo(mContext, title, description, contentIntent); notification.setLatestEventInfo(mContext, title, description, contentIntent);
notification.flags |= Notification.FLAG_ONGOING_EVENT; notification.flags |= Notification.FLAG_ONGOING_EVENT;
notification.flags |= Notification.FLAG_AUTO_CANCEL; notification.flags |= Notification.FLAG_AUTO_CANCEL;
notification.flags |= Notification.DEFAULT_SOUND;
notification.flags |= Notification.FLAG_SHOW_LIGHTS;
// Send the notification. // Send the notification.
mNM.notify(id, notification); mNM.notify(id, notification);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment