
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</RelativeLayout>
</LinearLayout>

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
리스트뷰 만들일이 생겨서 액티비티 생성하고 xml에 리스트뷰를 넣어주는데..
리스트뷰 태그를 넣으면 보여야할 items 목록이 안보이는겁니다.. 이전부터 리스트뷰 아이템 하나만 보이는
현상떄문에 고생하고 있던지라..또인가 싶어서 막막했습니다.
근데 코드가 최상위 레이아웃과 그 내부에 리스트뷰밖에 없는데 이상하다 싶어
프로젝트를 새로하나만들고 실험해보니 아이템뷰가 잘나오더군요.. 근데 진행하던 프로젝트에서는
안나옵니다..코드를 복사해서 붙여봐도 새로만든 테스트 프로젝트에서는 나오고 만들던 프로젝트에서는
안나와서 한참 골머리썩다가 차이점이 디자인탭에서의 액션바가 유일한 차이점이었습니다..
혹시나해서 디자인탭에서 눈깔모양 아이콘을 클릭하고 액션바를 없애주는 옵션을 선택하니..
아이템목록이 정상적으로 뜨는군요...--
사진 설명을 드리자면
첫번째 사진과 코드는 리스트뷰추가시 아이템목록이 보이지 않는 현상입니다. 리스트뷰의 hegith를
임의적으로 줘서 늘려봐도 안나오더군요
두번째 사진과 코드는 제가 이것저것 건드려보다가 리스트뷰를 RelativeLayout으로 감싸본것입니다.
근데 이때는 잘나오더네요.. 그래서 처음에 제가 리스트뷰 조건에 Relativelayout 내에 있어야하는 조건이 있
는줄 알고 착각했습니다..
세번째사진과 코드입니다 디자인탭에서 눈깔모양 아이콘선택후 액션바를 없애준후 결과입니다.
정상적으로 출력되네요..
이거 도대체 왜이런건가요? 단순 버그인건가요? 이것때문에 고생했네요 ㅠㅠ안그래도
리스트뷰 아이템이 하나만 나오는 현상때문에 해결못하고 다른것부터 진행하고 있던차라 암담했는데
이건 단순 버그인건가요..?ㅜㅜ 이런 현상은 왜 일어나나요?ㅠㅠ