Closed siavash-sajjad closed 3 years ago
Hi, thank you for your issue :) Does it occur the same issue if you give some padding-bottom or margin-bottom to the recyclerView?
Hi, thank you for your issue :) Does it occur the same issue if you give some padding-bottom or margin-bottom to the recyclerView?
no, if using clipToPadding and set padding bottom fix this problem, but this method isn't nice in UI
- Library Version: 2.1.2
- Affected Device(s): Xiaomi MI 9 With Android 10
i use following code for show context menu in every item of recyclerview:
...
Try to use showAsAnchorRightTop with margin to show menu
powerMenu?.showAsAnchorRightTop(
view,
0,
-your menu height
)
if your recyclerview item is last visible on the screen. To determine that, you can use:
LinearLayoutManager.findLastVisibleItemPosition()
i use following code for show context menu in every item of recyclerview:
powerMenu = new PowerMenu.Builder(BackupActivity.this) .addItem(new PowerMenuItem("بازگردانی")) .addItem(new PowerMenuItem("ارسال به سرور")) .addItem(new PowerMenuItem("اشتراک گذاری")) //.setAnimation(MenuAnimation.SHOWUP_TOP_RIGHT) .setMenuRadius(10f) // sets the corner radius. .setMenuShadow(10f) // sets the shadow. .setDivider(new ColorDrawable(ContextCompat.getColor(BackupActivity.this, R.color.main_background))) .setDividerHeight(1) .setTextColor(ContextCompat.getColor(BackupActivity.this, R.color.text_color)) .setTextGravity(Gravity.CENTER) .setTextTypeface(ResourcesCompat.getFont(BackupActivity.this, R.font.iy_regular)) .setTextSize(15) .setSelectedTextColor(Color.WHITE) .setMenuColor(Color.WHITE) .setSelectedMenuColor(ContextCompat.getColor(BackupActivity.this, R.color.colorPrimary)) .build();
but in last items the context menu isn't shown correctly like the picture below:
i expected, detect item position and show context menu automatically in up or bottom or left or right is it possible?
sorry for poor my english