You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am able to check if that CustomEntry is an EditText when configuring handlers:
ElementHandler.ElementMapper.AppendToMapping("Test", (handler, element) =>
{
if(handler is IEntryHandler)
{
if(handler.VirtualView is CustomEntry entry) // true
{
}
if(handler.PlatformView is EditText) // true
{
}
}
});
In MainActivity.cs I am overriding the DispatchTouchEvent and I can check if the current focus is an EditText. In the above code I was able to check if my CustomEntry is an EditText, but is it possible to check if this EditText is a CustomEntry?
public class MainActivity : MauiAppCompatActivity
{
public override bool DispatchTouchEvent(MotionEvent e)
{
if(CurrentFocus is EditText) // true
{
// Is it possible to check if this EditText is a CustomEntry?
}
return base.DispatchTouchEvent(e);
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Say I have a Custom Entry control:
I am able to check if that CustomEntry is an EditText when configuring handlers:
In MainActivity.cs I am overriding the DispatchTouchEvent and I can check if the current focus is an EditText. In the above code I was able to check if my CustomEntry is an EditText, but is it possible to check if this EditText is a CustomEntry?
Beta Was this translation helpful? Give feedback.
All reactions