Added borders for comments / replies. Modified indenting for share / comment images

This commit is contained in:
RyanBateman 2012-09-28 14:34:07 -04:00
parent f97dabb274
commit a6057f83e8
4 changed files with 44 additions and 22 deletions

View file

@ -104,6 +104,8 @@
android:layout_gravity="center_vertical"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:visibility="gone" >
<View
@ -119,7 +121,7 @@
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="15dp"
android:layout_marginRight="3dp"
android:layout_marginRight="5dp"
android:textColor="@color/darkgray"
android:textSize="12sp"
android:textStyle="bold" />
@ -131,7 +133,7 @@
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:layout_marginLeft="3dp"
android:layout_marginLeft="5dp"
android:textColor="@color/darkgray"
android:textSize="12sp"
android:textStyle="bold" />

View file

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.newsblur"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/item_background"
android:orientation="vertical" xmlns:app="http://schemas.android.com/apk/res/com.newsblur">
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
@ -90,8 +91,8 @@
android:layout_height="wrap_content"
android:layout_alignBottom="@id/comment_shareddate"
android:layout_marginRight="4dp"
newsblur:flow="left"
android:layout_toLeftOf="@id/comment_favourite_icon" />
android:layout_toLeftOf="@id/comment_favourite_icon"
newsblur:flow="left" />
<TextView
android:id="@+id/comment_username"
@ -99,11 +100,9 @@
android:layout_height="wrap_content"
android:layout_alignBottom="@id/comment_shareddate"
android:layout_toRightOf="@id/comment_user_image"
android:paddingBottom="3dp"
android:textColor="@color/newsblur_blue"
android:textSize="14sp" />
<TextView
android:id="@+id/comment_text"
android:layout_width="match_parent"
@ -111,9 +110,11 @@
android:layout_below="@id/comment_shareddate"
android:layout_marginRight="10dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:layout_toRightOf="@id/comment_user_image"
android:textColor="@color/darkgray"
android:textSize="14dp" />
</RelativeLayout>
<LinearLayout
@ -121,4 +122,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<View
android:id="@+id/comment_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="5dp"
android:background="#A6A6A6" />
</LinearLayout>

View file

@ -10,11 +10,19 @@
android:paddingRight="10dp"
android:paddingTop="12dp" >
<View
android:id="@+id/reply_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentTop="true"
android:layout_marginBottom="5dp"
android:background="#A6A6A6" />
<ImageView
android:id="@+id/reply_user_image"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentTop="true"
android:layout_below="@id/reply_divider"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:contentDescription="@string/description_comment_user"
@ -26,16 +34,18 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="26dp"
android:layout_marginTop="5dp"
android:textColor="@color/lightgray"
android:textSize="12sp"/>
android:textSize="12sp" />
<TextView
android:id="@+id/reply_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/newsblur_blue"
android:layout_toRightOf="@id/reply_user_image"
android:layout_alignBottom="@id/reply_shareddate"
android:layout_toRightOf="@id/reply_user_image"
android:textColor="@color/newsblur_blue"
android:layout_marginTop="5dp"
android:textSize="12sp" />
<TextView
@ -44,10 +54,9 @@
android:layout_height="wrap_content"
android:layout_below="@id/reply_shareddate"
android:layout_marginRight="10dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="@id/reply_user_image"
android:textColor="@color/darkgray"
android:layout_marginTop="5dp"
android:textSize="14dp" />
</RelativeLayout>

View file

@ -255,15 +255,18 @@ public class SetupCommentSectionTask extends AsyncTask<Void, Void, Void> {
commentCursor.moveToNext();
}
for (View comment : publicCommentViews) {
((LinearLayout) viewHolder.get().findViewById(R.id.reading_public_comment_container)).addView(comment);
for (int i = 0; i < publicCommentViews.size(); i++) {
if (i == publicCommentViews.size() - 1) {
publicCommentViews.get(i).findViewById(R.id.comment_divider).setVisibility(View.GONE);
}
((LinearLayout) viewHolder.get().findViewById(R.id.reading_public_comment_container)).addView(publicCommentViews.get(i));
}
for (View comment : friendCommentViews) {
((LinearLayout) viewHolder.get().findViewById(R.id.reading_friend_comment_container)).addView(comment);
for (int i = 0; i < friendCommentViews.size(); i++) {
if (i == friendCommentViews.size() - 1) {
friendCommentViews.get(i).findViewById(R.id.comment_divider).setVisibility(View.GONE);
}
((LinearLayout) viewHolder.get().findViewById(R.id.reading_friend_comment_container)).addView(friendCommentViews.get(i));
}
Log.d("SetupCommentSection", "Friend comments: " + friendCommentViews.size());
}
commentCursor.close();