Skip to content

Commit

Permalink
Share UI issue fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
surinder-tsys committed May 19, 2023
1 parent c34316f commit e21f356
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,30 +353,26 @@ class OCFileListDelegate(
sharedMessageView?.setTextColor(sharedWithMeColor)
}
file.isSharedWithSharee -> {
val shareIcon = viewThemeUtils.platform.tintDrawable(
context,
AppCompatResources.getDrawable(context, R.drawable.ic_shared)!!
val shareIcon = viewThemeUtils.platform.colorDrawable(
AppCompatResources.getDrawable(context, R.drawable.ic_shared)!!,
context.resources.getColor(R.color.primary, null)
)
sharedIconView.setImageDrawable(shareIcon)
sharedIconView.contentDescription = context.getString(R.string.shared_icon_shared)
//Added Code For Message Text
sharedMessageView?.text = context.resources.getString(R.string.placeholder_sharedMessage)
sharedMessageView?.let{
viewThemeUtils.platform.colorTextView(it)
}
sharedMessageView?.setTextColor(context.resources.getColor(R.color.primary, null))
}
file.isSharedViaLink -> {
val shareIcon = viewThemeUtils.platform.tintDrawable(
context,
AppCompatResources.getDrawable(context, R.drawable.ic_shared)!!
val shareIcon = viewThemeUtils.platform.colorDrawable(
AppCompatResources.getDrawable(context, R.drawable.ic_shared)!!,
context.resources.getColor(R.color.primary, null)
)
sharedIconView.setImageDrawable(shareIcon)
sharedIconView.contentDescription = context.getString(R.string.shared_icon_shared_via_link)
//Added Code For Message Text
sharedMessageView?.text = context.resources.getString(R.string.placeholder_sharedMessage)
sharedMessageView?.let{
viewThemeUtils.platform.colorTextView(it)
}
sharedMessageView?.setTextColor(context.resources.getColor(R.color.primary, null))
}
file.isEncrypted -> {
sharedIconView.visibility = View.GONE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class QuickSharingPermissionsAdapter(
fun bindData(quickPermissionModel: QuickPermissionModel) {
binding.tvQuickShareName.text = quickPermissionModel.permissionName
if (quickPermissionModel.isSelected) {
viewThemeUtils.platform.colorImageView(binding.tvQuickShareCheckIcon)
binding.tvQuickShareCheckIcon.visibility = View.VISIBLE
} else {
binding.tvQuickShareCheckIcon.visibility = View.INVISIBLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
Expand All @@ -27,6 +28,7 @@
import com.owncloud.android.ui.components.SendButtonData;
import com.owncloud.android.ui.helpers.FileOperationsHelper;
import com.owncloud.android.utils.MimeTypeUtil;
import com.owncloud.android.utils.theme.ThemeColorUtils;
import com.owncloud.android.utils.theme.ViewThemeUtils;

import java.util.ArrayList;
Expand Down Expand Up @@ -204,7 +206,10 @@ private void requestPasswordForShareViaLink() {
}

private void themeShareButtonImage(ImageView shareImageView) {
viewThemeUtils.files.themeAvatarButton(shareImageView);
shareImageView.getBackground().setColorFilter(requireContext().getResources().getColor(R.color.primary, null),
PorterDuff.Mode.SRC_IN);
shareImageView.getDrawable().mutate().setColorFilter(requireContext().getResources().getColor(R.color.white, null),
PorterDuff.Mode.SRC_IN);
}

private void showResharingNotAllowedSnackbar() {
Expand Down

0 comments on commit e21f356

Please sign in to comment.