【发布时间】:2018-09-13 18:32:47
【问题描述】:
我们正在为我们的移动应用程序使用带有 angular 的 nativescript。我想使用 Google Play 发布前报告功能,但我们的应用需要输入密码。 Google Play 允许指定密码,但您需要一个资源名称,以便测试脚本可以识别密码的放置位置。
如何指定或接收 nativescript 文本字段的资源名称,无论是在视图中,还是通过代码隐藏或通过任何其他方式?
有问题的观点:
<StackLayout class="form">
<GridLayout columns="*,90" rows="50">
<TextField #inviteTx
col="0"
height="50"
autocorrect="false"
returnKeyType="next"
(returnPress)="enter(inviteTx.text)"
class="input input-border"
secure="false"
keyboardType="url">
</TextField>
<Button col="1" height="50" class="btn btn-primary w-full fa" text="START " (tap)="enter(inviteTx.text)"></Button>
</GridLayout>
</StackLayout>
我做了一些研究,发现在原生 android 中,one could add an id to a TextField by adding an android:id attribute。
<TextView android:id="@+id/nameTextbox"/>
这似乎在 nativescript 中不起作用,之后我在 R.java 中找不到资源。
【问题讨论】:
-
请看我的回答
标签: android google-play nativescript angular2-nativescript google-play-console