LittleFunny
LittleFunny

Reputation: 8375

Xamarin Android: How to add android.support.v7.widget.SearchView in xaml

I am trying to use the SearchView in my application. I decided to use android.support.v7.widget.SearchView but the xamarin studio have an error when rendering the layout in the designer.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/lightGray">
<TextView
    android:id="@+id/weatherLocation"
    android:textStyle="bold"
    android:textColor="@color/material_grey_600"
    style="@android:style/TextAppearance.Large"
    android:layout_marginTop="@dimen/abc_action_bar_subtitle_bottom_margin_material"
    android:layout_marginBottom="@dimen/abc_action_bar_subtitle_bottom_margin_material"
    android:layout_marginLeft="@dimen/abc_action_bar_subtitle_bottom_margin_material"
    android:layout_alignParentTop="true"
    android:layout_alignParentStart="true"
    android:text=""
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />
<android.support.v7.widget.SearchView
    style="@style/SearchViewStyle"
    android:id="@+id/search"
    android:layout_width="300dp"
    android:layout_height="wrap_content"
    android:layout_alignTop="@+id/weatherLocation"
    android:layout_alignEnd="@+id/weatherLocation"
    android:layout_alignBottom="@+id/weatherLocation"
    android:layout_alignParentEnd="true" />

Message : Custom controls disabled. There was an internal issue with the rendering process.

Does that mean i have not installed the package? I can't see it on nuget in xamarin studio.

P.S. I can compile and run but will have inflating error.

Upvotes: 0

Views: 1068

Answers (1)

Darren Christopher
Darren Christopher

Reputation: 4779

The packages you installed should be found in 'Installed' tab. If you can not find it, yes, it means you have not installed the package. You should install it on NuGet, search for 'Xamarin.Android.Support.v7.SearchView' and download it.

Upvotes: 1

Related Questions