-
An extension that gives the App Developer a selection of cursors to choose from and if possible also allow the App User to select cursors.
-
An advanced version that allows App Developer/App User to define their own cursor using an image (.png).
Great suggestion - I will start working on this immediately.
This can be helpful for you.
Here is also another approach.
This is possible with Kodular by setting AccentColor
accordingly.
Yes, it is in the Kodular documentation, bbut I don't think this applies to App Inventor (although App Inventor does have an AccentColor property as well.).
You are going to create the extension right? If you aren't then i will give a try.
I am trying to implement the cursor features in this extension. Currently testing.
EDIT: Verified not working. Failed attempt.
you might show current code maybe you are doing something wrong?
I removed the code already unfortunately. Same as this.
public void ColorFilter(int color) {
Drawable drawable = view.getBackground(); // get current EditText drawable
drawable.setColorFilter(color, PorterDuff.Mode.SRC_ATOP); // change the drawable color
if(Build.VERSION.SDK_INT > 16) {
view.setBackground(drawable); // set the new drawable to EditText
}else{
view.setBackgroundDrawable(drawable); // use setBackgroundDrawable because setBackground required API 16
}
view.invalidate();
}
Maybe try this one
I tested, it instead filled the BackgroundColor of the TextBox.
We already have BackgroundColor for Textbox, don't we?
TextCursorDrawable
is added on API 29. You can use the getter and setter properties.
Example :
EditText editText =...;
public void SetCursorColor(int color){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
editText.setTextCursorDrawable(//drawable or intDrawableResId);
return;
}
}
Before API 29, Only a solution is using java reflection.