List 뷰 스크롤 때문에 헤더를 이용해서 List뷰 위에 gallery를 붙였는데
gallerylayout = (LinearLayout)li.inflate(R.layout.....)
List.addheaderView(gallerylayout)
이런식으로요...
gallery에 adapter를 연결할때 imageview랑 text를 연결하고 싶어서
getview에
mInflater = (LayoutInflater)context.getSystemSevice(Context.Layout_Inflater_Service)
convertView = mInflater.inflate(layout, parent, false)
ImageView image = (ImageView)convertView.findViewById(R.id...)
이런식으로 헀는데
에러가 납니다.ㅠㅠ
이거 어떤식으로 연결해야 하나요..ㅠ 여기서 몇일째 해매고있어서요.ㅠ 좀도와주세요.ㅠㅠ
에러 내용은.
classcastexception..
android.widget.Gallery@layoutparams cannot be cast to android.widget.LinearLayout@LaoutParmas..
어디서 케스팅을시도하는지 잘 모르겠어서요...ㅠㅠ
제 생각에는 현재 레이아웃상에
|갤러리뷰|
----------
|리스트뷰|
이런식으로 레이아웃이 설정되어 있는거 같은데요.
레이아웃은
|리스트뷰|
이런식으로 잡고 갤러리 뷰는 다른 레이아웃을 만들어서
실제로 코드 상에서
View header = getLayoutInflater().inflate(R.layout.갤러리뷰레이아웃, (ViewGroup) findViewById(R.layout.리스뷰레이아웃));
요로코롬 한뒤에
리스트뷰에 add를 해주시면 되지 않을까 싶은데요.
이거 말고도 다른 방법이 있긴 한데, 일단 이게 제대로 되는지 확인하고 나서 안되면 댓글 달아주세요~




형변환문제인데... 소스는 제대로 못 봐서 잘 모르겠네요 ㅜㅜ