Android EditText Binding is broken after MvvmCross update from 4.2.3 to 4.4.0 with Linker enabled

烂漫一生 提交于 2019-12-03 15:39:21

The binding target for EditText and TextView uses the AfterTextChanged event, which probably gets linked away. Add that to your Include methods instead of TextChanged and it should work:

public void Include(TextView text)
{
    text.AfterTextChanged += (sender, args) => text.Text = "" + text.Text;
    text.Hint = "" + text.Hint;
    text.Click += (s, e) => text.Text = text.Text + "";
}

I don't think you need a separate method for EditText as EditText inherits from TextView.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!