Соответствует родительскому родителю?

Говорить ответ по-разному; убедитесь, что отсутствуют отсутствующие родительские узлы или неправильные узлы.

This Failed:

Нет родителя (или неправильного родителя) для дочернего узла 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>
0
задан Iaka Noe 16 January 2019 в 17:42
поделиться

1 ответ

Я не могу найти 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>

.
.
.
0
ответ дан Markus Rollmann 16 January 2019 в 17:42
поделиться
Другие вопросы по тегам:

Похожие вопросы: