mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-21 05:45:13 +00:00
Added borders for comments / replies. Modified indenting for share / comment images
This commit is contained in:
parent
f97dabb274
commit
a6057f83e8
4 changed files with 44 additions and 22 deletions
|
@ -104,6 +104,8 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
android:visibility="gone" >
|
android:visibility="gone" >
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -119,7 +121,7 @@
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_marginRight="3dp"
|
android:layout_marginRight="5dp"
|
||||||
android:textColor="@color/darkgray"
|
android:textColor="@color/darkgray"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
@ -131,7 +133,7 @@
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="15dp"
|
android:layout_marginRight="15dp"
|
||||||
android:layout_marginLeft="3dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:textColor="@color/darkgray"
|
android:textColor="@color/darkgray"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/item_background"
|
android:background="@color/item_background"
|
||||||
android:orientation="vertical" xmlns:app="http://schemas.android.com/apk/res/com.newsblur">
|
android:orientation="vertical" >
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -82,7 +83,7 @@
|
||||||
android:layout_toLeftOf="@id/comment_shareddate"
|
android:layout_toLeftOf="@id/comment_shareddate"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/favourite" />
|
android:src="@drawable/favourite" />
|
||||||
|
|
||||||
<com.newsblur.view.FlowLayout
|
<com.newsblur.view.FlowLayout
|
||||||
xmlns:newsblur="http://schemas.android.com/apk/res/com.newsblur"
|
xmlns:newsblur="http://schemas.android.com/apk/res/com.newsblur"
|
||||||
android:id="@+id/comment_favourite_avatars"
|
android:id="@+id/comment_favourite_avatars"
|
||||||
|
@ -90,8 +91,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignBottom="@id/comment_shareddate"
|
android:layout_alignBottom="@id/comment_shareddate"
|
||||||
android:layout_marginRight="4dp"
|
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
|
<TextView
|
||||||
android:id="@+id/comment_username"
|
android:id="@+id/comment_username"
|
||||||
|
@ -99,11 +100,9 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignBottom="@id/comment_shareddate"
|
android:layout_alignBottom="@id/comment_shareddate"
|
||||||
android:layout_toRightOf="@id/comment_user_image"
|
android:layout_toRightOf="@id/comment_user_image"
|
||||||
android:paddingBottom="3dp"
|
|
||||||
android:textColor="@color/newsblur_blue"
|
android:textColor="@color/newsblur_blue"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/comment_text"
|
android:id="@+id/comment_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -111,14 +110,23 @@
|
||||||
android:layout_below="@id/comment_shareddate"
|
android:layout_below="@id/comment_shareddate"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
android:layout_toRightOf="@id/comment_user_image"
|
android:layout_toRightOf="@id/comment_user_image"
|
||||||
android:textColor="@color/darkgray"
|
android:textColor="@color/darkgray"
|
||||||
android:textSize="14dp" />
|
android:textSize="14dp" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/comment_replies_container"
|
android:id="@+id/comment_replies_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
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>
|
</LinearLayout>
|
|
@ -10,11 +10,19 @@
|
||||||
android:paddingRight="10dp"
|
android:paddingRight="10dp"
|
||||||
android:paddingTop="12dp" >
|
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
|
<ImageView
|
||||||
android:id="@+id/reply_user_image"
|
android:id="@+id/reply_user_image"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_below="@id/reply_divider"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:contentDescription="@string/description_comment_user"
|
android:contentDescription="@string/description_comment_user"
|
||||||
|
@ -26,16 +34,18 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_marginRight="26dp"
|
android:layout_marginRight="26dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
android:textColor="@color/lightgray"
|
android:textColor="@color/lightgray"
|
||||||
android:textSize="12sp"/>
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/reply_username"
|
android:id="@+id/reply_username"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
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_alignBottom="@id/reply_shareddate"
|
||||||
|
android:layout_toRightOf="@id/reply_user_image"
|
||||||
|
android:textColor="@color/newsblur_blue"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -44,10 +54,9 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/reply_shareddate"
|
android:layout_below="@id/reply_shareddate"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
android:layout_toRightOf="@id/reply_user_image"
|
android:layout_toRightOf="@id/reply_user_image"
|
||||||
android:textColor="@color/darkgray"
|
android:textColor="@color/darkgray"
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:textSize="14dp" />
|
android:textSize="14dp" />
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
|
@ -255,15 +255,18 @@ public class SetupCommentSectionTask extends AsyncTask<Void, Void, Void> {
|
||||||
commentCursor.moveToNext();
|
commentCursor.moveToNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (View comment : publicCommentViews) {
|
for (int i = 0; i < publicCommentViews.size(); i++) {
|
||||||
((LinearLayout) viewHolder.get().findViewById(R.id.reading_public_comment_container)).addView(comment);
|
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) {
|
for (int i = 0; i < friendCommentViews.size(); i++) {
|
||||||
((LinearLayout) viewHolder.get().findViewById(R.id.reading_friend_comment_container)).addView(comment);
|
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();
|
commentCursor.close();
|
||||||
|
|
Loading…
Add table
Reference in a new issue