的Json
swipe_container.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
@Override
public void onScrollChanged() {
if (parentPanelLL.getScrollY() == 0) {
swipe_container.setEnabled(true);
} else {
swipe_container.setEnabled(false);
}
}
});
的ListView
[
{
"_id": "5a6736a55c720e4593f74236",
"indigentApplicationDetails": {
"conditionsDetail": {
"foodDetail": {
"rating": {}
},
"clothingDetail": {
"rating": {}
},
"medicalDetail": {
"rating": {}
},
"shelterDetail": {
"rating": {}
}
},
"householdDetail": [
{
"currentApplicationRefNo": "1000048573",
"personDetail": {
"gender": "Male",
"surname": "Khabanya",
"initials": "S G",
"genderDisplay": "Male",
"personID": "125555",
"firstNames": "Siphiwo Gift",
"title": "37",
"relationship": "Other",
"titleDisplay": "Mr",
"idNo": "6706115835080",
"birthDate": "1967-06-11 00:00:00"
},
"incomeDetail": {
"amount": "0",
"budgetDetail": {
"otherIncome": "0",
"totalPersonIncome": "0",
"accountHolder": "true",
"propertyRenting": "0",
"uif": "0",
"previousWorkPension": "0",
"homeBusiness": "0.0",
"oldAgePension": "0",
"disabilityPension": "0.0"
}
},
"workSituationDetail": {
"skillCurrentDetail": {
"skillDetail": {}
},
"employmentDetail": {},
"skillDesiredDetail": {
"skillDetail": {}
},
"workDuration": "0"
},
"healthDetail": {
"mentalDefect": "false",
"disability": "false",
"poorHealthDetails": "0"
}
}
]
代码
<ListView
HasUnevenRows="True"
ItemsSource="{Binding ItemsSource}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Label TextColor="White" Text="{Binding IndigentApplicationDetails.householdDetail.currentApplicationRefNo}"/>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
答案 0 :(得分:1)
有几个原因导致您在屏幕上看不到任何内容:
for layer in model.layers[:15]:
layer.trainable = False
,但ItemsSource="{Binding ItemsSource}"
中没有名为ItemsSource
的此类属性。你应该绑定IndigentDetailsViewModels
IndigentDetails
应为Text="{Binding IndigentApplicationDetails.householdDetail.currentApplicationRefNo}"
答案 1 :(得分:0)
请检查下面的xaml代码并检查它是否确实适合你
<ListView HasUnevenRows="True" ItemsSource="{Binding IndigentDetails}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Padding="10">
<Label Text="{Binding currentApplicationRefNo}"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>