Forward message UI improvements

This commit is contained in:
Sylvain Berfini 2021-05-28 10:36:26 +02:00
parent 6c223aae31
commit 7f30e9d874
60 changed files with 314 additions and 200 deletions

View file

@ -42,6 +42,8 @@ class ChatRoomsListAdapter(
MutableLiveData<Event<ChatRoom>>()
}
private var isForwardPending = false
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val binding: ChatRoomListCellBinding = DataBindingUtil.inflate(
LayoutInflater.from(parent.context),
@ -54,6 +56,11 @@ class ChatRoomsListAdapter(
(holder as ViewHolder).bind(getItem(position))
}
fun forwardPending(pending: Boolean) {
isForwardPending = pending
notifyDataSetChanged()
}
inner class ViewHolder(
private val binding: ChatRoomListCellBinding
) : RecyclerView.ViewHolder(binding.root) {
@ -70,6 +77,8 @@ class ChatRoomsListAdapter(
position = adapterPosition
})
forwardPending = isForwardPending
setClickListener {
if (selectionViewModel.isEditionEnabled.value == true) {
selectionViewModel.onToggleSelect(adapterPosition)

View file

@ -462,7 +462,7 @@ class DetailChatRoomFragment : MasterFragment<ChatRoomDetailFragmentBinding, Cha
private fun showForwardConfirmationDialog(chatMessage: ChatMessage) {
val viewModel = DialogViewModel(getString(R.string.chat_message_forward_confirmation_dialog))
viewModel.iconResource = R.drawable.forward_message_dialog_default
viewModel.iconResource = R.drawable.forward_message_default
viewModel.showIcon = true
val dialog: Dialog = DialogUtils.getDialog(requireContext(), viewModel)

View file

@ -176,6 +176,7 @@ class MasterChatRoomsFragment : MasterFragment<ChatRoomMasterFragmentBinding, Ch
Log.i("[Chat] Cancelling message forward")
}
listViewModel.forwardPending.value = false
adapter.forwardPending(false)
}
binding.setCancelSharingClickListener {
@ -221,8 +222,8 @@ class MasterChatRoomsFragment : MasterFragment<ChatRoomMasterFragmentBinding, Ch
sharedViewModel.textToShare.observe(viewLifecycleOwner, {
if (it.isNotEmpty()) {
Log.i("[Chat] Found text to share")
val activity = requireActivity() as MainActivity
activity.showSnackBar(R.string.chat_room_toast_choose_for_sharing)
// val activity = requireActivity() as MainActivity
// activity.showSnackBar(R.string.chat_room_toast_choose_for_sharing)
listViewModel.sharingPending.value = true
} else {
if (sharedViewModel.filesToShare.value.isNullOrEmpty()) {
@ -233,8 +234,8 @@ class MasterChatRoomsFragment : MasterFragment<ChatRoomMasterFragmentBinding, Ch
sharedViewModel.filesToShare.observe(viewLifecycleOwner, {
if (it.isNotEmpty()) {
Log.i("[Chat] Found ${it.size} files to share")
val activity = requireActivity() as MainActivity
activity.showSnackBar(R.string.chat_room_toast_choose_for_sharing)
// val activity = requireActivity() as MainActivity
// activity.showSnackBar(R.string.chat_room_toast_choose_for_sharing)
listViewModel.sharingPending.value = true
} else {
if (sharedViewModel.textToShare.value.isNullOrEmpty()) {
@ -245,12 +246,13 @@ class MasterChatRoomsFragment : MasterFragment<ChatRoomMasterFragmentBinding, Ch
sharedViewModel.messageToForwardEvent.observe(viewLifecycleOwner, {
if (!it.consumed()) {
Log.i("[Chat] Found chat message to transfer")
// val activity = requireActivity() as MainActivity
// activity.showSnackBar(R.string.chat_room_toast_choose_for_sharing)
listViewModel.forwardPending.value = true
val activity = requireActivity() as MainActivity
activity.showSnackBar(R.string.chat_room_toast_choose_for_sharing)
adapter.forwardPending(true)
} else {
listViewModel.forwardPending.value = false
adapter.forwardPending(false)
}
})

View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/cancel_shape" />
<item
android:drawable="@drawable/cancel_shape" />
</selector>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<bitmap android:src="@drawable/cancel_edit_default"
android:tint="?attr/drawableTintOverColor"/>
</item>
<item android:state_enabled="false">
<bitmap android:src="@drawable/cancel_edit_default"
android:tint="?attr/drawableTintDisabledColor"/>
</item>
<item>
<bitmap android:src="@drawable/cancel_edit_default"
android:tint="?attr/drawableTintColor"/>
</item>
</selector>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="120dp"
android:height="120dp"
android:bottom="@dimen/field_shape_margin"
android:top="@dimen/field_shape_margin"
android:end="@dimen/field_shape_margin"
android:start="@dimen/field_shape_margin">
<rotate
android:fromDegrees="45"
android:pivotX="50%"
android:pivotY="50%">
<shape android:shape="line">
<stroke android:width="7dp" android:color="?attr/drawableTintColor" />
</shape>
</rotate>
</item>
<item
android:width="120dp"
android:height="120dp"
android:bottom="@dimen/field_shape_margin"
android:top="@dimen/field_shape_margin"
android:end="@dimen/field_shape_margin"
android:start="@dimen/field_shape_margin">
<rotate
android:fromDegrees="135"
android:pivotX="50%"
android:pivotY="50%">
<shape android:shape="line">
<stroke android:width="7dp" android:color="?attr/drawableTintColor" />
</shape>
</rotate>
</item>
</layer-list>

View file

@ -26,7 +26,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -21,7 +21,7 @@
<RelativeLayout
android:id="@+id/address_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignParentTop="true"
android:background="?attr/lightToolbarBackgroundColor">
@ -63,7 +63,7 @@
android:id="@+id/controls"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="60dp">
android:layout_height="@dimen/main_activity_top_bar_size">
<ImageView
android:onClick="@{newContactClickListener}"

View file

@ -26,7 +26,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -62,7 +62,7 @@
<RelativeLayout
android:id="@+id/address_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignParentTop="true"
android:background="?attr/lightToolbarBackgroundColor">
@ -104,7 +104,7 @@
android:id="@+id/controls"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="60dp">
android:layout_height="@dimen/main_activity_top_bar_size">
<ImageView
android:onClick="@{newContactClickListener}"

View file

@ -26,7 +26,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -25,7 +25,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -42,31 +42,36 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="wrap_content"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/main_activity_top_bar_size"
android:orientation="horizontal">
<ImageView
android:onClick="@{cancelForwardClickListener}"
android:visibility="@{viewModel.forwardPending ? View.VISIBLE : View.GONE}"
android:contentDescription="@string/content_description_cancel_contact_edit"
android:contentDescription="@string/content_description_cancel_forward"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="?attr/button_background_drawable"
android:padding="15dp"
android:src="@drawable/cancel_edit" />
android:padding="10dp"
android:src="@drawable/cancel" />
<ImageView
android:onClick="@{cancelSharingClickListener}"
android:visibility="@{viewModel.sharingPending ? View.VISIBLE : View.GONE}"
android:contentDescription="@string/content_description_cancel_contact_edit"
android:contentDescription="@string/content_description_cancel_sharing"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="?attr/button_background_drawable"
android:padding="15dp"
android:src="@drawable/cancel_edit" />
android:padding="10dp"
android:src="@drawable/cancel" />
<ImageView
android:onClick="@{newOneToOneChatRoomClickListener}"
@ -108,11 +113,31 @@
</LinearLayout>
<TextView
android:visibility="@{viewModel.sharingPending ? View.VISIBLE : View.GONE, default=gone}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/backgroundContastColor"
android:textColor="?attr/secondaryTextColor"
android:padding="10dp"
android:text="@string/chat_room_choose_conversation_for_file_sharing" />
<TextView
android:visibility="@{viewModel.forwardPending ? View.VISIBLE : View.GONE, default=gone}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/backgroundContastColor"
android:textColor="?attr/secondaryTextColor"
android:padding="10dp"
android:text="@string/chat_room_choose_conversation_for_message_forward" />
</LinearLayout>
<androidx.fragment.app.FragmentContainerView
android:id="@+id/list_edit_top_bar_fragment"
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignTop="@id/top_bar"
tools:layout="@layout/list_edit_top_bar_fragment" />

View file

@ -39,7 +39,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">
@ -124,7 +124,7 @@
android:id="@+id/list_edit_top_bar_fragment"
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignTop="@id/top_bar"
tools:layout="@layout/list_edit_top_bar_fragment" />

View file

@ -62,7 +62,7 @@
<RelativeLayout
android:id="@+id/address_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignParentTop="true"
android:background="?attr/lightToolbarBackgroundColor">
@ -104,7 +104,7 @@
android:id="@+id/controls"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="60dp">
android:layout_height="@dimen/main_activity_top_bar_size">
<ImageView
android:onClick="@{newContactClickListener}"

View file

@ -36,7 +36,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">
@ -110,7 +110,7 @@
android:id="@+id/list_edit_top_bar_fragment"
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignTop="@id/top_bar"
tools:layout="@layout/list_edit_top_bar_fragment" />

View file

@ -25,7 +25,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -26,7 +26,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -11,7 +11,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -27,7 +27,7 @@
<RelativeLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_below="@id/status_fragment"
android:background="?attr/lightToolbarBackgroundColor">

View file

@ -30,7 +30,7 @@
<RelativeLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_below="@id/status_fragment"
android:background="?attr/lightToolbarBackgroundColor">

View file

@ -28,7 +28,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -29,7 +29,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -44,7 +44,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">
@ -135,7 +135,7 @@
android:id="@+id/list_edit_top_bar_fragment"
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignTop="@id/top_bar"
tools:layout="@layout/list_edit_top_bar_fragment" />

View file

@ -19,7 +19,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -22,7 +22,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -34,7 +34,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -20,7 +20,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -14,6 +14,9 @@
<variable
name="position"
type="Integer"/>
<variable
name="forwardPending"
type="Boolean"/>
<variable
name="viewModel"
type="org.linphone.activities.main.chat.viewmodels.ChatRoomViewModel" />
@ -63,7 +66,8 @@
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:paddingLeft="10dp">
@ -83,6 +87,8 @@
android:layout_height="wrap_content"
android:layout_above="@+id/lastMessage"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:layout_marginLeft="5dp"
android:gravity="center"
android:orientation="horizontal">
@ -133,6 +139,15 @@
</RelativeLayout>
<ImageView
android:visibility="@{forwardPending ? View.VISIBLE : View.GONE, default=gone}"
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="10dp"
android:layout_marginLeft="10dp"
android:src="@drawable/forward_message_default"
android:background="@drawable/background_round_secondary_color" />
</LinearLayout>
</layout>

View file

@ -31,31 +31,36 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="wrap_content"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/main_activity_top_bar_size"
android:orientation="horizontal">
<ImageView
android:onClick="@{cancelForwardClickListener}"
android:visibility="@{viewModel.forwardPending ? View.VISIBLE : View.GONE}"
android:contentDescription="@string/content_description_cancel_contact_edit"
android:contentDescription="@string/content_description_cancel_forward"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="?attr/button_background_drawable"
android:padding="15dp"
android:src="@drawable/cancel_edit" />
android:padding="10dp"
android:src="@drawable/cancel" />
<ImageView
android:onClick="@{cancelSharingClickListener}"
android:visibility="@{viewModel.sharingPending ? View.VISIBLE : View.GONE}"
android:contentDescription="@string/content_description_cancel_contact_edit"
android:contentDescription="@string/content_description_cancel_sharing"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="?attr/button_background_drawable"
android:padding="15dp"
android:src="@drawable/cancel_edit" />
android:padding="10dp"
android:src="@drawable/cancel" />
<ImageView
android:onClick="@{newOneToOneChatRoomClickListener}"
@ -97,11 +102,31 @@
</LinearLayout>
<TextView
android:visibility="@{viewModel.sharingPending ? View.VISIBLE : View.GONE, default=gone}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/backgroundContastColor"
android:textColor="?attr/secondaryTextColor"
android:padding="10dp"
android:text="@string/chat_room_choose_conversation_for_file_sharing" />
<TextView
android:visibility="@{viewModel.forwardPending ? View.VISIBLE : View.GONE, default=gone}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/backgroundContastColor"
android:textColor="?attr/secondaryTextColor"
android:padding="10dp"
android:text="@string/chat_room_choose_conversation_for_message_forward" />
</LinearLayout>
<androidx.fragment.app.FragmentContainerView
android:id="@+id/list_edit_top_bar_fragment"
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignTop="@id/top_bar"
tools:layout="@layout/list_edit_top_bar_fragment" />

View file

@ -26,7 +26,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -26,20 +26,20 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">
<ImageView
android:id="@+id/cancel"
android:contentDescription="@string/content_description_cancel_contact_edit"
android:contentDescription="@string/content_description_discard_changes"
android:onClick="@{backClickListener}"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="?attr/button_background_drawable"
android:padding="15dp"
android:src="@drawable/cancel_edit" />
android:padding="10dp"
android:src="@drawable/cancel" />
<View
android:layout_width="0dp"

View file

@ -28,7 +28,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">
@ -113,7 +113,7 @@
android:id="@+id/list_edit_top_bar_fragment"
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignTop="@id/top_bar"
tools:layout="@layout/list_edit_top_bar_fragment" />

View file

@ -22,7 +22,7 @@
<RelativeLayout
android:id="@+id/address_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignParentTop="true"
android:background="?attr/lightToolbarBackgroundColor">

View file

@ -22,7 +22,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -14,7 +14,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -26,7 +26,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -25,7 +25,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">
@ -100,7 +100,7 @@
android:id="@+id/list_edit_top_bar_fragment"
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignTop="@id/top_bar"
tools:layout="@layout/list_edit_top_bar_fragment" />

View file

@ -22,7 +22,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:background="?attr/lightToolbarBackgroundColor"
android:visibility="@{viewModel.isEditionEnabled ? View.VISIBLE : View.GONE}"
android:orientation="horizontal">
@ -34,8 +34,8 @@
android:layout_height="match_parent"
android:layout_weight="0.2"
android:background="?attr/button_background_drawable"
android:padding="15dp"
android:src="@drawable/cancel_edit" />
android:padding="10dp"
android:src="@drawable/cancel" />
<View
android:layout_width="0dp"

View file

@ -26,7 +26,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">
@ -70,7 +70,7 @@
android:id="@+id/list_edit_top_bar_fragment"
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_alignTop="@id/top_bar"
tools:layout="@layout/list_edit_top_bar_fragment" />

View file

@ -21,7 +21,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -20,7 +20,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -20,7 +20,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -20,7 +20,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -20,7 +20,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -19,7 +19,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -20,7 +20,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -20,7 +20,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -20,7 +20,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -20,7 +20,7 @@
<LinearLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="@dimen/main_activity_top_bar_size"
android:layout_gravity="center_horizontal"
android:background="?attr/lightToolbarBackgroundColor"
android:orientation="horizontal">

View file

@ -28,7 +28,7 @@
<item
android:id="@+id/chat_message_menu_add_to_contacts"
android:icon="@drawable/contact_add_default"
android:icon="@drawable/menu_add_contact"
android:title="@string/chat_message_context_menu_add_to_contacts" />
</menu>

View file

@ -166,7 +166,7 @@
<string name="content_description_start_encrypted_chat">Entra en una conversación encriptada</string>
<string name="content_description_edit_contact">Editar contacto</string>
<string name="content_description_delete_contact">Borrar contacto</string>
<string name="content_description_cancel_contact_edit">Descartar los cambios</string>
<string name="content_description_discard_changes">Descartar los cambios</string>
<string name="content_description_confirm_contact_edit">Guardar los cambios</string>
<string name="content_description_change_contact_picture">Cambiar foto de contacto</string>
<string name="content_description_change_own_picture">Cambiar mi propia foto</string>

View file

@ -448,7 +448,7 @@
<string name="content_description_start_encrypted_chat">Rejoindre la conversation chiffrée</string>
<string name="content_description_edit_contact">Editer le contact</string>
<string name="content_description_delete_contact">Supprimer le contact</string>
<string name="content_description_cancel_contact_edit">Annuler les modifications</string>
<string name="content_description_discard_changes">Annuler les modifications</string>
<string name="content_description_confirm_contact_edit">Sauvegarder les modifications</string>
<string name="content_description_change_contact_picture">Modifier la photo du contact</string>
<string name="content_description_change_own_picture">Modifier ma photo</string>
@ -596,4 +596,8 @@
<string name="call_error_temporarily_unavailable">Temporairement indisponible</string>
<string name="call_error_generic">Erreur : %s</string>
<string name="call_settings_pause_calls_lost_audio_focus_title">Mettre en pause les appels quand le focus audio est perdu</string>
<string name="content_description_cancel_forward">Annuler le transfert de message</string>
<string name="content_description_cancel_sharing">Annuler le partage</string>
<string name="chat_room_choose_conversation_for_message_forward">Sélectionnez une conversation ou créez-en une nouvelle</string>
<string name="chat_room_choose_conversation_for_file_sharing">Sélectionnez une conversation ou créez-en une nouvelle</string>
</resources>

View file

@ -365,7 +365,7 @@
<string name="content_description_edit_contact">Névjegy szerkesztése</string>
<string name="content_description_delete_contact">Névjegy törlése</string>
<string name="content_description_confirm_contact_edit">Változtatások mentése</string>
<string name="content_description_cancel_contact_edit">Változtatások elvetése</string>
<string name="content_description_discard_changes">Változtatások elvetése</string>
<string name="content_description_change_contact_picture">Névjegyfénykép módosítása</string>
<string name="content_description_change_own_picture">Saját névjegyfénykép módosítása</string>
<string name="content_description_call_direction">Hívásirány</string>

View file

@ -236,7 +236,7 @@
<string name="content_description_start_encrypted_chat">进入加密对话</string>
<string name="content_description_edit_contact">编辑联系人</string>
<string name="content_description_delete_contact">删除联系人</string>
<string name="content_description_cancel_contact_edit">放弃更改</string>
<string name="content_description_discard_changes">放弃更改</string>
<string name="content_description_confirm_contact_edit">保存更改</string>
<string name="content_description_change_contact_picture">更改联系人图片</string>
<string name="content_description_change_own_picture">更改自己的图像</string>

View file

@ -331,7 +331,7 @@
<string name="content_description_ephemeral_duration_change">通過選定值更改「閱後即焚」信息的時效</string>
<string name="content_description_contact_can_do_encryption">可在加密的對話中邀請聯絡人</string>
<string name="content_description_start_encrypted_chat">進入加密對話</string>
<string name="content_description_cancel_contact_edit">放棄更改</string>
<string name="content_description_discard_changes">放棄更改</string>
<string name="content_description_unselect_all">取消選擇所有項目</string>
<string name="content_description_recording_toggle_play">播放或暫停錄音</string>
<string name="content_description_show_missed_calls">只顯示未接來電</string>

View file

@ -13,6 +13,7 @@
<dimen name="video_preview_max_size">200dp</dimen>
<dimen name="video_preview_pip_max_size">50dp</dimen>
<dimen name="main_activity_tabs_fragment_size">60dp</dimen>
<dimen name="main_activity_top_bar_size">60dp</dimen>
<dimen name="status_fragment_size">40dp</dimen>
<dimen name="tabs_fragment_selector_size">5dp</dimen>
<dimen name="tabs_fragment_unread_count_bounce_offset">5dp</dimen>

View file

@ -177,6 +177,8 @@
<string name="chat_message_forward_confirmation_dialog">Do you want to forward the message in this room?</string>
<string name="chat_room_dummy_subject" translatable="false">dummy subject</string>
<string name="chat_room_toast_choose_for_sharing">Select a conversation or create a new one</string>
<string name="chat_room_choose_conversation_for_message_forward">Select a conversation or create a new one</string>
<string name="chat_room_choose_conversation_for_file_sharing">Select a conversation or create a new one</string>
<string name="chat_room_cant_open_file_no_app_found">Can\'t open file, no application available for this format.</string>
<string name="chat_room_file_not_found">File not found</string>
<string name="chat_room_creation_failed">Chat room creation failed</string>
@ -646,7 +648,7 @@
<string name="content_description_start_encrypted_chat">Go into encrypted conversation</string>
<string name="content_description_edit_contact">Edit contact</string>
<string name="content_description_delete_contact">Delete contact</string>
<string name="content_description_cancel_contact_edit">Discard changes</string>
<string name="content_description_discard_changes">Discard changes</string>
<string name="content_description_confirm_contact_edit">Save changes</string>
<string name="content_description_change_contact_picture">Change contact picture</string>
<string name="content_description_change_own_picture">Change own picture</string>
@ -702,4 +704,6 @@
<string name="content_description_close_bubble">Close notification bubble</string>
<string name="content_description_open_app">Open conversation in app instead of bubble</string>
<string name="content_description_export">Open file in third-party app</string>
<string name="content_description_cancel_forward">Cancel message forward</string>
<string name="content_description_cancel_sharing">Cancel sharing</string>
</resources>