hi, is there an API in compose for EditText’s ```/...
# compose
m
hi, is there an API in compose for EditText’s
Copy code
/**
 * Called when a context menu option for the text view is selected.  Currently
 * this will be one of {@link android.R.id#selectAll}, {@link android.R.id#cut},
 * {@link android.R.id#copy}, {@link android.R.id#paste} or {@link android.R.id#shareText}.
 *
 * @return true if the context menu item action was performed.
 */
public boolean onTextContextMenuItem(int id) {
s
👋 were you able to find a solution?
I think we can use
LocalTextToolbar
for listening to cut, copy and paste events
m
my colleague is currently working on this and he is using that, by proving AndroidTextToolbar, unfortunatelly he is saying that he need to copy whole code, there is no option to attach listeners or sth similar
s
Gotcha. I was easily able to set a listener by creating a TextToolbar that wraps around LocalTextToolbar.current.