Xamarin android xml(xmlns:app =“https://schemas.android.com/apk/res-auto”)命名空间不起作用

时间:2017-12-01 13:05:51

标签: c# android user-interface xamarin xamarin.android

我正在使用xamarin android cheesebaron向上滑动面板进行我的应用程序的主要活动。我想改变灰色面板的折叠高度(基本上,这样做,因此在首次显示时需要大约一半的屏幕)。我已经读过我应该将xmlns:app =“https://schemas.android.com/apk/res-auto”包含到cheesebaron布局中并使用xml属性app:collapsedHeight。但是,“app”xml命名空间的所有元素都没有起作用。任何想法为什么没有“app”命名空间属性不起作用?

This is how the main page looks, I want the grey panel to be bigger

<?xml version="1.0" encoding="utf-8"?>
    <cheesebaron.slidinguppanel.SlidingUpPanelLayout 
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="https://schemas.android.com/apk/res-auto"
    android:id="@+id/sliding_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="bottom"
    app:collapsedHeight="400dp"
    app:shadowHeight="40dp"
    app:slidingEnabled="false"
    app:fadeColor="FFDDAADD">
    <!-- Main content -->
    <fragment
    android:id="@+id/map"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:name="com.google.android.gms.maps.MapFragment"
            />
    <!-- Sliding panel -->
        <LinearLayout
            android:background="#444444"
            android:id="@+id/topBars"
        android:layout_width="match_parent"
        android:orientation="vertical"
        android:layout_height="match_parent">
        </LinearLayout>

</cheesebaron.slidinguppanel.SlidingUpPanelLayout>

0 个答案:

没有答案
相关问题