首页 文章

Google Play预发布报告 - 资源名称

提问于
浏览
8

我应该如何提供EditText的ID来填充Google Play上的发布前报告的凭据(应用的Beta / Alpha版本)?我试过 @+id/editTextLogineditTextLoginR.id.editTextLogin 并且总是得到描述"wrong resource name" .

什么是资源名称的正确架构?

1 回答

  • 2

    正如信息图标所示:

    应用程序中应输入给定用户名的文本字段的Android资源名称 .

    AND Android Resources documentations说:

    <resource name>是没有扩展名的资源文件名或XML元素中的android:name属性值(对于简单值) .

    所以在你的情况下 editTextLogin 会进入那个领域 .


    我想分享我的案例,因为它与正常登录完全不同:

    它与Google登录非常相似 . 我首先要求用户名,并在验证后,在下一个片段中我显示他/她的名字和名称并要求输入密码 .

    对于上面的场景我使用了两个片段 . 在用户名片段中,我保留了一个 EditText ,其资源名称为 username ,下一个 Button ,资源名称为 login ,而在其他片段(密码片段)中,我使用 EditText ,资源名称为 password ,另一个 Button ,资源名称为 login .

    这就是我提供我的凭据的方式:
    Pre-launch credential screenshot

    示例 Username 字段:

    <android.support.v7.widget.AppCompatEditText
        android:id="@+id/username"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
    

    示例 Password 字段:

    <android.support.v7.widget.AppCompatEditText
        android:id="@+id/password"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="textPassword" />
    

    示例 Login 按钮:

    <android.support.v7.widget.AppCompatButton
        android:id="@+id/login"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="8dp" />
    

相关问题