Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xamarin.android MVVMCross w/Bugsense导致Android上绑定EditText出现奇怪的问题_Xamarin.android_Mvvmcross_Bugsense - Fatal编程技术网

Xamarin.android MVVMCross w/Bugsense导致Android上绑定EditText出现奇怪的问题

Xamarin.android MVVMCross w/Bugsense导致Android上绑定EditText出现奇怪的问题,xamarin.android,mvvmcross,bugsense,Xamarin.android,Mvvmcross,Bugsense,当我在MVVMCross应用程序上安装BugSense软件包时,我遇到了一个非常奇怪的情况。每次我在编辑文本中键入字母时,光标都会移动到第一个字符。这是非常恼人的,因为我必须用箭头指向字段的末尾才能输入下一个字符 我所做的是覆盖我的SplashScreenView的OnCreate,我设置了以下内容: protected override void OnCreate(Bundle bundle) { BugSenseHandler.Instance.InitAnd

当我在MVVMCross应用程序上安装BugSense软件包时,我遇到了一个非常奇怪的情况。每次我在编辑文本中键入字母时,光标都会移动到第一个字符。这是非常恼人的,因为我必须用箭头指向字段的末尾才能输入下一个字符

我所做的是覆盖我的SplashScreenView的OnCreate,我设置了以下内容:

    protected override void OnCreate(Bundle bundle)
    {
        BugSenseHandler.Instance.InitAndStartSession(new ExceptionManager(), ApplicationContext, "xxxxxxxx");
        base.OnCreate(bundle);
    }
当我的闪屏消失时,它会移动到我的LoginView模型。我的登录视图的axml如下所示:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/white_full_box">
    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_centerHorizontal="false"
        android:layout_centerInParent="true"
        android:layout_marginBottom="@dimen/table_margin"
        android:layout_marginLeft="@dimen/table_margin"
        android:layout_marginTop="@dimen/dialog_margin"
        android:padding="@dimen/zero"
        android:background="@drawable/white_full_box">
        <EditText
            android:id="@+id/username"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_above="@+id/password"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="40dp"
            android:ems="10"
            android:hint="username"
            android:layout_marginLeft="@dimen/table_margin"
            android:inputType="textVisiblePassword"
            android:singleLine="true"
            local:MvxBind="Text UserName">
            <requestFocus />
        </EditText>
        <EditText
            android:id="@+id/password"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true"
            android:ems="10"
            android:hint="password"
            android:layout_marginLeft="@dimen/table_margin"
            android:inputType="textPassword"
            local:MvxBind="Text Password" />
        <Button
            android:id="@+id/loginButton"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/password"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="40dp"
            android:layout_marginRight="@dimen/dialog_margin"
            android:text="Login"
            style="@style/ButtonStyle"
            local:MvxBind="Click LoginCommand" />
    </RelativeLayout>
</RelativeLayout>
我只是有一些普通属性,绑定到视图模型中的用户名、密码和登录按钮。我做了几件事来验证这种行为:

一,。我留下了bugsense初始化代码,并从用户名中删除了文本绑定。在这种情况下,用户名将正常工作,但密码字段将始终将字符移动到每个文本输入后的第一个字符

二,。我重新实现了用户名字段的文本绑定,然后注释掉了BugSense初始化代码,一切看起来都正常工作了


这里发生了什么?在MVVMCross应用程序中,我应该在哪里进行BugSense初始化?

我的解决方案是切换到Raygun.io,因为这似乎没有相同的问题


Bugsense似乎正在研究您可以关注的问题

如果我将Bugsense代码移动到我的LoginView的OnCreate覆盖中,我会得到相同的行为。。。。我现在将它移动到我的主视图的OnCreate覆盖,它似乎解决了这个问题,除非稍后在测试中出现其他东西。这并没有解决这个问题。现在,将StartAndInit移动到my MainView会导致在MainView之后创建的活动出现同样的问题。有什么想法吗?