Android 如何使用文本值编号/日期为Nativescript添加用户标签
我想显示bindingcontex数组中的数字或日期。使用此代码:Android 如何使用文本值编号/日期为Nativescript添加用户标签,android,label,nativescript,Android,Label,Nativescript,我想显示bindingcontex数组中的数字或日期。使用此代码: <ListView items="{{ pakets }}" itemTap="onTap"> <ListView.itemTemplate> <grid-layout rows="220, *, *, *" columns="*" id="cardReport" tap="goReport"> <image row="0" src="{{
<ListView items="{{ pakets }}" itemTap="onTap">
<ListView.itemTemplate>
<grid-layout rows="220, *, *, *" columns="*" id="cardReport" tap="goReport">
<image row="0" src="{{ foto }}" stretch="aspectFill"/>
<Label row="1" text="{{ textValue }}" />
<Label row="2" text="{{ numberValue }}" />
<Label row="3" text="{{ dateValue }}" />
</grid-layout>
</ListView.itemTemplate>
</ListView>
数组pakets
来自JSON,值为textValue
='XXXX',numberValue
=3000,dateValue
='2016-06-04'
numberValue和dateValue均不显示,但textValue显示在屏幕上
有什么问题吗?如何在标签Nativescript中使用名称或日期
无论如何谢谢我在一个测试应用程序中测试了这个;我有以下代码,非常接近未修改的代码: 以下是XML:
<Page id="Page" onloaded="pageLoaded" class="">
<ListView items="{{ pakets }}" itemTap="onTap">
<ListView.itemTemplate>
<grid-layout rows="220, *, *, *" columns="*" id="cardReport" tap="goReport">
<image row="0" src="{{ foto }}" stretch="fill"/>
<Label row="1" text="{{ textValue }}" />
<Label row="2" text="{{ numberValue }}" />
<Label row="3" text="{{ dateValue }}" />
</grid-layout>
</ListView.itemTemplate>
</ListView>
</Page>
下面是它的外观:从上面的数据可以看出,我有文本、数字、文本日期,第二行数据有文本、数字和一个实际日期字段
我在一个测试应用程序中对此进行了测试;我有以下代码,非常接近未修改的代码: 以下是XML:
<Page id="Page" onloaded="pageLoaded" class="">
<ListView items="{{ pakets }}" itemTap="onTap">
<ListView.itemTemplate>
<grid-layout rows="220, *, *, *" columns="*" id="cardReport" tap="goReport">
<image row="0" src="{{ foto }}" stretch="fill"/>
<Label row="1" text="{{ textValue }}" />
<Label row="2" text="{{ numberValue }}" />
<Label row="3" text="{{ dateValue }}" />
</grid-layout>
</ListView.itemTemplate>
</ListView>
</Page>
下面是它的外观:从上面的数据可以看出,我有文本、数字、文本日期,第二行数据有文本、数字和一个实际日期字段
CSS上的问题。我谨此陈辞:
label {
font-family: 'Roboto', Roboto;
}
还有工作。
谢谢@Nathanel先生关于CSS的问题。我谨此陈辞:
label {
font-family: 'Roboto', Roboto;
}
还有工作。
谢谢@Nathanel先生谢谢@Nathanel。我会检查我的项目。多谢了,汉克斯·纳撒尼尔。我会检查我的项目。谢谢