Android.Widget.AutoCompleteTextView is a View from Android.
PCL Solution:
You cannot use View's specific platform for Xamarin Forms (PCL) ContentPage .
To use a specific View platform, you must use personalized rendering . There is a blog post from @JamesMontemagno that shows how to do what you need.
This code is a rough example, please use it as such.
1 - Create your own Xamarin.Forms control, which will display in Android as AutoCompleteTextView :
public class AutoCompleteView : View {
2 - In an Android project, add a renderer for AutoCompleteView :
[assembly: ExportRenderer(typeof(AutoCompleteView), typeof(AutoCompleteViewRenderer))] namespace App.Droid { public class AutoCompleteViewRenderer : ViewRenderer<AutoCompleteView, AutoCompleteTextView> {
Solution for a common project:
When using the Shared Project, it is possible to use Native Embedding , for example:
... var textView = new TextView (Forms.Context) { Text = originalText }; stackLayout.Children.Add (textView); contentView.Content = textView.ToView(); ...
source share