Switch between Gallery and a LinearLayout - ClassCastException
问题 Thanks for reading! I am building a custom Gallery app where the first thumbnail is an album cover displaying album details. Here's the flow: getView() { //inflate cover.xml which includes two textviews and an imageview. if(position == 0) //set some album-specific text else //set image-specific text } Here's the actual getView() code: public View getView(int position, View convertView, ViewGroup parent) { //TODO: Recycle view convertView = mInflater.inflate(R.layout.cover, null); TextView