Hello Group,

I have created a custom ImageView to show icons in my list view items. The
idea is to show, perfectly square icons with each list view items. The
following is the code fragments I have.

public class IconView extends ImageView {

        public IconView(Context context, AttributeSet attrs, int defStyle) {
                super(context, attrs, defStyle);
        }

        @Override
        protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
                super.onMeasure(widthMeasureSpec, heightMeasureSpec);
                int height = getMeasuredHeight();
            setMeasuredDimension(height, height);
        }}


and the XML is,

<com.napster.widgets.IconView
            android:id="@+id/iv_order_status"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_marginRight="10dp"
            android:background="#567567"
            android:src="@drawable/ic_launcher" />


The problem with this approach is that, the rest of the views in the list
cell, goes out of display partially. I tried to invalidate() the
"convertView" in my adapter's getView() method, but it does not seem to
work. How to solve this problem?

-- 
Thanks & Regards
--
Subin Sebastian
http://in.linkedin.com/in/subinsebastien

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to