Questions tagged [android-actionmode]
Provide alternative interaction modes and replace parts of the normal UI until finished.
202
questions
0
votes
0
answers
37
views
React native selectable text doesnt work on some xiaomi devices
I'm using react-native-selectable-text currently on my app and it's working with no issues on android devices except some xiaomi devices.İ tried to customize selection (e.g: Choose,add to favorite) ...
0
votes
0
answers
21
views
Can I select the text of a TextView from a function call to display an ActionMenu
I have confirmed that I can select TextView in Android from a function call to Text. However, the ActionMenu (including textSelectHandle) does not appear at this time.
In other apps, I am able to ...
0
votes
1
answer
67
views
Calling ActionMode finish() in onConfigurationChanged() can lead to redraws
I have an ActionMode in my fragment that I want only to run in the portrait mode; so I called actionMode.finish() in the onConfigurationChanged() fragment callback to stop the ActionMode if the ...
0
votes
1
answer
205
views
Change ActionMode background color in Material3
Starting from Material3 I can not change the action mode background color.
Before Material3, I managed to change the background color with actionModeBackground attribute:
<item name="...
0
votes
0
answers
42
views
How to create a contextual action mode without the action bar?
I'm trying to create a RecyclerView that has selectable items using ActionMode, while making it look like a Popup Menu with no toolbar/ActionBar.
I've been trying to figure this out for some time, but ...
0
votes
1
answer
85
views
How to get ActionMode.Menu working properly in OnActionModeStarted on Android Xamarin Forms?
I have the following code to introduce menu items into the system context menu upon text selection on a Label.
public override void OnActionModeStarted(ActionMode mode)
{
IMenu menu = mode.Menu;
...
4
votes
0
answers
145
views
Android 12 | ActionMode menu items are not showing icons but only title in Contextual Action Mode, type_floating
I am using Action mode type_floating in webview where am showing action mode on long click of webview. It is showing action mode menu items correctly but in Android 12, it is just showing titlte names ...
0
votes
1
answer
136
views
What can cause an Android WebView to not diplay an ActionMode beginning with WebView 90.0.4430.66?
I have an app with multiple WebViews. Beginning with Android WebView 90.0.4430.66, some of the WebViews no longer display ActionModes (cut, copy, paste menus) when text is selected. The text ...
0
votes
0
answers
290
views
why android.view.ActionMode.Callback has two of each member methods?
I hope you are well.
My question is why this callback class has two of the same functions?
the only difference that I see is that some functions deal with nullable and the others don't, but in the end,...
0
votes
2
answers
180
views
Android - ActionMode after landscape the Toolbar becomes visible and does not hide
I have a root view and this root view contains a fragment with viewpager. This is my ContentFragment. And I update view of this ContentFragment for viewpager behaviour. Now, when I activated ...
5
votes
3
answers
5k
views
How to implement list multiSelect in Jetpack Compose?
I need to implement multiselect for LazyList, which will also change appBar content when list items are long clicked.
For ListView we could do that with just setting choiceMode to ...
0
votes
0
answers
264
views
"Non-static method 'getActivity()' cannot be referenced from a static context" in recyclerview adapter
I made custom gallery using fragment and recyclerview. I want to make multiple selection within it, to appear Actionbar with menu when I select pictures.
So I made ActionMode in my adapter and tried ...
1
vote
0
answers
221
views
RecyclerView SelectionTracker IndexOutOfBoundsException when removing first item
I try to use selection tracker for multi-selection with contextual action mode and got stuck at deleting first item.
I've set up tracker like in this tutorial, selection and removing other items works,...
0
votes
1
answer
336
views
Cant style Android ActionMode
I am making a notes app.In that app i want an actionmode to trigger when long pressed on any item.It works but i cant change any style attributes of the actionmode.I have included my custom style in ...
1
vote
1
answer
419
views
How to implement select all button to select all items in recyclerview using actionmode and selectiontracker?
I have this code in my MainActivity
recyclerView.setAdapter(customAdapter);
customAdapter.submitList(path_list);
selectionTracker = new SelectionTracker.Builder<>(
"...
1
vote
2
answers
489
views
ActionMode - SearchView not working (actionView is null)
I recently working on activating SearchView in ActionMode when user click on Search in onOptionsItemSelected.
However, I cant get access to the SearchView as after debugging, its actionView ...
2
votes
1
answer
193
views
How can I finish the ActionMode when no selected item?
I want to finish actionmode when there is no item selected. I tried the code below but it didn't work.
bookAdapter.setOnLongClickListener(new RecyclerViewAdapter.OnLongClickListener() {
@...
0
votes
1
answer
133
views
Android actionmode and moving item up-down
I'm trying to activate the movement (up and down) to move a recycleview item after the action mode has been activated.
Basically I have implemented the viewHolder onLongPress () like this:
@Override
...
1
vote
2
answers
153
views
Title in ActionMode not showing
I have a problem that when set the title for the action mode for the first time, shortly after it is created, id doesn's show the title. Another request to do that works fine, only the first one. I do ...
0
votes
1
answer
102
views
Actionmode background issue on fragments
I am using 3 fragments with a tablayout and a toolbar and on each fragment it is possible to select an item to display an action mode. Each fragment has a different style with an "...
0
votes
1
answer
126
views
Actionmode Bar doesn't cover whole titlebar
In my app I need to use the ActionMode.
I have followed several Guides and Tutorials (https://medium.com/asos-techblog/style-actionmode-on-android-5e613fa77c32, https://developer.android.com/guide/...
0
votes
0
answers
184
views
ActionMode callback never calls onCreateActionMode when started in fragment's OnViewCreated
@ExperimentalCoroutinesApi
class WeekdayTimesFragment @Inject constructor(viewModelFactory: SavedStateViewModelFactory.Factory)
:Fragment(R.layout.fragment_weekday_times), WeekdayAlarmTimesAdapter....
0
votes
1
answer
547
views
Android : startActionMode in fragment only works inside onActivityCreated
I have a fragment that uses a RecyclerView. The fragment implements onClickListener from the adapter class.
Inside the fragment, I want to call startActionMode when I click on the recyclerView item.
...
2
votes
0
answers
193
views
How is to implement action mode in fragment in androidx?
I have to implement action mode in fragment, but its gets nullpointer exception in action mode. I have tried so much but not gets any results, Please help me I am new in android. I have also tried ...
0
votes
1
answer
842
views
Remove multiple selected items from a RecyclerView
I implemented an action mode toolbar that allows me to delete multiple items in my recyclerView. I have a list of integer of all selected item index. So I would like to know what is the better way to ...
1
vote
1
answer
252
views
Remove Toolbar title margin in ActionMode
I'm looking to remove the space between the navigation icon and the title of my actionMode. I managed to remove it for the toolbar thanks to:
<style name="AppTheme" parent="Theme....
0
votes
2
answers
227
views
TextView: How to prevent displaying the action menu when selecting text in TextView?
I have a selectable TextView.
I want to prevent showing the context menu when selecting text.
I implemented this code but action bar and context menu still is displayed.
tv....
4
votes
1
answer
418
views
Android: Dismiss Floating ActionMode when tapping outside ActionMode dialog
I've run into an issue that I just can't find an answer to.
I'm using a floating action menu, when dealing with longClick() actions in a inline list component inside a custom view. Like this:
When I ...
1
vote
2
answers
652
views
ActionMode menu icon is not shown
I am trying setup contextual action bar when long click on a item in a recyclerview. But menu icon is not shown.
Code is given below.
listAdapter.setOnItemClickListener(object : OnItemClickListener ...
0
votes
1
answer
193
views
How to add your own function in ActionMode class in Android?
I want to implement an ActionMode which acts as a selection mode. I want to add a function toggle() in my ActionMode which toggles the selection of my list.
my ActionMode code:
class Selection(/* ...
1
vote
0
answers
350
views
Wrapping title text in Action Mode using a custom layout
I am trying make my contextual action bar, or CAB, behave in a Material way such as wrapping title text when it is long. For the regular toolbar, I use appCompat.Toolbar, but for the CAB, I am using ...
0
votes
1
answer
401
views
how to change color of navigation icon and default text of ActionMode
I want to change the color of navigation icon's color of ActionMode.I can change color of ActionMode Background but I don't know how to change the color of ActionMode Navigation.
Image : https://ibb....
0
votes
0
answers
319
views
Is there a way to detect when the ActionMode overflow menu is opened and closed?
I have an ActionBar with an OnMenuVisibilityListener and a list of items. When items are selected I show an ActionMode with another menu. I want to listen to show/hide callbacks on the ActionMode ...
1
vote
1
answer
480
views
How handle click listener for recyclerView item from contextual action mode?
I want to make recyclerview item click like this image.When i selected recyclerview item press long click then contextual action mode is enable.If i select only one item then show edit menu item else ...
1
vote
0
answers
489
views
Selectable TextView with ActionMode
I have a textView that is selectable and I'm implementing an ActionMode callback. like the one below. My dilemma is, once the user has activated the selection tool, I need to be able to detect the ...
6
votes
0
answers
1k
views
How to display menu item Icons on Android 9 in Floating Action Mode
I have an Android menu XML that resembles this:-
<item
android:id="@+id/action_share"
android:orderInCategory="100"
android:icon="@drawable/ic_social_share"
app:showAsAction="...
4
votes
1
answer
348
views
how to know when back arrow is pressed in actionmode
i have an actionmode bar that has an arrow button and a delete icon.
see pic below
i am trying to identify in my code when the arraow button is pressed but not able to. i have the following code
...
1
vote
0
answers
98
views
Action Mode and accessibility
I currently have an activity with a toolbar.
The toolbar has some text and menu options. Selecting a menu option will enable ActionMode
Everything works well as I'm using :
<item name="...
0
votes
1
answer
76
views
ActionMode stops working after adding onClick() on the view
So I have here a GridView, which contains a list of photos. The ActionMode works fine, till I have decided to hover the users to the photo when they perform one click, or to activate the ActionMode ...
0
votes
2
answers
336
views
ActionMode Title Font
I recently created an application that uses a custom font pack in the whole app. But when I use the ActionMode, the title does not use the custom font. So does anyone know how I can apply a custom ...
2
votes
1
answer
428
views
Show ActionMode over ActionMode
I have a list activity in which the user can do open action modes A and B. The user can also open action mode A then B on top of it.
The problem is that when action mode A is shown and action mode B ...
6
votes
1
answer
932
views
How to change actionModeCloseDrawable icon dynamically?
I am setting up the actionModeCloseDrawable icon as below
<item name="actionModeCloseDrawable">@drawable/ic_actionbar_back</item>
But I want to change it pro-grammatically on paticular ...
11
votes
4
answers
17k
views
Android recyclerview-selection Implementation?
I'm currently trying to implement the new recyclerview-selection APIs from Android Support Library 28.0.0-alpha1, and am running into some issues. My goal is to have a RecyclerView, with the ability ...
5
votes
1
answer
5k
views
Implementation of ActionMode.Callback
I have an Implementation of ActionMode to display the number of multi
selected items in a RecyclerView.
I would like to know when the back button in the actionMode is tapped so as to correspondingly ...
0
votes
1
answer
187
views
Xamarin.forms ContextActions] Can I block other TouchActions in ActionMode?
When the ContextActions of Xamarin.forms is enabled on the Android device, it enters ActionMode.
In the ActionMode state, items under the ActionBar can be touched and items in the ListView can be ...
10
votes
3
answers
743
views
Partially visible Action Mode Icons android
I have just update android support library from com.android.support:appcompat-v7:25.3.1 to com.android.support:appcompat-v7:26.0.1. It changed the appearance of action mode icons. Now they are half-...
0
votes
1
answer
452
views
Light action mode on dark toolbar
I'm trying to display a light action mode (white background, black text, black icons) on a dark toolbar (custom-colored background via the primary color, white text, white icons).
Here's the ...
1
vote
3
answers
89
views
OnItemLongClickListener not called on ListView with BaseAdapter implementation
I have an Activity extending BaseActivity. It contains a ListView which gets initialized by my Adapter (extending BaseAdapter). Each item in the list view is a CardView with a Button, TextView & ...
0
votes
0
answers
274
views
Change color of "highlight" in ContextualActionMode for different theme
As a short explanation: We are developing an Android App for the university. On the first screen is a list. This list is made by a ListView containing lots of TextViews. The following code is in our ...
1
vote
1
answer
196
views
Can't fix styles for toolbar in the action mode
I can't get how to fix styles for my Toolbar in the action mode.
<!-- DialogWhenLarge uses to show Activity as Dialog on the tablet -->
<style name="Theme.Paper.DialogWhenLarge" parent="...