Layout cleanup.
New background for pictures.
Bubble background for replies.
Padding, font sizes, colors, underlining of links.
Removed divider between replies
Made bubble properly transparent and stretched.
diff --git a/res/drawable-finger/social_picture_border_in_list.9.png b/res/drawable-finger/social_picture_border_in_list.9.png
new file mode 100644
index 0000000..8fc6ab3
--- /dev/null
+++ b/res/drawable-finger/social_picture_border_in_list.9.png
Binary files differ
diff --git a/res/drawable/bg_stream.png b/res/drawable/bg_stream.png
new file mode 100644
index 0000000..0cec313
--- /dev/null
+++ b/res/drawable/bg_stream.png
Binary files differ
diff --git a/res/drawable/bubble_stream.9.png b/res/drawable/bubble_stream.9.png
new file mode 100644
index 0000000..faf444d
--- /dev/null
+++ b/res/drawable/bubble_stream.9.png
Binary files differ
diff --git a/res/drawable/stream_bot.png b/res/drawable/stream_bot.png
new file mode 100644
index 0000000..cea0eb3
--- /dev/null
+++ b/res/drawable/stream_bot.png
Binary files differ
diff --git a/res/layout-finger/social_list.xml b/res/layout-finger/social_list.xml
index d46ee6b..54417f3 100644
--- a/res/layout-finger/social_list.xml
+++ b/res/layout-finger/social_list.xml
@@ -32,7 +32,10 @@
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:fastScrollEnabled="true" />
+ android:fastScrollEnabled="true"
+ android:divider="#0000"
+ android:dividerHeight="0dip"
+ />
</com.android.contacts.EdgeTriggerView>
diff --git a/res/layout-finger/social_list_item.xml b/res/layout-finger/social_list_item.xml
index 92dcfce..bbac375 100644
--- a/res/layout-finger/social_list_item.xml
+++ b/res/layout-finger/social_list_item.xml
@@ -16,7 +16,18 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:minHeight="64dip"
+>
+
+ <View
+ android:id="@+id/divider"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+
+ android:background="?android:attr/listDivider"
+ />
<ImageView
android:id="@+id/sourceIcon"
@@ -25,7 +36,7 @@
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_centerVertical="true"
- android:layout_marginTop="2dip"
+ android:layout_marginTop="15dip"
android:layout_marginLeft="5dip"
android:layout_marginRight="8dip"
@@ -43,8 +54,10 @@
android:layout_marginTop="1dip"
android:layout_marginRight="8dip"
- android:background="@drawable/contact_picture_border_in_list"
+ android:background="@drawable/social_picture_border_in_list"
+ android:cropToPadding="true"
android:gravity="center"
+ android:padding="5dip"
android:scaleType="fitCenter"
/>
@@ -53,7 +66,8 @@
android:layout_height="wrap_content"
android:layout_toRightOf="@id/photo"
android:layout_toLeftOf="@id/sourceIcon"
- android:paddingBottom="2dip"
+ android:paddingTop="5dip"
+ android:paddingBottom="5dip"
android:orientation="vertical"
>
@@ -62,9 +76,9 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:lineSpacingMultiplier="0.9"
android:maxLines="6"
android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?android:attr/textColorPrimary"
/>
<TextView
@@ -72,9 +86,11 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:paddingLeft="20dip"
+ android:paddingBottom="5dip"
android:maxLines="2"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="#39F"
+ android:textColor="#38F"
/>
<ImageView
@@ -92,11 +108,11 @@
android:id="@+id/published"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="8dip"
android:lines="1"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="#999"
+ android:textColor="?android:attr/textColorSecondary"
+ android:textSize="12sp"
/>
</LinearLayout>
diff --git a/res/layout-finger/social_list_item_reply.xml b/res/layout-finger/social_list_item_reply.xml
index 5b21768..38d72ac 100644
--- a/res/layout-finger/social_list_item_reply.xml
+++ b/res/layout-finger/social_list_item_reply.xml
@@ -17,7 +17,9 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:paddingBottom="2dip">
+ android:minHeight="64dip"
+ android:paddingBottom="5dip"
+>
<ImageView
android:id="@+id/photo"
@@ -26,12 +28,13 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_centerVertical="true"
- android:layout_marginTop="1dip"
- android:layout_marginRight="8dip"
+ android:layout_marginTop="15dip"
android:layout_marginLeft="50dip"
- android:background="@drawable/contact_picture_border_in_list"
+ android:background="@drawable/social_picture_border_in_list"
+ android:cropToPadding="true"
android:gravity="center"
+ android:padding="5dip"
android:scaleType="fitCenter"
/>
@@ -41,8 +44,14 @@
android:layout_toRightOf="@id/photo"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
- android:paddingBottom="2dip"
+ android:layout_marginLeft="-6dip"
+
+ android:paddingTop="8dip"
+ android:paddingRight="8dip"
+ android:paddingBottom="8dip"
+ android:paddingLeft="18dip"
android:orientation="vertical"
+ android:background="@drawable/bubble_stream"
>
<TextView
@@ -50,9 +59,9 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:lineSpacingMultiplier="0.9"
android:maxLines="6"
android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?android:attr/textColorPrimary"
/>
<TextView
@@ -60,9 +69,11 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:paddingLeft="20dip"
+ android:paddingBottom="5dip"
android:maxLines="2"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="#39F"
+ android:textColor="#38F"
/>
<ImageView
@@ -80,11 +91,11 @@
android:id="@+id/published"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="8dip"
android:lines="1"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="#999"
+ android:textColor="?android:attr/textColorSecondary"
+ android:textSize="12sp"
/>
</LinearLayout>
</RelativeLayout>
diff --git a/src/com/android/contacts/SocialStreamActivity.java b/src/com/android/contacts/SocialStreamActivity.java
index 9412287..31dc652 100644
--- a/src/com/android/contacts/SocialStreamActivity.java
+++ b/src/com/android/contacts/SocialStreamActivity.java
@@ -49,6 +49,7 @@
import android.text.SpannableStringBuilder;
import android.text.format.DateUtils;
import android.text.style.StyleSpan;
+import android.text.style.UnderlineSpan;
import android.util.AttributeSet;
import android.util.Log;
import android.util.Xml;
@@ -175,6 +176,7 @@
private final ContactsCache mContactsCache;
private final MappingCache mMappingCache;
private final StyleSpan mTextStyleName;
+ private final UnderlineSpan mTextStyleLink;
private static class SocialHolder {
ImageView photo;
@@ -182,6 +184,7 @@
TextView content;
SpannableStringBuilder contentBuilder = new SpannableStringBuilder();
TextView summary;
+ SpannableStringBuilder summaryBuilder = new SpannableStringBuilder();
ImageView thumbnail;
TextView published;
}
@@ -194,6 +197,7 @@
mContactsCache = contactsCache;
mMappingCache = mappingCache;
mTextStyleName = new StyleSpan(android.graphics.Typeface.BOLD);
+ mTextStyleLink = new UnderlineSpan();
}
@Override
@@ -236,7 +240,10 @@
if (summary == null) {
holder.summary.setVisibility(View.GONE);
} else {
- holder.summary.setText(summary);
+ holder.summaryBuilder.clear();
+ holder.summaryBuilder.append(summary);
+ holder.summaryBuilder.setSpan(mTextStyleLink, 0, summary.length(), 0);
+ holder.summary.setText(holder.summaryBuilder);
holder.summary.setVisibility(View.VISIBLE);
}