diff --git a/app/src/main/java/com/nextcloud/talk/adapters/items/UserItem.java b/app/src/main/java/com/nextcloud/talk/adapters/items/UserItem.java index a569f2a0d..9968aab35 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/items/UserItem.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/items/UserItem.java @@ -193,24 +193,42 @@ public class UserItem extends AbstractFlexibleItem holder.videoCallImageView.setVisibility(View.GONE); break; case IN_CALL: - holder.voiceOrSimpleCallImageView.setBackground(resources.getDrawable(R.drawable.shape_call_bubble)); + holder.voiceOrSimpleCallImageView.setBackground( + ResourcesCompat.getDrawable(resources, R.drawable.shape_call_bubble, null)); holder.voiceOrSimpleCallImageView.setVisibility(View.VISIBLE); + holder.voiceOrSimpleCallImageView.setContentDescription( + resources.getString(R.string.nc_call_state_in_call, participant.displayName)); holder.videoCallImageView.setVisibility(View.GONE); break; case IN_CALL_WITH_AUDIO: - holder.voiceOrSimpleCallImageView.setBackground(resources.getDrawable(R.drawable.shape_voice_bubble)); + holder.voiceOrSimpleCallImageView.setBackground( + ResourcesCompat.getDrawable(resources, R.drawable.shape_voice_bubble, null)); holder.voiceOrSimpleCallImageView.setVisibility(View.VISIBLE); + holder.voiceOrSimpleCallImageView.setContentDescription( + resources.getString(R.string.nc_call_state_in_call_with_audio, participant.displayName)); holder.videoCallImageView.setVisibility(View.GONE); break; case IN_CALL_WITH_VIDEO: - holder.voiceOrSimpleCallImageView.setBackground(resources.getDrawable(R.drawable.shape_call_bubble)); - holder.videoCallImageView.setBackground(resources.getDrawable(R.drawable.shape_video_bubble)); + holder.voiceOrSimpleCallImageView.setBackground( + ResourcesCompat.getDrawable(resources, R.drawable.shape_call_bubble, null)); + holder.videoCallImageView.setBackground( + ResourcesCompat.getDrawable(resources, R.drawable.shape_video_bubble, null)); + holder.voiceOrSimpleCallImageView.setContentDescription( + resources.getString(R.string.nc_call_state_in_call, participant.displayName)); + holder.videoCallImageView.setContentDescription( + resources.getString(R.string.nc_call_state_with_video, participant.displayName)); holder.voiceOrSimpleCallImageView.setVisibility(View.VISIBLE); holder.videoCallImageView.setVisibility(View.VISIBLE); break; case IN_CALL_WITH_AUDIO_AND_VIDEO: - holder.voiceOrSimpleCallImageView.setBackground(resources.getDrawable(R.drawable.shape_voice_bubble)); - holder.videoCallImageView.setBackground(resources.getDrawable(R.drawable.shape_video_bubble)); + holder.voiceOrSimpleCallImageView.setBackground( + ResourcesCompat.getDrawable(resources, R.drawable.shape_voice_bubble, null)); + holder.videoCallImageView.setBackground( + ResourcesCompat.getDrawable(resources, R.drawable.shape_video_bubble, null)); + holder.voiceOrSimpleCallImageView.setContentDescription( + resources.getString(R.string.nc_call_state_in_call_with_audio)); + holder.videoCallImageView.setContentDescription( + resources.getString(R.string.nc_call_state_with_video)); holder.voiceOrSimpleCallImageView.setVisibility(View.VISIBLE); holder.videoCallImageView.setVisibility(View.VISIBLE); break; @@ -220,7 +238,6 @@ public class UserItem extends AbstractFlexibleItem break; } - if (holder.contactMentionId != null) { String userType = ""; diff --git a/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicOutcomingTextMessageViewHolder.kt b/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicOutcomingTextMessageViewHolder.kt index 84a22d33b..852985ebe 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicOutcomingTextMessageViewHolder.kt +++ b/app/src/main/java/com/nextcloud/talk/adapters/messages/MagicOutcomingTextMessageViewHolder.kt @@ -194,12 +194,20 @@ class MagicOutcomingTextMessageViewHolder(itemView: View) : OutcomingTextMessage else -> null } + val readStatusContentDescriptionString = when (message.readStatus) { + ReadStatus.READ -> context?.resources?.getString(R.string.nc_message_read) + ReadStatus.SENT -> context?.resources?.getString(R.string.nc_message_sent) + else -> null + } + readStatusDrawableInt?.let { drawableInt -> context?.resources?.getDrawable(drawableInt, null)?.let { it.setColorFilter(context?.resources!!.getColor(R.color.white60), PorterDuff.Mode.SRC_ATOP) checkMark?.setImageDrawable(it) } } + + checkMark?.setContentDescription(readStatusContentDescriptionString) } init { diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ProfileController.java b/app/src/main/java/com/nextcloud/talk/controllers/ProfileController.java index e1f3fd528..07f94bce2 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ProfileController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ProfileController.java @@ -759,6 +759,11 @@ public class ProfileController extends BaseController { holder.scope.setImageResource(R.drawable.ic_link); break; } + + holder.scope.setContentDescription( + controller.getActivity().getResources().getString( + R.string.scope_toggle_description, + item.hint)); } holder.icon.setImageResource(item.icon); diff --git a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java index 07efaa4eb..ebb699170 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java @@ -35,13 +35,8 @@ import android.view.inputmethod.EditorInfo; import android.widget.Button; import android.widget.ImageView; -import androidx.annotation.NonNull; -import autodagger.AutoInjector; -import butterknife.BindView; -import butterknife.OnClick; import com.bluelinelabs.conductor.RouterTransaction; import com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler; -import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputLayout; import com.nextcloud.talk.R; import com.nextcloud.talk.application.NextcloudTalkApplication; @@ -65,6 +60,11 @@ import org.parceler.Parcels; import javax.inject.Inject; +import androidx.annotation.NonNull; +import autodagger.AutoInjector; +import butterknife.BindView; +import butterknife.OnClick; + @AutoInjector(NextcloudTalkApplication.class) public class EntryMenuController extends BaseController { @@ -95,7 +95,6 @@ public class EntryMenuController extends BaseController { private EmojiPopup emojiPopup; - private Bundle originalBundle; public EntryMenuController(Bundle args) { @@ -116,6 +115,7 @@ public class EntryMenuController extends BaseController { this.callUrl = args.getString(BundleKeys.INSTANCE.getKEY_CALL_URL(), ""); } + @NonNull @Override protected View inflateView(@NonNull LayoutInflater inflater, @NonNull ViewGroup container) { return inflater.inflate(R.layout.controller_entry_menu, container, false); diff --git a/app/src/main/res/layout/call_item.xml b/app/src/main/res/layout/call_item.xml index 5e9e49bab..1701238f2 100644 --- a/app/src/main/res/layout/call_item.xml +++ b/app/src/main/res/layout/call_item.xml @@ -2,6 +2,8 @@ ~ Nextcloud Talk application ~ ~ @author Mario Danic + ~ @author Andy Scherzinger + ~ Copyright (C) 2021 Andy Scherzinger ~ Copyright (C) 2017 Mario Danic ~ ~ This program is free software: you can redistribute it and/or modify @@ -46,6 +48,7 @@ android:layout_alignParentStart="true" android:layout_marginStart="8dp" android:layout_marginEnd="8dp" + android:contentDescription="@string/nc_remote_audio_off" android:src="@drawable/ic_mic_off_white_24px" android:visibility="invisible" /> @@ -56,6 +59,7 @@ android:layout_below="@id/peer_nick_text_view" android:layout_marginStart="8dp" android:layout_toEndOf="@id/remote_audio_off" + android:contentDescription="@string/nc_remote_video_off" android:src="@drawable/ic_videocam_off_white_24px" android:visibility="invisible" /> diff --git a/app/src/main/res/layout/call_states.xml b/app/src/main/res/layout/call_states.xml index 5e132922d..136805f57 100644 --- a/app/src/main/res/layout/call_states.xml +++ b/app/src/main/res/layout/call_states.xml @@ -2,6 +2,8 @@ ~ Nextcloud Talk application ~ ~ @author Mario Danic + ~ @author Andy Scherzinger + ~ Copyright (C) 2021 Andy Scherzinger ~ Copyright (C) 2017-2019 Mario Danic ~ ~ This program is free software: you can redistribute it and/or modify @@ -29,6 +31,7 @@ android:layout_height="48dp" android:layout_above="@id/callStateTextView" android:layout_centerHorizontal="true" + android:contentDescription="@null" android:src="@drawable/ic_signal_wifi_off_white_24dp" android:visibility="gone" /> diff --git a/app/src/main/res/layout/controller_call_notification.xml b/app/src/main/res/layout/controller_call_notification.xml index ff9ac440a..cee15b84d 100644 --- a/app/src/main/res/layout/controller_call_notification.xml +++ b/app/src/main/res/layout/controller_call_notification.xml @@ -2,6 +2,8 @@ ~ Nextcloud Talk application ~ ~ @author Mario Danic + ~ @author Andy Scherzinger + ~ Copyright (C) 2021 Andy Scherzinger ~ Copyright (C) 2017-2018 Mario Danic ~ ~ This program is free software: you can redistribute it and/or modify @@ -27,6 +29,7 @@ android:id="@+id/backgroundImageView" android:layout_width="match_parent" android:layout_height="match_parent" + android:contentDescription="@null" android:scaleType="centerCrop" android:src="@color/grey950" tools:srcCompat="@tools:sample/backgrounds/scenic" /> @@ -48,7 +51,7 @@ app:backgroundImage="@color/nc_darkGreen" app:placeholderImage="@drawable/ic_call_white_24dp" app:roundAsCircle="true" - tools:visibility="visible"/> + tools:visibility="visible" /> + tools:visibility="visible" /> + android:textSize="16sp" /> diff --git a/app/src/main/res/layout/controller_entry_menu.xml b/app/src/main/res/layout/controller_entry_menu.xml index 664af4045..8f10d5568 100644 --- a/app/src/main/res/layout/controller_entry_menu.xml +++ b/app/src/main/res/layout/controller_entry_menu.xml @@ -74,6 +74,7 @@ android:layout_alignParentEnd="true" android:layout_marginStart="-4dp" android:background="@color/transparent" + android:contentDescription="@string/nc_add_emojis" android:src="@drawable/ic_insert_emoticon_black_24dp" android:tint="@color/emoji_icons" android:visibility="gone" diff --git a/app/src/main/res/layout/controller_locked.xml b/app/src/main/res/layout/controller_locked.xml index 92079e9c3..414c89f0f 100644 --- a/app/src/main/res/layout/controller_locked.xml +++ b/app/src/main/res/layout/controller_locked.xml @@ -46,6 +46,7 @@ android:layout_width="32dp" android:layout_height="32dp" android:layout_gravity="center" + android:contentDescription="@string/nc_locked" android:src="@drawable/ic_lock_white_24px" /> @@ -57,7 +58,7 @@ android:layout_gravity="center_horizontal" android:paddingTop="16dp" android:paddingBottom="56dp" - android:text="@string/nc_locked" + android:text="@string/nc_locked_tap_to_unlock" android:textAlignment="center" android:textColor="@color/textColorOnPrimaryBackground" android:textSize="22sp" /> diff --git a/app/src/main/res/layout/controller_operations_menu.xml b/app/src/main/res/layout/controller_operations_menu.xml index ce17af3ca..144df74b6 100644 --- a/app/src/main/res/layout/controller_operations_menu.xml +++ b/app/src/main/res/layout/controller_operations_menu.xml @@ -32,6 +32,7 @@ android:layout_marginTop="24dp" android:layout_marginEnd="24dp" android:layout_marginBottom="8dp" + android:contentDescription="@null" android:tintMode="src_in" android:visibility="gone" /> diff --git a/app/src/main/res/layout/item_custom_outcoming_text_message.xml b/app/src/main/res/layout/item_custom_outcoming_text_message.xml index d19c0e670..45c6c7883 100644 --- a/app/src/main/res/layout/item_custom_outcoming_text_message.xml +++ b/app/src/main/res/layout/item_custom_outcoming_text_message.xml @@ -2,6 +2,8 @@ ~ Nextcloud Talk application ~ ~ @author Mario Danic + ~ @author Andy Scherzinger + ~ Copyright (C) 2021 Andy Scherzinger ~ Copyright (C) 2017-2018 Mario Danic ~ ~ This program is free software: you can redistribute it and/or modify @@ -66,7 +68,8 @@ android:layout_height="wrap_content" android:layout_below="@id/messageTime" android:layout_marginStart="8dp" - app:layout_alignSelf="center" /> + app:layout_alignSelf="center" + android:contentDescription="@null" /> diff --git a/app/src/main/res/layout/lobby_view.xml b/app/src/main/res/layout/lobby_view.xml index a635e16fd..d267090c3 100644 --- a/app/src/main/res/layout/lobby_view.xml +++ b/app/src/main/res/layout/lobby_view.xml @@ -2,6 +2,8 @@ ~ Nextcloud Talk application ~ ~ @author Mario Danic + ~ @author Andy Scherzinger + ~ Copyright (C) 2021 Andy Scherzinger ~ Copyright (C) 2017-2019 Mario Danic ~ ~ This program is free software: you can redistribute it and/or modify @@ -32,6 +34,7 @@ android:layout_above="@id/lobby_text_view" android:layout_centerHorizontal="true" android:layout_margin="@dimen/margin_between_elements" + android:contentDescription="@string/nc_lobby" android:src="@drawable/ic_room_service_black_24dp" app:tint="@color/grey_600" /> @@ -40,9 +43,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerInParent="true" - android:layout_margin="@dimen/margin_between_elements" + android:layout_margin="@dimen/standard_margin" android:text="@string/nc_lobby_waiting" android:textAlignment="center" - android:textColor="@color/grey_600" /> + android:textColor="@color/grey_600" + android:textSize="16sp" /> \ No newline at end of file diff --git a/app/src/main/res/layout/rv_item_app.xml b/app/src/main/res/layout/rv_item_app.xml index ce5270ef9..9f9121816 100644 --- a/app/src/main/res/layout/rv_item_app.xml +++ b/app/src/main/res/layout/rv_item_app.xml @@ -2,6 +2,8 @@ ~ Nextcloud Talk application ~ ~ @author Mario Danic + ~ @author Andy Scherzinger + ~ Copyright (C) 2021 Andy Scherzinger ~ Copyright (C) 2017 Mario Danic ~ ~ This program is free software: you can redistribute it and/or modify @@ -32,6 +34,7 @@ android:layout_height="24dp" android:layout_centerVertical="true" android:layout_marginStart="16dp" + android:contentDescription="@null" android:focusable="false" android:focusableInTouchMode="false" tools:src="@drawable/ic_add_grey600_24px" /> diff --git a/app/src/main/res/layout/rv_item_browser_file.xml b/app/src/main/res/layout/rv_item_browser_file.xml index b8828500c..814249798 100644 --- a/app/src/main/res/layout/rv_item_browser_file.xml +++ b/app/src/main/res/layout/rv_item_browser_file.xml @@ -53,6 +53,7 @@ android:layout_height="16dp" android:layout_below="@id/file_icon" android:layout_alignStart="@+id/file_icon" + android:contentDescription="@string/encrypted" android:src="@drawable/ic_lock_grey600_24px" /> diff --git a/app/src/main/res/layout/rv_item_conversation_info_participant.xml b/app/src/main/res/layout/rv_item_conversation_info_participant.xml index c98f43a7e..3996386e7 100644 --- a/app/src/main/res/layout/rv_item_conversation_info_participant.xml +++ b/app/src/main/res/layout/rv_item_conversation_info_participant.xml @@ -38,6 +38,7 @@ android:layout_height="12dp" android:layout_gravity="bottom|end" android:background="@drawable/shape_lock_bubble" + android:contentDescription="@null" android:visibility="gone" tools:visibility="visible" /> @@ -47,6 +48,7 @@ android:layout_height="12dp" android:layout_gravity="top|end" android:background="@drawable/shape_favorite_bubble" + android:contentDescription="@null" android:visibility="gone" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/user_info_details_table_item.xml b/app/src/main/res/layout/user_info_details_table_item.xml index aecde4374..e527e9f6b 100644 --- a/app/src/main/res/layout/user_info_details_table_item.xml +++ b/app/src/main/res/layout/user_info_details_table_item.xml @@ -30,7 +30,7 @@ android:layout_width="@dimen/iconized_single_line_item_icon_size" android:layout_height="@dimen/iconized_single_line_item_icon_size" android:layout_marginStart="@dimen/standard_margin" - android:contentDescription="@string/account_icon" + android:contentDescription="@null" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" diff --git a/app/src/main/res/layout/view_message_input.xml b/app/src/main/res/layout/view_message_input.xml index 3cd50fe3a..d64b1a2ad 100644 --- a/app/src/main/res/layout/view_message_input.xml +++ b/app/src/main/res/layout/view_message_input.xml @@ -46,7 +46,8 @@ android:layout_width="36dp" android:layout_height="36dp" android:layout_below="@id/quotedChatMessageView" - android:scaleType="centerInside" /> + android:scaleType="centerInside" + android:contentDescription="@string/nc_add_attachment" /> + android:tint="@color/emoji_icons" + android:contentDescription="@string/nc_add_emojis" /> + android:scaleType="centerInside" + android:contentDescription="@string/nc_description_send_message_button" /> Allows previews of content from received links for supported services link_previews read_privacy - Tap to unlock + Tap to unlock + Locked Share my read-status and show the read-status of others Read status @@ -209,6 +210,9 @@ Reconnecting… Currently offline, please check your connectivity Leaving call… + %1$s in call + %1$s in call with audio + %1$s with video %1$s on %2$s notification channel @@ -232,6 +236,7 @@ OK Conversation name Proceed + Add emojis The name you entered is the same as the existing one Conversation link is not valid Join the conversation at %1$s/index.php/call/%2$s @@ -274,6 +279,11 @@ Cancel reply You: %1$s + Message read + Message sent + Remote video off + Remote audio off + Add attachment No more items to load. Refresh to retry. @@ -368,6 +378,7 @@ Account not found Favorite + Encrypted Password protected Avatar @@ -398,6 +409,7 @@ Published Synchronize to trusted servers and the global and public address book Scope toggle + Change privacy level of %1$s Search in %s diff --git a/scripts/analysis/lint-results.txt b/scripts/analysis/lint-results.txt index f2b89e24f..83c84a5b9 100644 --- a/scripts/analysis/lint-results.txt +++ b/scripts/analysis/lint-results.txt @@ -1,2 +1,2 @@ DO NOT TOUCH; GENERATED BY DRONE - Lint Report: 3 errors and 367 warnings + Lint Report: 3 errors and 346 warnings