diff --git a/OSJ Forum/AndroidManifest.xml b/OSJ Forum/AndroidManifest.xml index 475c3ba..8ebc8ff 100644 --- a/OSJ Forum/AndroidManifest.xml +++ b/OSJ Forum/AndroidManifest.xml @@ -1,5 +1,5 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OSJ Forum/res/layout/item_post.xml b/OSJ Forum/res/layout/item_post.xml index e3d3e7e..c7d8e30 100644 --- a/OSJ Forum/res/layout/item_post.xml +++ b/OSJ Forum/res/layout/item_post.xml @@ -1,46 +1,16 @@ - + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="5dip" > + + - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/OSJ Forum/res/layout/item_topic.xml b/OSJ Forum/res/layout/item_topic.xml index 7d53b08..046193f 100644 --- a/OSJ Forum/res/layout/item_topic.xml +++ b/OSJ Forum/res/layout/item_topic.xml @@ -5,73 +5,25 @@ android:orientation="vertical" android:padding="5dip" > - - - - - - - - - - - - + + android:layout_height="wrap_content" > diff --git a/OSJ Forum/src/org/RickBarrette/osj/forum/ForumDetailFragment.java b/OSJ Forum/src/org/RickBarrette/osj/forum/ForumDetailFragment.java index 5809469..f20154c 100644 --- a/OSJ Forum/src/org/RickBarrette/osj/forum/ForumDetailFragment.java +++ b/OSJ Forum/src/org/RickBarrette/osj/forum/ForumDetailFragment.java @@ -178,7 +178,7 @@ public class ForumDetailFragment extends PullToRefreshListFragment implements Da public void run() { TopicContent.getTopics((String) mItem.content.get("forum_id"), mDb); setListAdapter(new ThumbnailAdapter(getActivity(), new TopicAdapter(getActivity()), new SimpleWebImageCache(null, null, - 101, new ThumbnailBus()), new int[] { R.id.quickContactBadge1 })); + 101, new ThumbnailBus()), new int[] { R.id.quickContactBadge })); getPullToRefreshListView().onRefreshComplete(); } }); diff --git a/OSJ Forum/src/org/RickBarrette/osj/forum/TopicDetailFragment.java b/OSJ Forum/src/org/RickBarrette/osj/forum/TopicDetailFragment.java index 305a2c4..58ecbd5 100644 --- a/OSJ Forum/src/org/RickBarrette/osj/forum/TopicDetailFragment.java +++ b/OSJ Forum/src/org/RickBarrette/osj/forum/TopicDetailFragment.java @@ -178,7 +178,7 @@ public class TopicDetailFragment extends PullToRefreshListFragment implements Da public void run() { ThreadContent.getThread((String) mItem.content.get("topic_id"), mDb); setListAdapter(new ThumbnailAdapter(getActivity(), new ThreadAdapter(getActivity()), new SimpleWebImageCache(null, null, - 101, new ThumbnailBus()), new int[] { R.id.quickContactBadge1 })); + 101, new ThumbnailBus()), new int[] { R.id.quickContactBadge })); getPullToRefreshListView().onRefreshComplete(); } }); diff --git a/OSJ Forum/src/org/RickBarrette/osj/forum/TopicListFragment.java b/OSJ Forum/src/org/RickBarrette/osj/forum/TopicListFragment.java index f2872fa..7e313be 100644 --- a/OSJ Forum/src/org/RickBarrette/osj/forum/TopicListFragment.java +++ b/OSJ Forum/src/org/RickBarrette/osj/forum/TopicListFragment.java @@ -67,7 +67,7 @@ public class TopicListFragment extends ListFragment { public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setListAdapter(new ThumbnailAdapter(getActivity(), new TopicAdapter(getActivity()), new SimpleWebImageCache(null, null, 101, - new ThumbnailBus()), new int[] { R.id.quickContactBadge1 })); + new ThumbnailBus()), new int[] { R.id.quickContactBadge })); } @Override diff --git a/OSJ Forum/src/org/RickBarrette/osj/forum/content/ThreadAdapter.java b/OSJ Forum/src/org/RickBarrette/osj/forum/content/ThreadAdapter.java index 96bf80d..39f841a 100644 --- a/OSJ Forum/src/org/RickBarrette/osj/forum/content/ThreadAdapter.java +++ b/OSJ Forum/src/org/RickBarrette/osj/forum/content/ThreadAdapter.java @@ -43,6 +43,7 @@ public class ThreadAdapter extends BaseAdapter { TextView user; TextView post; QuickContactBadge badage; + TextView date; } private final LayoutInflater mInflater; @@ -110,10 +111,11 @@ public class ThreadAdapter extends BaseAdapter { // views // we want to bind data to. holder = new ViewHolder(); - holder.title = (TextView) convertView.findViewById(R.id.textView1); - holder.user = (TextView) convertView.findViewById(R.id.textView2); - holder.post = (TextView) convertView.findViewById(R.id.textView3); - holder.badage = (QuickContactBadge) convertView.findViewById(R.id.quickContactBadge1); + holder.title = (TextView) convertView.findViewById(R.id.textView_title); + holder.user = (TextView) convertView.findViewById(R.id.textView_user); + holder.post = (TextView) convertView.findViewById(R.id.textView_post); + holder.date = (TextView) convertView.findViewById(R.id.textView_date); + holder.badage = (QuickContactBadge) convertView.findViewById(R.id.quickContactBadge); convertView.setTag(holder); } else @@ -129,6 +131,7 @@ public class ThreadAdapter extends BaseAdapter { holder.title.setText((String) getItem(position).get("post_title")); holder.user.setText((String) getItem(position).get("post_author_name")); holder.post.setText((String) getItem(position).get("post_content")); + holder.date.setText((String) getItem(position).get("post_time")); holder.badage.setImageResource(R.drawable.ic_launcher); holder.badage.setTag("http://www.gravatar.com/avatar/9b4f3d34ca3ce31198efac149c3a1ca2?s=300&d=identicon&r=PG"); diff --git a/OSJ Forum/src/org/RickBarrette/osj/forum/content/TopicAdapter.java b/OSJ Forum/src/org/RickBarrette/osj/forum/content/TopicAdapter.java index 80784f4..691e94e 100644 --- a/OSJ Forum/src/org/RickBarrette/osj/forum/content/TopicAdapter.java +++ b/OSJ Forum/src/org/RickBarrette/osj/forum/content/TopicAdapter.java @@ -111,12 +111,12 @@ public class TopicAdapter extends BaseAdapter { // views // we want to bind data to. holder = new ViewHolder(); - holder.title = (TextView) convertView.findViewById(R.id.textView1); - holder.lastestPost = (TextView) convertView.findViewById(R.id.textView2); - holder.user = (TextView) convertView.findViewById(R.id.textView3); - holder.newPosts = (TextView) convertView.findViewById(R.id.textView4); - holder.badage = (QuickContactBadge) convertView.findViewById(R.id.quickContactBadge1); - holder.date = (TextView) convertView.findViewById(R.id.textView5); + holder.title = (TextView) convertView.findViewById(R.id.textView_title); + holder.lastestPost = (TextView) convertView.findViewById(R.id.textView_latestPost); + holder.user = (TextView) convertView.findViewById(R.id.textView_user); + holder.newPosts = (TextView) convertView.findViewById(R.id.textView_newPosts); + holder.badage = (QuickContactBadge) convertView.findViewById(R.id.quickContactBadge); + holder.date = (TextView) convertView.findViewById(R.id.textView_date); convertView.setTag(holder); } else