Говорить ответ по-разному; убедитесь, что отсутствуют отсутствующие родительские узлы или неправильные узлы.
Нет родителя (или неправильного родителя) для дочернего узла ItemsPanelTemplate
<ItemsControl ItemsSource="{Binding TimeSpanChoices}">
<ItemsPanelTemplate>
<UniformGrid Rows="1" />
</ItemsPanelTemplate>
...
</ItemsControl>
<ItemsControl ItemsSource="{Binding TimeSpanChoices}">
<ItemsControl.ItemsPanel> <!-- I am the missing parent! -->
<ItemsPanelTemplate>
<UniformGrid Rows="1" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
...
</ItemsControl>
Я не могу найти RelativeLayout
в вашем коде. Но когда вы делаете это так, RelativeLayout
должен охватывать весь экран
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".PedidosActivity">
<RelativeLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorAccent">
</RelativeLayout>
.
.
.