我正处于我要松开它的地步。
问题:我将GraphInWebView膨胀到名为 formDialog(其他文件)的布局中
formDialog.AddView(LayoutInflater.Inflate(Resource.Layout.GraphInWebview, null));
仅此一项就完美了,但是一旦我尝试将LineItem膨胀到GraphInWebView的 @+id/SideWidget中,后者就永远不会显示。
我检查了源代码 - LineItem视图已膨胀,但并未嵌套在 SideWidget 中
我有以下 xml 文件。
GraphInWebview.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
  <WebView
      android:id="@+id/graphView"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:background="#00FF00"/>
  <LinearLayout
        android:id="@+id/SideWidget"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="#0000FF">
  </LinearLayout>
</LinearLayout>
lineItem.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
       android:orientation="vertical"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent">
  <RelativeLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content">
    <ImageView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:src="@drawable/Icon"
      android:maxHeight="5dp"
      android:maxWidth="5dp"
      android:id="@+id/icon"
      android:layout_alignParentBottom="true"
          android:layout_alignParentLeft="true"/>
    <TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Appointment: Appointment with Spur Cresta"
      android:id="@+id/appointmentTitle"
      android:minWidth="60dp"
      android:layout_alignParentBottom="true"
      android:layout_toRightOf="@+id/icon"/>
  </RelativeLayout>
  <TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Appointment: Appointment with Spur Cresta"
    android:id="@+id/appointmentText"
    android:minWidth="60dp"/>
</LinearLayout>
C#
        //First inflate views to be injected into the default action bar
        formDialog.AddView(LayoutInflater.Inflate(Resource.Layout.googleGraphInWebview, null));
        manageScheduleButton = (Button)FindViewById(Resource.Id.ManageButton);
        locationalServicesButton = (Button)FindViewById(Resource.Id.LocationalServicesButton);
        myProfileButton = (Button)FindViewById(Resource.Id.MyProfileButton);
        myClientsButton = (Button)FindViewById(Resource.Id.MyClientsButton);
        manageScheduleButton.Click += ManageScheduleMenuClick;
        locationalServicesButton.Click += locationalServicesButtonClick;
        myProfileButton.Click += myProfileButtonClick;
        myClientsButton.Click += myClientsButtonClick;
        formDialog.SetMinimumHeight(400);
        WebView graph = FindViewById<WebView>(Resource.Id.graphView);
        LinearLayout sideWidget = FindViewById<LinearLayout>(Resource.Id.SideWidget);
        sideWidget.AddView(LayoutInflater.Inflate(Resource.Layout.LineItem, null));
        graph.Settings.JavaScriptEnabled = true;
        graph.SetWebViewClient(new webView(formDialog));
        graph.LoadUrl("file:///android_asset/graph.html");
任何人都可以建议解决这个问题的方法吗?
问候
一种