0

RelativeLayout.setLayoutParams causes viewholder pattern to crash

view story
linux-howto

http://stackoverflow.com – Depending on the screen size I would like to dynamically set the height of a RelativeLayout. Another method would be to use setMinimumHeight() but I still wonder why this is crashing. public View getView(final int position, View convertView, ViewGroup parent) { ViewHolder vh; if (convertView == null) { convertView = mInflater.inflate(R.layout.question_row_inflater, null); vh = new ViewHolder(); // will store references to views vh.answerBlock = (RelativeLayout) convertView.findViewById(R.id.answerBlock); convertView.setTag(vh (HowTos)