diff --git a/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/AutofillManagementRecyclerAdapter.kt b/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/AutofillManagementRecyclerAdapter.kt index a7064b65ead6..1be4f41627ca 100644 --- a/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/AutofillManagementRecyclerAdapter.kt +++ b/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management/AutofillManagementRecyclerAdapter.kt @@ -18,10 +18,8 @@ package com.duckduckgo.autofill.impl.ui.credential.management import android.annotation.SuppressLint import android.content.Context -import android.content.res.Configuration import android.view.LayoutInflater import android.view.ViewGroup -import android.view.ViewGroup.LayoutParams import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.lifecycleScope import androidx.recyclerview.widget.RecyclerView @@ -192,7 +190,7 @@ class AutofillManagementRecyclerAdapter( context: Context, loginCredentials: LoginCredentials, ): PopupMenu { - return PopupMenu(LayoutInflater.from(context), R.layout.overflow_menu_list_item, width = getPopupMenuWidth(context)).apply { + return PopupMenu(LayoutInflater.from(context), R.layout.overflow_menu_list_item).apply { onMenuItemClicked(contentView.findViewById(R.id.item_overflow_edit)) { onContextMenuItemClicked(Edit(loginCredentials)) } onMenuItemClicked(contentView.findViewById(R.id.item_overflow_delete)) { onContextMenuItemClicked(Delete(loginCredentials)) } onMenuItemClicked(contentView.findViewById(R.id.item_copy_username)) { onContextMenuItemClicked(CopyUsername(loginCredentials)) } @@ -200,15 +198,6 @@ class AutofillManagementRecyclerAdapter( } } - private fun getPopupMenuWidth(context: Context): Int { - val orientation = context.resources.configuration.orientation - return if (orientation == Configuration.ORIENTATION_LANDSCAPE) { - LayoutParams.WRAP_CONTENT - } else { - context.resources.getDimensionPixelSize(R.dimen.credentialManagementListItemPopupMenuWidth) - } - } - private fun ItemRowAutofillCredentialsManagementScreenBinding.updateFavicon(credentials: LoginCredentials) { lifecycleOwner.lifecycleScope.launch { val url = credentials.domain.orEmpty() diff --git a/autofill/autofill-impl/src/main/res/values/autofill-impl-dimensions.xml b/autofill/autofill-impl/src/main/res/values/autofill-impl-dimensions.xml index 8d1305db35b8..ad7430dd713f 100644 --- a/autofill/autofill-impl/src/main/res/values/autofill-impl-dimensions.xml +++ b/autofill/autofill-impl/src/main/res/values/autofill-impl-dimensions.xml @@ -15,7 +15,6 @@ --> - 200dp 30dp 480dp \ No newline at end of file