allow to pin conversations on top. fixes #3480

This commit is contained in:
Daniel Gultsch 2020-05-16 12:10:26 +02:00
parent 7a21b2c5ed
commit 4dd3b0c2aa
18 changed files with 328 additions and 233 deletions

View file

@ -6,6 +6,8 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.text.TextUtils; import android.text.TextUtils;
import com.google.common.collect.ComparisonChain;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
@ -49,9 +51,9 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
public static final String ATTRIBUTE_MUTED_TILL = "muted_till"; public static final String ATTRIBUTE_MUTED_TILL = "muted_till";
public static final String ATTRIBUTE_ALWAYS_NOTIFY = "always_notify"; public static final String ATTRIBUTE_ALWAYS_NOTIFY = "always_notify";
public static final String ATTRIBUTE_PUSH_NODE = "push_node";
public static final String ATTRIBUTE_LAST_CLEAR_HISTORY = "last_clear_history"; public static final String ATTRIBUTE_LAST_CLEAR_HISTORY = "last_clear_history";
public static final String ATTRIBUTE_FORMERLY_PRIVATE_NON_ANONYMOUS = "formerly_private_non_anonymous"; public static final String ATTRIBUTE_FORMERLY_PRIVATE_NON_ANONYMOUS = "formerly_private_non_anonymous";
public static final String ATTRIBUTE_PINNED_ON_TOP = "pinned_on_top";
static final String ATTRIBUTE_MUC_PASSWORD = "muc_password"; static final String ATTRIBUTE_MUC_PASSWORD = "muc_password";
static final String ATTRIBUTE_MEMBERS_ONLY = "members_only"; static final String ATTRIBUTE_MEMBERS_ONLY = "members_only";
static final String ATTRIBUTE_MODERATED = "moderated"; static final String ATTRIBUTE_MODERATED = "moderated";
@ -479,7 +481,10 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
@Override @Override
public int compareTo(@NonNull Conversation another) { public int compareTo(@NonNull Conversation another) {
return Long.compare(another.getSortableTime(), getSortableTime()); return ComparisonChain.start()
.compareFalseFirst(another.getBooleanAttribute(ATTRIBUTE_PINNED_ON_TOP, false), getBooleanAttribute(ATTRIBUTE_PINNED_ON_TOP,false))
.compare(another.getSortableTime(), getSortableTime())
.result();
} }
private long getSortableTime() { private long getSortableTime() {

View file

@ -962,6 +962,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
final MenuItem menuCall = menu.findItem(R.id.action_call); final MenuItem menuCall = menu.findItem(R.id.action_call);
final MenuItem menuOngoingCall = menu.findItem(R.id.action_ongoing_call); final MenuItem menuOngoingCall = menu.findItem(R.id.action_ongoing_call);
final MenuItem menuVideoCall = menu.findItem(R.id.action_video_call); final MenuItem menuVideoCall = menu.findItem(R.id.action_video_call);
final MenuItem menuTogglePinned = menu.findItem(R.id.action_toggle_pinned);
if (conversation != null) { if (conversation != null) {
@ -994,6 +995,11 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
} }
ConversationMenuConfigurator.configureAttachmentMenu(conversation, menu); ConversationMenuConfigurator.configureAttachmentMenu(conversation, menu);
ConversationMenuConfigurator.configureEncryptionMenu(conversation, menu); ConversationMenuConfigurator.configureEncryptionMenu(conversation, menu);
if (conversation.getBooleanAttribute(Conversation.ATTRIBUTE_PINNED_ON_TOP, false)) {
menuTogglePinned.setTitle(R.string.remove_from_favorites);
} else {
menuTogglePinned.setTitle(R.string.add_to_favorites);
}
} }
super.onCreateOptionsMenu(menu, menuInflater); super.onCreateOptionsMenu(menu, menuInflater);
} }
@ -1261,6 +1267,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
case R.id.action_ongoing_call: case R.id.action_ongoing_call:
returnToOngoingCall(); returnToOngoingCall();
break; break;
case R.id.action_toggle_pinned:
togglePinned();
break;
default: default:
break; break;
} }
@ -1289,6 +1298,12 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
} }
private void togglePinned() {
final boolean pinned = conversation.getBooleanAttribute(Conversation.ATTRIBUTE_PINNED_ON_TOP, false);
conversation.setAttribute(Conversation.ATTRIBUTE_PINNED_ON_TOP, !pinned);
activity.xmppConnectionService.updateConversation(conversation);
}
private void checkPermissionAndTriggerAudioCall() { private void checkPermissionAndTriggerAudioCall() {
if (activity.mUseTor || conversation.getAccount().isOnion()) { if (activity.mUseTor || conversation.getAccount().isOnion()) {
Toast.makeText(activity, R.string.disable_tor_to_make_call, Toast.LENGTH_SHORT).show(); Toast.makeText(activity, R.string.disable_tor_to_make_call, Toast.LENGTH_SHORT).show();

View file

@ -201,6 +201,7 @@ public class ConversationAdapter extends RecyclerView.Adapter<ConversationAdapte
} else { } else {
timestamp = conversation.getLatestMessage().getTimeSent(); timestamp = conversation.getLatestMessage().getTimeSent();
} }
viewHolder.binding.pinnedOnTop.setVisibility(conversation.getBooleanAttribute(Conversation.ATTRIBUTE_PINNED_ON_TOP,false) ? View.VISIBLE : View.GONE);
viewHolder.binding.conversationLastupdate.setText(UIHelper.readableTimeDifference(activity, timestamp)); viewHolder.binding.conversationLastupdate.setText(UIHelper.readableTimeDifference(activity, timestamp));
AvatarWorkerTask.loadAvatar(conversation, viewHolder.binding.conversationImage, R.dimen.avatar_on_conversation_overview); AvatarWorkerTask.loadAvatar(conversation, viewHolder.binding.conversationImage, R.dimen.avatar_on_conversation_overview);
viewHolder.itemView.setOnClickListener(v -> listener.onConversationClick(v, conversation)); viewHolder.itemView.setOnClickListener(v -> listener.onConversationClick(v, conversation));

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

View file

@ -98,13 +98,25 @@
android:id="@+id/notification_status" android:id="@+id/notification_status"
android:layout_width="?attr/IconSize" android:layout_width="?attr/IconSize"
android:layout_height="?attr/IconSize" android:layout_height="?attr/IconSize"
android:layout_toLeftOf="@+id/unread_count" android:layout_toLeftOf="@+id/pinned_on_top"
android:layout_alignWithParentIfMissing="true" android:layout_alignWithParentIfMissing="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="4dp" android:layout_marginLeft="4dp"
android:alpha="?attr/icon_alpha" android:alpha="?attr/icon_alpha"
android:src="?attr/icon_notifications" /> android:src="?attr/icon_notifications" />
<ImageView
android:visibility="visible"
android:id="@+id/pinned_on_top"
android:layout_width="?attr/IconSize"
android:layout_height="?attr/IconSize"
android:layout_toLeftOf="@+id/unread_count"
android:layout_alignWithParentIfMissing="true"
android:layout_centerVertical="true"
android:layout_marginLeft="4dp"
android:alpha="?attr/icon_alpha"
android:src="?attr/icon_pinned_on_top" />
<eu.siacs.conversations.ui.widget.UnreadCountCustomView <eu.siacs.conversations.ui.widget.UnreadCountCustomView
android:id="@+id/unread_count" android:id="@+id/unread_count"
android:layout_width="?attr/IconSize" android:layout_width="?attr/IconSize"

View file

@ -120,4 +120,10 @@
android:orderInCategory="71" android:orderInCategory="71"
android:title="@string/enable_notifications" android:title="@string/enable_notifications"
app:showAsAction="never" /> app:showAsAction="never" />
<item
android:id="@+id/action_toggle_pinned"
android:orderInCategory="72"
android:title="@string/add_to_favorites"
app:showAsAction="never"/>
</menu> </menu>

View file

@ -1,127 +1,127 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<attr name="TextSizeCaption" format="dimension"/> <attr name="TextSizeCaption" format="dimension" />
<attr name="TextSizeTitle" format="dimension"/> <attr name="TextSizeTitle" format="dimension" />
<attr name="TextSizeSubhead" format="dimension"/> <attr name="TextSizeSubhead" format="dimension" />
<attr name="TextSizeBody1" format="dimension"/> <attr name="TextSizeBody1" format="dimension" />
<attr name="TextSizeBody2" format="dimension"/> <attr name="TextSizeBody2" format="dimension" />
<attr name="TextSizeDisplay2" format="dimension"/> <attr name="TextSizeDisplay2" format="dimension" />
<attr name="TextSizeInput" format="dimension"/> <attr name="TextSizeInput" format="dimension" />
<attr name="TextSeparation" format="dimension"/> <attr name="TextSeparation" format="dimension" />
<attr name="IconSize" format="dimension"/> <attr name="IconSize" format="dimension" />
<attr name="color_background_tertiary" format="reference|color"/> <attr name="color_background_tertiary" format="reference|color" />
<attr name="color_background_secondary" format="reference|color"/> <attr name="color_background_secondary" format="reference|color" />
<attr name="color_background_primary" format="reference|color"/> <attr name="color_background_primary" format="reference|color" />
<attr name="color_background_overlay" format="reference|color"/> <attr name="color_background_overlay" format="reference|color" />
<attr name="edit_text_color" format="reference|color"/> <attr name="edit_text_color" format="reference|color" />
<attr name="color_warning" format="reference|color"/> <attr name="color_warning" format="reference|color" />
<attr name="EmojiColor" format="reference|color"/> <attr name="EmojiColor" format="reference|color" />
<attr name="activity_background_search" format="reference"/> <attr name="activity_background_search" format="reference" />
<attr name="activity_background_no_results" format="reference"/> <attr name="activity_background_no_results" format="reference" />
<attr name="activity_primary_background_no_results" format="reference"/> <attr name="activity_primary_background_no_results" format="reference" />
<attr name="list_item_background" format="reference"/> <attr name="list_item_background" format="reference" />
<attr name="TextColorOnline" format="reference|color"/> <attr name="TextColorOnline" format="reference|color" />
<attr name="TextColorError" format="reference|color"/> <attr name="TextColorError" format="reference|color" />
<attr name="icon_tint" format="reference|color"/> <attr name="icon_tint" format="reference|color" />
<attr name="ic_send_cancel_offline" format="reference"/> <attr name="ic_send_cancel_offline" format="reference" />
<attr name="ic_send_location_offline" format="reference"/> <attr name="ic_send_location_offline" format="reference" />
<attr name="ic_send_photo_offline" format="reference"/> <attr name="ic_send_photo_offline" format="reference" />
<attr name="ic_send_picture_offline" format="reference"/> <attr name="ic_send_picture_offline" format="reference" />
<attr name="ic_send_text_offline" format="reference"/> <attr name="ic_send_text_offline" format="reference" />
<attr name="ic_send_videocam_offline" format="reference"/> <attr name="ic_send_videocam_offline" format="reference" />
<attr name="ic_send_voice_offline" format="reference"/> <attr name="ic_send_voice_offline" format="reference" />
<attr name="ic_attach_camera" format="reference"/> <attr name="ic_attach_camera" format="reference" />
<attr name="ic_attach_videocam" format="reference"/> <attr name="ic_attach_videocam" format="reference" />
<attr name="ic_attach_document" format="reference"/> <attr name="ic_attach_document" format="reference" />
<attr name="ic_attach_location" format="reference"/> <attr name="ic_attach_location" format="reference" />
<attr name="ic_attach_photo" format="reference"/> <attr name="ic_attach_photo" format="reference" />
<attr name="ic_attach_record" format="reference"/> <attr name="ic_attach_record" format="reference" />
<attr name="ic_make_audio_call" format="reference"/> <attr name="ic_make_audio_call" format="reference" />
<attr name="ic_make_video_call" format="reference"/> <attr name="ic_make_video_call" format="reference" />
<attr name="ic_cloud_download" format="reference" />
<attr name="ic_cloud_download" format="reference"/> <attr name="message_bubble_received_monochrome" format="reference" />
<attr name="message_bubble_sent" format="reference" />
<attr name="message_bubble_received_green" format="reference" />
<attr name="message_bubble_received_monochrome" format="reference"/> <attr name="unread_count" format="reference|color" />
<attr name="message_bubble_sent" format="reference"/>
<attr name="message_bubble_received_green" format="reference"/>
<attr name="unread_count" format="reference|color"/> <attr name="conversations_overview_background" format="reference|color" />
<attr name="conversations_overview_background" format="reference|color"/> <attr name="icon_alpha" format="float" />
<attr name="delete_icon_alpha" format="float" />
<attr name="icon_alpha" format="float"/> <attr name="media_preview_document" format="reference" />
<attr name="delete_icon_alpha" format="float"/> <attr name="media_preview_recording" format="reference" />
<attr name="media_preview_audio" format="reference" />
<attr name="media_preview_document" format="reference"/> <attr name="media_preview_location" format="reference" />
<attr name="media_preview_recording" format="reference"/> <attr name="media_preview_contact" format="reference" />
<attr name="media_preview_audio" format="reference"/> <attr name="media_preview_app" format="reference" />
<attr name="media_preview_location" format="reference"/> <attr name="media_preview_calendar" format="reference" />
<attr name="media_preview_contact" format="reference"/>
<attr name="media_preview_app" format="reference"/>
<attr name="media_preview_calendar" format="reference"/>
<attr name="media_preview_archive" format="reference" /> <attr name="media_preview_archive" format="reference" />
<attr name="media_preview_ebook" format="reference"/> <attr name="media_preview_ebook" format="reference" />
<attr name="media_preview_backup" format="reference"/> <attr name="media_preview_backup" format="reference" />
<attr name="media_preview_unknown" format="reference" /> <attr name="media_preview_unknown" format="reference" />
<attr name="icon_add_group" format="reference"/> <attr name="icon_add_group" format="reference" />
<attr name="icon_add_person" format="reference"/> <attr name="icon_add_person" format="reference" />
<attr name="icon_cancel" format="reference"/> <attr name="icon_cancel" format="reference" />
<attr name="icon_copy" format="reference"/> <attr name="icon_copy" format="reference" />
<attr name="icon_discard" format="reference"/> <attr name="icon_discard" format="reference" />
<attr name="icon_download" format="reference"/> <attr name="icon_download" format="reference" />
<attr name="icon_edit" format="reference"/> <attr name="icon_edit" format="reference" />
<attr name="icon_edit_body" format="reference"/> <attr name="icon_edit_body" format="reference" />
<attr name="icon_save" format="reference"/> <attr name="icon_save" format="reference" />
<attr name="icon_done" format="reference"/> <attr name="icon_done" format="reference" />
<attr name="icon_group" format="reference"/> <attr name="icon_group" format="reference" />
<attr name="icon_new" format="reference"/> <attr name="icon_new" format="reference" />
<attr name="icon_new_attachment" format="reference"/> <attr name="icon_new_attachment" format="reference" />
<attr name="icon_not_secure" format="reference"/> <attr name="icon_not_secure" format="reference" />
<attr name="icon_call" format="reference"/> <attr name="icon_call" format="reference" />
<attr name="icon_ongoing_call" format="reference"/> <attr name="icon_ongoing_call" format="reference" />
<attr name="ic_ongoing_call_hint" format="reference"/> <attr name="ic_ongoing_call_hint" format="reference" />
<attr name="icon_quote" format="reference"/> <attr name="icon_quote" format="reference" />
<attr name="icon_refresh" format="reference"/> <attr name="icon_refresh" format="reference" />
<attr name="icon_remove" format="reference"/> <attr name="icon_remove" format="reference" />
<attr name="icon_search" format="reference"/> <attr name="icon_search" format="reference" />
<attr name="icon_secure" format="reference"/> <attr name="icon_secure" format="reference" />
<attr name="icon_settings" format="reference"/> <attr name="icon_settings" format="reference" />
<attr name="icon_share" format="reference"/> <attr name="icon_share" format="reference" />
<attr name="icon_import_export" format="reference"/> <attr name="icon_import_export" format="reference" />
<attr name="icon_scan_qr_code" format="reference"/> <attr name="icon_scan_qr_code" format="reference" />
<attr name="icon_enable_undecided_device" format="reference"/> <attr name="icon_enable_undecided_device" format="reference" />
<attr name="icon_scroll_down" format="reference"/> <attr name="icon_scroll_down" format="reference" />
<attr name="icon_gps_not_fixed" format="reference"/> <attr name="icon_gps_not_fixed" format="reference" />
<attr name="icon_gps_fixed" format="reference"/> <attr name="icon_gps_fixed" format="reference" />
<attr name="icon_directions" format="reference"/> <attr name="icon_directions" format="reference" />
<attr name="icon_copy_bar" format="reference"/> <attr name="icon_copy_bar" format="reference" />
<attr name="icon_notifications" format="reference"/> <attr name="icon_notifications" format="reference" />
<attr name="icon_notifications_off" format="reference"/> <attr name="icon_notifications_off" format="reference" />
<attr name="icon_notifications_paused" format="reference"/> <attr name="icon_notifications_paused" format="reference" />
<attr name="icon_notifications_none" format="reference"/> <attr name="icon_notifications_none" format="reference" />
<attr name="icon_pinned_on_top" format="reference" />
<attr name="dialog_horizontal_padding" format="dimension"/> <attr name="dialog_horizontal_padding" format="dimension" />
<attr name="dialog_vertical_padding" format="dimension"/> <attr name="dialog_vertical_padding" format="dimension" />
<declare-styleable name="UnreadCountCustomView"> <declare-styleable name="UnreadCountCustomView">
<attr name="backgroundColor" format="reference|color"/> <attr name="backgroundColor" format="reference|color" />
</declare-styleable> </declare-styleable>
<attr name="popupOverlayStyle" format="reference"/> <attr name="popupOverlayStyle" format="reference" />
</resources> </resources>

View file

@ -920,6 +920,8 @@
<string name="only_one_call_at_a_time">You can only have one call at a time.</string> <string name="only_one_call_at_a_time">You can only have one call at a time.</string>
<string name="return_to_ongoing_call">Return to ongoing call</string> <string name="return_to_ongoing_call">Return to ongoing call</string>
<string name="could_not_switch_camera">Could not switch camera</string> <string name="could_not_switch_camera">Could not switch camera</string>
<string name="add_to_favorites">Add to favorites</string>
<string name="remove_from_favorites">Remove from favorites</string>
<plurals name="view_users"> <plurals name="view_users">
<item quantity="one">View %1$d Participant</item> <item quantity="one">View %1$d Participant</item>
<item quantity="other">View %1$d Participants</item> <item quantity="other">View %1$d Participants</item>

View file

@ -19,7 +19,9 @@
<item name="activity_background_search">@drawable/search_background_light</item> <item name="activity_background_search">@drawable/search_background_light</item>
<item name="activity_background_no_results">@drawable/no_results_background_light</item> <item name="activity_background_no_results">@drawable/no_results_background_light</item>
<item name="activity_primary_background_no_results">@drawable/no_results_primary_background_light</item> <item name="activity_primary_background_no_results">
@drawable/no_results_primary_background_light
</item>
<item name="list_item_background">@drawable/list_item_background_light</item> <item name="list_item_background">@drawable/list_item_background_light</item>
<item name="EmojiColor">@color/black</item> <item name="EmojiColor">@color/black</item>
@ -39,87 +41,108 @@
<item name="divider">@color/black12</item> <item name="divider">@color/black12</item>
<item type="reference" name="ic_send_cancel_offline">@drawable/ic_send_cancel_offline</item> <item name="ic_send_cancel_offline" type="reference">@drawable/ic_send_cancel_offline</item>
<item type="reference" name="ic_send_location_offline">@drawable/ic_send_location_offline</item> <item name="ic_send_location_offline" type="reference">@drawable/ic_send_location_offline
<item type="reference" name="ic_send_photo_offline">@drawable/ic_send_photo_offline</item> </item>
<item type="reference" name="ic_send_picture_offline">@drawable/ic_send_picture_offline</item> <item name="ic_send_photo_offline" type="reference">@drawable/ic_send_photo_offline</item>
<item type="reference" name="ic_send_text_offline">@drawable/ic_send_text_offline</item> <item name="ic_send_picture_offline" type="reference">@drawable/ic_send_picture_offline
<item type="reference" name="ic_send_videocam_offline">@drawable/ic_send_videocam_offline</item> </item>
<item type="reference" name="ic_send_voice_offline">@drawable/ic_send_voice_offline</item> <item name="ic_send_text_offline" type="reference">@drawable/ic_send_text_offline</item>
<item name="ic_send_videocam_offline" type="reference">@drawable/ic_send_videocam_offline
</item>
<item name="ic_send_voice_offline" type="reference">@drawable/ic_send_voice_offline</item>
<item type="reference" name="ic_attach_camera">@drawable/ic_attach_camera</item> <item name="ic_attach_camera" type="reference">@drawable/ic_attach_camera</item>
<item type="reference" name="ic_attach_videocam">@drawable/ic_attach_videocam</item> <item name="ic_attach_videocam" type="reference">@drawable/ic_attach_videocam</item>
<item type="reference" name="ic_attach_document">@drawable/ic_attach_document</item> <item name="ic_attach_document" type="reference">@drawable/ic_attach_document</item>
<item type="reference" name="ic_attach_location">@drawable/ic_attach_location</item> <item name="ic_attach_location" type="reference">@drawable/ic_attach_location</item>
<item type="reference" name="ic_attach_photo">@drawable/ic_attach_photo</item> <item name="ic_attach_photo" type="reference">@drawable/ic_attach_photo</item>
<item type="reference" name="ic_attach_record">@drawable/ic_attach_record</item> <item name="ic_attach_record" type="reference">@drawable/ic_attach_record</item>
<item type="reference" name="ic_make_audio_call">@drawable/ic_call_black54_24dp</item> <item name="ic_make_audio_call" type="reference">@drawable/ic_call_black54_24dp</item>
<item type="reference" name="ic_make_video_call">@drawable/ic_videocam_black54_24dp</item> <item name="ic_make_video_call" type="reference">@drawable/ic_videocam_black54_24dp</item>
<item type="reference" name="message_bubble_received_monochrome">@drawable/message_bubble_received_white</item> <item name="message_bubble_received_monochrome" type="reference">
<item type="reference" name="message_bubble_sent">@drawable/message_bubble_sent</item> @drawable/message_bubble_received_white
<item type="reference" name="message_bubble_received_green">@drawable/message_bubble_received</item> </item>
<item name="message_bubble_sent" type="reference">@drawable/message_bubble_sent</item>
<item name="message_bubble_received_green" type="reference">
@drawable/message_bubble_received
</item>
<item name="unread_count">@color/green700_desaturated</item> <item name="unread_count">@color/green700_desaturated</item>
<item name="conversations_overview_background">@color/green700</item> <item name="conversations_overview_background">@color/green700</item>
<item type="float" name="icon_alpha">0.54</item> <item name="icon_alpha" type="float">0.54</item>
<item type="float" name="delete_icon_alpha">0.70</item> <item name="delete_icon_alpha" type="float">0.70</item>
<item name="dialog_horizontal_padding">24dp</item> <item name="dialog_horizontal_padding">24dp</item>
<item name="dialog_vertical_padding">16dp</item> <item name="dialog_vertical_padding">16dp</item>
<item type="reference" name="media_preview_document">@drawable/ic_description_black_48dp</item> <item name="media_preview_document" type="reference">@drawable/ic_description_black_48dp
<item type="reference" name="media_preview_recording">@drawable/ic_mic_black_48dp</item> </item>
<item type="reference" name="media_preview_audio">@drawable/ic_headset_black_48dp</item> <item name="media_preview_recording" type="reference">@drawable/ic_mic_black_48dp</item>
<item type="reference" name="media_preview_location">@drawable/ic_room_black_48dp</item> <item name="media_preview_audio" type="reference">@drawable/ic_headset_black_48dp</item>
<item type="reference" name="media_preview_contact">@drawable/ic_person_black_48dp</item> <item name="media_preview_location" type="reference">@drawable/ic_room_black_48dp</item>
<item type="reference" name="media_preview_app">@drawable/ic_android_black_48dp</item> <item name="media_preview_contact" type="reference">@drawable/ic_person_black_48dp</item>
<item type="reference" name="media_preview_calendar">@drawable/ic_event_black_48dp</item> <item name="media_preview_app" type="reference">@drawable/ic_android_black_48dp</item>
<item type="reference" name="media_preview_archive">@drawable/ic_archive_black_48dp</item> <item name="media_preview_calendar" type="reference">@drawable/ic_event_black_48dp</item>
<item type="reference" name="media_preview_ebook">@drawable/ic_book_black_48dp</item> <item name="media_preview_archive" type="reference">@drawable/ic_archive_black_48dp</item>
<item type="reference" name="media_preview_backup">@drawable/ic_backup_black_48dp</item> <item name="media_preview_ebook" type="reference">@drawable/ic_book_black_48dp</item>
<item type="reference" name="media_preview_unknown">@drawable/ic_help_black_48dp</item> <item name="media_preview_backup" type="reference">@drawable/ic_backup_black_48dp</item>
<item name="media_preview_unknown" type="reference">@drawable/ic_help_black_48dp</item>
<item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item> <item name="icon_add_group" type="reference">@drawable/ic_group_add_white_24dp</item>
<item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item> <item name="icon_add_person" type="reference">@drawable/ic_person_add_white_24dp</item>
<item type="reference" name="icon_cancel">@drawable/ic_cancel_black_24dp</item> <item name="icon_cancel" type="reference">@drawable/ic_cancel_black_24dp</item>
<item type="reference" name="icon_copy">@drawable/ic_content_copy_black_24dp</item> <item name="icon_copy" type="reference">@drawable/ic_content_copy_black_24dp</item>
<item type="reference" name="icon_discard">@drawable/ic_delete_white_24dp</item> <item name="icon_discard" type="reference">@drawable/ic_delete_white_24dp</item>
<item type="reference" name="icon_download">@drawable/ic_file_download_white_24dp</item> <item name="icon_download" type="reference">@drawable/ic_file_download_white_24dp</item>
<item type="reference" name="icon_edit">@drawable/ic_edit_white_24dp</item> <item name="icon_edit" type="reference">@drawable/ic_edit_white_24dp</item>
<item type="reference" name="icon_edit_body">@drawable/ic_edit_black_24dp</item> <item name="icon_edit_body" type="reference">@drawable/ic_edit_black_24dp</item>
<item type="reference" name="icon_save">@drawable/ic_save_black_24dp</item> <item name="icon_save" type="reference">@drawable/ic_save_black_24dp</item>
<item type="reference" name="icon_group">@drawable/ic_group_white_24dp</item> <item name="icon_group" type="reference">@drawable/ic_group_white_24dp</item>
<item type="reference" name="icon_new">@drawable/ic_add_white_24dp</item> <item name="icon_new" type="reference">@drawable/ic_add_white_24dp</item>
<item type="reference" name="icon_quote">@drawable/ic_reply_white_24dp</item> <item name="icon_quote" type="reference">@drawable/ic_reply_white_24dp</item>
<item type="reference" name="icon_refresh">@drawable/ic_refresh_black_24dp</item> <item name="icon_refresh" type="reference">@drawable/ic_refresh_black_24dp</item>
<item type="reference" name="icon_new_attachment">@drawable/ic_attach_file_white_24dp</item> <item name="icon_new_attachment" type="reference">@drawable/ic_attach_file_white_24dp</item>
<item type="reference" name="icon_not_secure">@drawable/ic_lock_open_white_24dp</item> <item name="icon_not_secure" type="reference">@drawable/ic_lock_open_white_24dp</item>
<item type="reference" name="icon_call">@drawable/ic_call_white_24dp</item> <item name="icon_call" type="reference">@drawable/ic_call_white_24dp</item>
<item type="reference" name="icon_ongoing_call">@drawable/ic_phone_in_talk_white_24dp</item> <item name="icon_ongoing_call" type="reference">@drawable/ic_phone_in_talk_white_24dp</item>
<item type="reference" name="ic_ongoing_call_hint">@drawable/ic_phone_in_talk_black_18dp</item> <item name="ic_ongoing_call_hint" type="reference">@drawable/ic_phone_in_talk_black_18dp
<item type="reference" name="icon_remove">@drawable/ic_delete_black_24dp</item> </item>
<item type="reference" name="icon_search">@drawable/ic_search_white_24dp</item> <item name="icon_remove" type="reference">@drawable/ic_delete_black_24dp</item>
<item type="reference" name="icon_secure">@drawable/ic_lock_open_white_24dp</item> <item name="icon_search" type="reference">@drawable/ic_search_white_24dp</item>
<item type="reference" name="icon_settings">@drawable/ic_settings_black_24dp</item> <item name="icon_secure" type="reference">@drawable/ic_lock_open_white_24dp</item>
<item type="reference" name="icon_share">@drawable/ic_share_white_24dp</item> <item name="icon_settings" type="reference">@drawable/ic_settings_black_24dp</item>
<item type="reference" name="ic_cloud_download">@drawable/ic_cloud_download_white_24dp</item> <item name="icon_share" type="reference">@drawable/ic_share_white_24dp</item>
<item type="reference" name="icon_scan_qr_code">@drawable/ic_qr_code_scan_white_24dp</item> <item name="ic_cloud_download" type="reference">@drawable/ic_cloud_download_white_24dp
<item type="reference" name="icon_scroll_down">@drawable/ic_scroll_to_end_black</item> </item>
<item name="icon_scan_qr_code" type="reference">@drawable/ic_qr_code_scan_white_24dp</item>
<item name="icon_scroll_down" type="reference">@drawable/ic_scroll_to_end_black</item>
<item type="reference" name="icon_gps_not_fixed">@drawable/ic_gps_not_fixed_black_24dp</item> <item name="icon_gps_not_fixed" type="reference">@drawable/ic_gps_not_fixed_black_24dp
<item type="reference" name="icon_gps_fixed">@drawable/ic_gps_fixed_black_24dp</item> </item>
<item type="reference" name="icon_directions">@drawable/ic_directions_black_24dp</item> <item name="icon_gps_fixed" type="reference">@drawable/ic_gps_fixed_black_24dp</item>
<item type="reference" name="icon_copy_bar">@drawable/ic_content_copy_white_24dp</item> <item name="icon_directions" type="reference">@drawable/ic_directions_black_24dp</item>
<item name="icon_copy_bar" type="reference">@drawable/ic_content_copy_white_24dp</item>
<item type="reference" name="icon_notifications">@drawable/ic_notifications_black_24dp</item> <item name="icon_notifications" type="reference">@drawable/ic_notifications_black_24dp
<item type="reference" name="icon_notifications_off">@drawable/ic_notifications_off_black_24dp</item> </item>
<item type="reference" name="icon_notifications_paused">@drawable/ic_notifications_paused_black_24dp</item> <item name="icon_notifications_off" type="reference">
<item type="reference" name="icon_notifications_none">@drawable/ic_notifications_none_black_24dp</item> @drawable/ic_notifications_off_black_24dp
<item type="reference" name="icon_enable_undecided_device">@drawable/ic_new_releases_black_24dp</item> </item>
<item name="icon_notifications_paused" type="reference">
@drawable/ic_notifications_paused_black_24dp
</item>
<item name="icon_notifications_none" type="reference">
@drawable/ic_notifications_none_black_24dp
</item>
<item name="icon_pinned_on_top" type="reference">@drawable/ic_star_black_24dp</item>
<item name="icon_enable_undecided_device" type="reference">
@drawable/ic_new_releases_black_24dp
</item>
</style> </style>
<style name="ConversationsTheme.Dark" parent="Theme.AppCompat.NoActionBar"> <style name="ConversationsTheme.Dark" parent="Theme.AppCompat.NoActionBar">
@ -135,7 +158,9 @@
<item name="color_background_overlay">@color/black26</item> <item name="color_background_overlay">@color/black26</item>
<item name="activity_background_search">@drawable/search_background_dark</item> <item name="activity_background_search">@drawable/search_background_dark</item>
<item name="activity_background_no_results">@drawable/no_results_background_dark</item> <item name="activity_background_no_results">@drawable/no_results_background_dark</item>
<item name="activity_primary_background_no_results">@drawable/no_results_primary_background_dark</item> <item name="activity_primary_background_no_results">
@drawable/no_results_primary_background_dark
</item>
<item name="list_item_background">@drawable/list_item_background_dark</item> <item name="list_item_background">@drawable/list_item_background_dark</item>
<item name="color_warning">@color/red_a100</item> <item name="color_warning">@color/red_a100</item>
@ -161,87 +186,116 @@
<item name="divider">@color/white12</item> <item name="divider">@color/white12</item>
<item type="reference" name="ic_send_cancel_offline">@drawable/ic_send_cancel_offline_white</item> <item name="ic_send_cancel_offline" type="reference">
<item type="reference" name="ic_send_location_offline">@drawable/ic_send_location_offline_white</item> @drawable/ic_send_cancel_offline_white
<item type="reference" name="ic_send_photo_offline">@drawable/ic_send_photo_offline_white</item> </item>
<item type="reference" name="ic_send_picture_offline">@drawable/ic_send_picture_offline_white</item> <item name="ic_send_location_offline" type="reference">
<item type="reference" name="ic_send_text_offline">@drawable/ic_send_text_offline_white</item> @drawable/ic_send_location_offline_white
<item type="reference" name="ic_send_videocam_offline">@drawable/ic_send_videocam_offline_white</item> </item>
<item type="reference" name="ic_send_voice_offline">@drawable/ic_send_voice_offline_white</item> <item name="ic_send_photo_offline" type="reference">@drawable/ic_send_photo_offline_white
</item>
<item name="ic_send_picture_offline" type="reference">
@drawable/ic_send_picture_offline_white
</item>
<item name="ic_send_text_offline" type="reference">@drawable/ic_send_text_offline_white
</item>
<item name="ic_send_videocam_offline" type="reference">
@drawable/ic_send_videocam_offline_white
</item>
<item name="ic_send_voice_offline" type="reference">@drawable/ic_send_voice_offline_white
</item>
<item type="reference" name="ic_make_audio_call">@drawable/ic_call_white70_24dp</item> <item name="ic_make_audio_call" type="reference">@drawable/ic_call_white70_24dp</item>
<item type="reference" name="ic_make_video_call">@drawable/ic_videocam_white70_24dp</item> <item name="ic_make_video_call" type="reference">@drawable/ic_videocam_white70_24dp</item>
<item type="reference" name="ic_attach_camera">@drawable/ic_attach_camera_white</item> <item name="ic_attach_camera" type="reference">@drawable/ic_attach_camera_white</item>
<item type="reference" name="ic_attach_videocam">@drawable/ic_attach_videocam_white</item> <item name="ic_attach_videocam" type="reference">@drawable/ic_attach_videocam_white</item>
<item type="reference" name="ic_attach_document">@drawable/ic_attach_document_white</item> <item name="ic_attach_document" type="reference">@drawable/ic_attach_document_white</item>
<item type="reference" name="ic_attach_location">@drawable/ic_attach_location_white</item> <item name="ic_attach_location" type="reference">@drawable/ic_attach_location_white</item>
<item type="reference" name="ic_attach_photo">@drawable/ic_attach_photo_white</item> <item name="ic_attach_photo" type="reference">@drawable/ic_attach_photo_white</item>
<item type="reference" name="ic_attach_record">@drawable/ic_attach_record_white</item> <item name="ic_attach_record" type="reference">@drawable/ic_attach_record_white</item>
<item type="reference" name="message_bubble_received_monochrome">@drawable/message_bubble_received_grey</item> <item name="message_bubble_received_monochrome" type="reference">
<item type="reference" name="message_bubble_sent">@drawable/message_bubble_sent_grey</item> @drawable/message_bubble_received_grey
<item type="reference" name="message_bubble_received_green">@drawable/message_bubble_received_dark</item> </item>
<item name="message_bubble_sent" type="reference">@drawable/message_bubble_sent_grey</item>
<item name="message_bubble_received_green" type="reference">
@drawable/message_bubble_received_dark
</item>
<item name="unread_count">@color/green900_desaturated</item> <item name="unread_count">@color/green900_desaturated</item>
<item name="conversations_overview_background">@color/green900</item> <item name="conversations_overview_background">@color/green900</item>
<item type="float" name="icon_alpha">0.7</item> <item name="icon_alpha" type="float">0.7</item>
<item type="float" name="delete_icon_alpha">0.7</item> <item name="delete_icon_alpha" type="float">0.7</item>
<item name="dialog_horizontal_padding">24dp</item> <item name="dialog_horizontal_padding">24dp</item>
<item name="dialog_vertical_padding">16dp</item> <item name="dialog_vertical_padding">16dp</item>
<item type="reference" name="media_preview_document">@drawable/ic_description_white_48dp</item> <item name="media_preview_document" type="reference">@drawable/ic_description_white_48dp
<item type="reference" name="media_preview_recording">@drawable/ic_mic_white_48dp</item> </item>
<item type="reference" name="media_preview_audio">@drawable/ic_headset_white_48dp</item> <item name="media_preview_recording" type="reference">@drawable/ic_mic_white_48dp</item>
<item type="reference" name="media_preview_location">@drawable/ic_room_white_48dp</item> <item name="media_preview_audio" type="reference">@drawable/ic_headset_white_48dp</item>
<item type="reference" name="media_preview_contact">@drawable/ic_person_white_48dp</item> <item name="media_preview_location" type="reference">@drawable/ic_room_white_48dp</item>
<item type="reference" name="media_preview_app">@drawable/ic_android_white_48dp</item> <item name="media_preview_contact" type="reference">@drawable/ic_person_white_48dp</item>
<item type="reference" name="media_preview_calendar">@drawable/ic_event_white_48dp</item> <item name="media_preview_app" type="reference">@drawable/ic_android_white_48dp</item>
<item type="reference" name="media_preview_archive">@drawable/ic_archive_white_48dp</item> <item name="media_preview_calendar" type="reference">@drawable/ic_event_white_48dp</item>
<item type="reference" name="media_preview_ebook">@drawable/ic_book_white_48dp</item> <item name="media_preview_archive" type="reference">@drawable/ic_archive_white_48dp</item>
<item type="reference" name="media_preview_backup">@drawable/ic_backup_white_48dp</item> <item name="media_preview_ebook" type="reference">@drawable/ic_book_white_48dp</item>
<item type="reference" name="media_preview_unknown">@drawable/ic_help_white_48dp</item> <item name="media_preview_backup" type="reference">@drawable/ic_backup_white_48dp</item>
<item name="media_preview_unknown" type="reference">@drawable/ic_help_white_48dp</item>
<item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item> <item name="icon_add_group" type="reference">@drawable/ic_group_add_white_24dp</item>
<item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item> <item name="icon_add_person" type="reference">@drawable/ic_person_add_white_24dp</item>
<item type="reference" name="icon_cancel">@drawable/ic_cancel_white_24dp</item> <item name="icon_cancel" type="reference">@drawable/ic_cancel_white_24dp</item>
<item type="reference" name="icon_copy">@drawable/ic_content_copy_white_24dp</item> <item name="icon_copy" type="reference">@drawable/ic_content_copy_white_24dp</item>
<item type="reference" name="icon_discard">@drawable/ic_delete_white_24dp</item> <item name="icon_discard" type="reference">@drawable/ic_delete_white_24dp</item>
<item type="reference" name="icon_download">@drawable/ic_file_download_white_24dp</item> <item name="icon_download" type="reference">@drawable/ic_file_download_white_24dp</item>
<item type="reference" name="icon_edit">@drawable/ic_edit_white_24dp</item> <item name="icon_edit" type="reference">@drawable/ic_edit_white_24dp</item>
<item type="reference" name="icon_edit_body">@drawable/ic_edit_white_24dp</item> <item name="icon_edit_body" type="reference">@drawable/ic_edit_white_24dp</item>
<item type="reference" name="icon_save">@drawable/ic_save_white_24dp</item> <item name="icon_save" type="reference">@drawable/ic_save_white_24dp</item>
<item type="reference" name="icon_group">@drawable/ic_group_white_24dp</item> <item name="icon_group" type="reference">@drawable/ic_group_white_24dp</item>
<item type="reference" name="icon_new">@drawable/ic_add_white_24dp</item> <item name="icon_new" type="reference">@drawable/ic_add_white_24dp</item>
<item type="reference" name="icon_quote">@drawable/ic_reply_white_24dp</item> <item name="icon_quote" type="reference">@drawable/ic_reply_white_24dp</item>
<item type="reference" name="icon_refresh">@drawable/ic_refresh_white_24dp</item> <item name="icon_refresh" type="reference">@drawable/ic_refresh_white_24dp</item>
<item type="reference" name="icon_new_attachment">@drawable/ic_attach_file_white_24dp</item> <item name="icon_new_attachment" type="reference">@drawable/ic_attach_file_white_24dp</item>
<item type="reference" name="icon_not_secure">@drawable/ic_lock_open_white_24dp</item> <item name="icon_not_secure" type="reference">@drawable/ic_lock_open_white_24dp</item>
<item type="reference" name="icon_call">@drawable/ic_call_white_24dp</item> <item name="icon_call" type="reference">@drawable/ic_call_white_24dp</item>
<item type="reference" name="icon_ongoing_call">@drawable/ic_phone_in_talk_white_24dp</item> <item name="icon_ongoing_call" type="reference">@drawable/ic_phone_in_talk_white_24dp</item>
<item type="reference" name="ic_ongoing_call_hint">@drawable/ic_phone_in_talk_white_18dp</item> <item name="ic_ongoing_call_hint" type="reference">@drawable/ic_phone_in_talk_white_18dp
<item type="reference" name="icon_remove">@drawable/ic_delete_white_24dp</item> </item>
<item type="reference" name="icon_search">@drawable/ic_search_white_24dp</item> <item name="icon_remove" type="reference">@drawable/ic_delete_white_24dp</item>
<item type="reference" name="icon_secure">@drawable/ic_lock_open_white_24dp</item> <item name="icon_search" type="reference">@drawable/ic_search_white_24dp</item>
<item type="reference" name="icon_settings">@drawable/ic_settings_white_24dp</item> <item name="icon_secure" type="reference">@drawable/ic_lock_open_white_24dp</item>
<item type="reference" name="icon_share">@drawable/ic_share_white_24dp</item> <item name="icon_settings" type="reference">@drawable/ic_settings_white_24dp</item>
<item type="reference" name="ic_cloud_download">@drawable/ic_cloud_download_white_24dp</item> <item name="icon_share" type="reference">@drawable/ic_share_white_24dp</item>
<item type="reference" name="icon_scan_qr_code">@drawable/ic_qr_code_scan_white_24dp</item> <item name="ic_cloud_download" type="reference">@drawable/ic_cloud_download_white_24dp
<item type="reference" name="icon_scroll_down">@drawable/ic_scroll_to_end_white</item> </item>
<item name="icon_scan_qr_code" type="reference">@drawable/ic_qr_code_scan_white_24dp</item>
<item name="icon_scroll_down" type="reference">@drawable/ic_scroll_to_end_white</item>
<item type="reference" name="icon_gps_not_fixed">@drawable/ic_gps_not_fixed_white_24dp</item> <item name="icon_gps_not_fixed" type="reference">@drawable/ic_gps_not_fixed_white_24dp
<item type="reference" name="icon_gps_fixed">@drawable/ic_gps_fixed_white_24dp</item> </item>
<item type="reference" name="icon_directions">@drawable/ic_directions_white_24dp</item> <item name="icon_gps_fixed" type="reference">@drawable/ic_gps_fixed_white_24dp</item>
<item type="reference" name="icon_copy_bar">@drawable/ic_content_copy_white_24dp</item> <item name="icon_directions" type="reference">@drawable/ic_directions_white_24dp</item>
<item name="icon_copy_bar" type="reference">@drawable/ic_content_copy_white_24dp</item>
<item type="reference" name="icon_notifications">@drawable/ic_notifications_white_24dp</item> <item name="icon_notifications" type="reference">@drawable/ic_notifications_white_24dp
<item type="reference" name="icon_notifications_off">@drawable/ic_notifications_off_white_24dp</item> </item>
<item type="reference" name="icon_notifications_paused">@drawable/ic_notifications_paused_white_24dp</item> <item name="icon_notifications_off" type="reference">
<item type="reference" name="icon_notifications_none">@drawable/ic_notifications_none_white_24dp</item> @drawable/ic_notifications_off_white_24dp
<item type="reference" name="icon_enable_undecided_device">@drawable/ic_new_releases_white_24dp</item> </item>
<item name="icon_notifications_paused" type="reference">
@drawable/ic_notifications_paused_white_24dp
</item>
<item name="icon_notifications_none" type="reference">
@drawable/ic_notifications_none_white_24dp
</item>
<item name="icon_pinned_on_top" type="reference">@drawable/ic_star_white_24dp</item>
<item name="icon_enable_undecided_device" type="reference">
@drawable/ic_new_releases_white_24dp
</item>
</style> </style>
<style name="ConversationsTheme.Medium" parent="ConversationsTheme"> <style name="ConversationsTheme.Medium" parent="ConversationsTheme">