Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/202.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在android中调用选项卡框架中的其他布局或xml文件_Android_Xml_Layout - Fatal编程技术网

在android中调用选项卡框架中的其他布局或xml文件

在android中调用选项卡框架中的其他布局或xml文件,android,xml,layout,Android,Xml,Layout,在选项卡的框架内,我调用了一个具有first.xml文件的活动。在这里面我有两种不同的布局。我还有一个xml文件graph.xml。现在我正在将我的意图传递给另一个活动,我在其中设置了graph.xml的contentview,但我现在想要的是在我的第一个.xml文件中显示这个图 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk

在选项卡的框架内,我调用了一个具有first.xml文件的活动。在这里面我有两种不同的布局。我还有一个xml文件graph.xml。现在我正在将我的意图传递给另一个活动,我在其中设置了graph.xml的contentview,但我现在想要的是在我的第一个.xml文件中显示这个图

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"          
    android:layout_height="fill_parent"
    android:orientation="horizontal"          
    android:layout_width="fill_parent">
    <LinearLayout android:layout_width="fill_parent" android:id="@+id/linearfullview" android:layout_height="400sp" android:background="@drawable/background_full_view" android:layout_alignParentTop="true"/> 

    <LinearLayout android:layout_width="wrap_content" android:layout_height="180sp"
    android:layout_alignParentBottom="true" android:layout_marginTop="20sp">              
        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"                  
        android:layout_height="wrap_content"                  

        android:layout_width="wrap_content"                  
        android:paddingLeft="2dp"                  
        android:paddingRight="2dp"                  
        android:paddingTop="4dp" 
        android:gravity="bottom"                 
        android:layout_marginTop="30dp">                    
        <com.widget.WheelView 
        android:id="@+id/segment"                  
        android:layout_height="wrap_content"                  
        android:layout_width="100dp"/>                            
    </LinearLayout>

    </LinearLayout> 

        </RelativeLayout> 


我想在linearfullview线性布局中使用graph.xml布局。请建议您尝试过什么?您可能应该发布代码,以便我们可以看到您在做什么。是否要在单个选项卡中显示活动中的活动?LayoutFlater lInflator2=(LayoutFlater)getSystemService(Context.LAYOUT\u INFLATER\u SERVICE);RelativeLayout linearLayout2=(RelativeLayout)lInflator2.充气(R.layout.forecast,null);LinearLayout ly=(LinearLayout)linearLayout2.findViewById(R.id.linearfullview);LayoutInflater lInflator=(LayoutInflater)getSystemService(Context.LAYOUT\u INFLATER\u SERVICE);LinearLayout LinearLayout=(LinearLayout)lInflator.充气(R.layout.graph_layout,null);ly.addView(线性布局);setContentView(ly)@LalitPoptani我想在我在上面的xml文件中定义的linearfulview布局中显示graph_layout.xml。如果可以的话,你可以到休闲聊天室来向我解释。。