Commit 669faeae authored by Thomas Krex's avatar Thomas Krex

just some comments

parent 7afb78ba
...@@ -170,6 +170,7 @@ public class FeedDetailActivity extends SherlockActivity implements ...@@ -170,6 +170,7 @@ public class FeedDetailActivity extends SherlockActivity implements
feedItemLv.setEmptyView(findViewById(R.id.empty)); feedItemLv.setEmptyView(findViewById(R.id.empty));
// displaying items in listview // displaying items in listview
manager = new FeedItemDbManager(this); manager = new FeedItemDbManager(this);
// manager.deleteTable();
...@@ -189,18 +190,17 @@ public class FeedDetailActivity extends SherlockActivity implements ...@@ -189,18 +190,17 @@ public class FeedDetailActivity extends SherlockActivity implements
int columnIndex) { int columnIndex) {
boolean state=false; boolean state=false;
// Log.d("FeedItems", "Month: " +currDate.getMonth()); // insert month separator
if(view.getId()==R.id.listHeader){ if(view.getId()==R.id.listHeader){
Log.d("VIew Binder", "found header view"); Log.d("VIew Binder", "found header view");
TextView tx = (TextView) view; TextView tx = (TextView) view;
Date currDate= Utils.stringToDate(cursor.getString(cursor.getColumnIndex(FeedItemDbManager.COLUMN_DATE))); Date currDate= Utils.stringToDate(cursor.getString(cursor.getColumnIndex(FeedItemDbManager.COLUMN_DATE)));
Date prevDate= null; Date prevDate= null;
Log.d("ListView"," currDate: "+ currDate.toString());
if (cursor.getPosition() > 0 && cursor.moveToPrevious()) { if (cursor.getPosition() > 0 && cursor.moveToPrevious()) {
prevDate = Utils.stringToDate(cursor.getString(cursor.getColumnIndex(FeedItemDbManager.COLUMN_DATE))); prevDate = Utils.stringToDate(cursor.getString(cursor.getColumnIndex(FeedItemDbManager.COLUMN_DATE)));
Log.d("ListView"," prevDate: "+ prevDate.toString());
cursor.moveToNext(); cursor.moveToNext();
} }
if(prevDate==null||prevDate.getMonth()!=currDate.getMonth()){ if(prevDate==null||prevDate.getMonth()!=currDate.getMonth()){
...@@ -212,6 +212,8 @@ public class FeedDetailActivity extends SherlockActivity implements ...@@ -212,6 +212,8 @@ public class FeedDetailActivity extends SherlockActivity implements
} }
state=true; state=true;
} }
// change icon depending on status
if (view.getId() == R.id.statusIcon) { if (view.getId() == R.id.statusIcon) {
ImageView icon = (ImageView) view; ImageView icon = (ImageView) view;
int status = cursor.getInt(cursor int status = cursor.getInt(cursor
...@@ -263,6 +265,7 @@ public class FeedDetailActivity extends SherlockActivity implements ...@@ -263,6 +265,7 @@ public class FeedDetailActivity extends SherlockActivity implements
// click on feed in list // click on feed in list
if (position != -1) { if (position != -1) {
Log.d("OnItemClickListener", "fired");
Cursor c = (Cursor) av.getAdapter().getItem(position); Cursor c = (Cursor) av.getAdapter().getItem(position);
path = c.getString(c.getColumnIndex(FeedItemDbManager.COLUMN_PATH)); path = c.getString(c.getColumnIndex(FeedItemDbManager.COLUMN_PATH));
link = c.getString(c.getColumnIndex(FeedItemDbManager.COLUMN_LINK)); link = c.getString(c.getColumnIndex(FeedItemDbManager.COLUMN_LINK));
......
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