rounded ImageView instead of Bitmap, crop-select

// FREEBIE
This commit is contained in:
Jake McGinty
2014-12-29 17:31:41 -08:00
parent a0599c1639
commit 62816ee51a
19 changed files with 81 additions and 154 deletions

View File

@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.ConversationItem android:id="@+id/conversation_item"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="10dip"
android:orientation="vertical"
android:background="?conversation_item_background"
xmlns:android="http://schemas.android.com/apk/res/android">
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="10dip"
android:orientation="vertical"
android:background="?conversation_item_background"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<TextView android:id="@+id/group_message_status"
android:layout_width="wrap_content"
@@ -26,11 +27,12 @@
android:layout_marginRight="0dp"
android:orientation="horizontal">
<org.thoughtcrime.securesms.components.ForegroundImageView
<com.makeramen.RoundedImageView
android:id="@+id/contact_photo"
android:foreground="@drawable/contact_photo_background"
android:layout_width="40dp"
android:layout_height="40dp"
app:riv_oval="true"
android:layout_marginRight="10dp"
android:layout_alignParentLeft="true"
android:cropToPadding="true"

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.ConversationListItem
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -15,11 +16,12 @@
android:paddingRight="10dp"
android:visibility="visible">
<org.thoughtcrime.securesms.components.ForegroundImageView
<com.makeramen.RoundedImageView
android:id="@+id/contact_photo_image"
android:foreground="@drawable/contact_photo_background"
android:layout_width="60dp"
android:layout_height="60dp"
app:riv_oval="true"
android:cropToPadding="true"
android:scaleType="centerCrop"
android:visibility="gone"

View File

@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
@@ -24,6 +25,7 @@
android:layout_width="70dp"
android:layout_height="70dp"
position="bottom_right"
app:riv_oval="true"
android:layout_marginRight="10dp"
android:src="@drawable/ic_group_photo"
android:contentDescription="@string/GroupCreateActivity_avatar_content_description" />

View File

@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:paddingRight="25dip">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:paddingRight="25dip">
<ImageView android:id="@+id/contact_photo_image"
<com.makeramen.RoundedImageView
android:id="@+id/contact_photo_image"
android:layout_width="@dimen/contact_selection_photo_size"
android:layout_height="@dimen/contact_selection_photo_size"
android:layout_alignParentLeft="true"
@@ -13,6 +15,7 @@
android:layout_marginLeft="10dp"
android:cropToPadding="true"
android:scaleType="centerCrop"
app:riv_oval="true"
android:contentDescription="@string/SingleContactSelectionActivity_contact_photo" />
<TextView android:id="@+id/number"