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

时间:2017-05-26 20:07:13

标签: android google-play

我应该如何提供EditText的ID来填充Google Play上的发布前报告的凭据(应用的Beta / Alpha版本)? 我试过了 @+id/editTextLogineditTextLoginR.id.editTextLogin并始终获取说明“错误的资源名称”。

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

1 个答案:

答案 0 :(得分:3)

As information icon says:

The Android resource name of the text field within your app where the given username should be entered.

AND Android Resources documentations says:

<resource name> is either the resource filename without the extension or the android:name attribute value in the XML element (for simple values).

So in your case editTextLogin will go in that field.


I would like to share my case as it is quite different than normal sign-in:

It is quite similar to Google sign-in. I am asking for username first and after validating it, on next fragment I am showing his/her name and designation and asking for password.

For above scenario I used two fragments. In Username fragment I kept one EditText with resource name username and next Button with resource name login and in other fragment (Password fragment) I used EditText with resource name password and again one Button with resource name login.

And this is how I provided my credentials: Pre-launch credential screenshot

Example Username field:

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

Example Password field:

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

Example Login button:

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