Android .axml intellisense不支持库控件

cod*_*lla 8 intellisense android visual-studio android-layout xamarin

我目前正在使用VS2013/VS2015和Xamarin.Android - 我希望能够使用Android intellisense编辑布局.axml文件.我使用自动编辑器选择器(XML)来编辑文件.我的问题是,虽然默认的Android控件显示intellisense很好,只要我使用支持lib控件(就像android.support.v7.widget.Toolbar它打破文件的intellisense(不只是工具栏控件).

例如,使用以下代码,intellisense工作正常,直到我添加支持库工具栏:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
    a:orientation="vertical"
    a:layout_height="wrap_content"
    a:layout_width="fill_parent">
    <android.support.v7.widget.Toolbar xmlns:local="http://schemas.android.com/apk/res-auto"
        a:id="@+id/Routes_Add_SegmentList_Toolbar"
        a:layout_width="match_parent"
        a:layout_height="wrap_content"
        a:minHeight="?attr/actionBarSize"
        a:background="?attr/colorPrimary"
        local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        local:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
    <FrameLayout
        a:layout_height="wrap_content"
        a:layout_width="fill_parent"
        a:layout_marginTop="16dp">
        <ImageView
            a:layout_marginLeft="16dp"
            a:scaleType="fitCenter"
            a:layout_gravity="left|center_vertical"
            a:src="@drawable/start_pin"
            a:layout_height="40dp"
            a:layout_width="40dp" />
        <EditText
            a:layout_marginLeft="50dp"
            a:layout_marginRight="16dp"
            a:id="@+id/Routes_Add_SegmentList_StartSegment"
            a:layout_height="wrap_content"
            a:layout_width="fill_parent" />
    </FrameLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

有没有办法添加另一个xml架构或类似的,以便它可以正确处理非默认的android控件?谢谢!

Har*_*try 0

尝试

  • 导航到解决方案的根目录
  • 删除.vs文件夹(隐藏文件夹)
  • 重启VS
  • 开放解决方案
  • 打开 .axml 文件

尝试并分享您的想法是否有效。