안녕하세요

listview  두 개를 한 activity에 넣고 하나의 스크롤로 동작하게 하려고 합니다

알아보니 addfooterview나 addheaderview를 이용하는게 좋을 것같아

리스트뷰에 addfooterview로 리스트뷰를 포함한 뷰를 추가했습니다

그랬더니 추가된 리스트뷰가 전부가 나오지 않고 일부만 나옵니다

height도 fix로 줘보고 setMinimumHeigth인가? 그것도 써보고 했는데도

조절이 안되네요;;

출력시

title1
리스트1
title2
리스트2

형식으로

title1
리스트아이템1-1
리스트아이템1-2
title2
리스트아이템2-1
리스트아이템2-2

이렇게 나와야 하는데

title1
리스트아이템1-1
리스트아이템1-2
title2
리스트아이템2-1
리스트아이템2-2

이렇게 출력됩니다.

리스트1에 addheaderview로 title1 붙였고
title2와 리스트2는 하나의 view로 리스트1에 addfooterview로 추가했습니다.

java 파일
    public void onCreate(Bundle savedInstanceState) {
        requestWindowFeature(Window.FEATURE_NO_TITLE);
       
        super.onCreate(savedInstanceState);
        setContentView(R.layout.appsettingform);
       
        adapter1 = new AdapterUp(getApplicationContext());
        adapter2 = new AdapterDown(getApplicationContext());
       
        listView1 = (ListView) findViewById(R.id.setting_list1);
       
        TextView tv1 = new TextView(this);
        tv1.setWidth(250);
        tv1.setTextSize(20);
        tv1.setTextColor(R.color.text_color);
        tv1.setText("리스트");
        tv1.setClickable(false);
        tv1.setEnabled(false);
       
        listView1.addHeaderView(tv1);
        listView1.setAdapter(adapter1);
       
        View view = getLayoutInflater().inflate(R.layout.delapp, null, false);
        listView2 = (ListView)view.findViewById(R.id.setting_list2);
       
        listView2.setAdapter(adapter2);
       
        listView1.addFooterView(view);
        }

appsettingform.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:background="@color/back_white"
    >
        <LinearLayout
            android:paddingLeft="18px"
            android:paddingRight="18px"
            android:paddingBottom="20px"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical"
            android:id="@+id/card_manage"
            android:layout_centerHorizontal="true"
            >
                <ListView
                    android:id="@+id/setting_list1"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:drawSelectorOnTop="false"
                    android:choiceMode="none"
                    android:scrollbars="none"
                    android:scrollingCache="false"
                    android:clipToPadding="false"
                    android:fadingEdge="none"
                    android:clickable="false"
                    android:focusable="false"
                />
        </LinearLayout>
</LinearLayout>

delapp.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"
    android:background="@color/back_white"
    >
           

             <TextView
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textSize="20px"
                android:textColor="#000"
                android:layout_gravity="center_horizontal"
                android:clickable="false"
                android:focusable="false"
                android:text="삭제한 리스트"
                >
            </TextView>

             <ListView
                android:id="@+id/setting_list2"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:clickable="false"
                android:focusable="false"
                android:scrollbars="none"
                android:scrollingCache="false"
            />

</LinearLayout>