버튼을 누르면 리니어 레이아웃 화면이 나오건드요.

그런데 제가 만든 그리드뷰와 리니에레이아웃 창을 같이 띄우고 싶은데 그러면 어떻게 해야되나요?

 

그리두뷰 프로젝트에서 가져온 GridViewActivity.java와 ImageAdapter.java와 main.xml을

SendLabAcitivity프로젝트로 가져와서 합치려고합니다.

SendLabAcitivity프로젝트에서는 ReceiveLabActivity.java 와SendLabActivity.java 두개가 있구요. 버튼을 누르면 나오는 화면 receive.xml파일 이 있는데 이 receive.xml 파일에 그리드뷰프로젝트에서 가져온 main.xml을 합치고싶습니다.

어케해야되는지 모르겠네요..

 

 

 

그리드뷰 메인xml

<GridView xmlns:android="http://schemas.android.com/apk/res/android"
 android:id="@+id/gridview"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:columnWidth="20dp"
 android:numColumns="16"
 android:verticalSpacing="1sp"
 android:horizontalSpacing="1dp"
 android:stretchMode="columnWidth"
 android:gravity="center"
 />

 

 

 

receive.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"
    >
   
    <LinearLayout
     android:orientation="horizontal"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     >
     <TextView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="@string/title"
      />
      
      <LinearLayout
       android:orientation="horizontal"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       >
       <TextView
        android:layout_width="60sp"
        android:layout_height="wrap_content"
        android:text="@string/name"
        />
        
        <TextView android:id="@+id/tv_name"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         />
       </LinearLayout>
     </LinearLayout>
     
     <LinearLayout
      android:orientation="horizontal"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      >
      <TextView
       android:layout_width="60sp"
       android:layout_height="wrap_content"
       android:text="@string/matrix"
       />
       <TextView android:id="@+id/tv_matrix"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         />
     </LinearLayout>
     <LinearLayout
      android:orientation="horizontal"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:gravity="right"
            >
            <Button android:id="@+id/button_prev"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="변환"
             />
        </LinearLayout>
</LinearLayout>