Hi,

I found strange behavior in ListView.
I have ListView of TextView except from one entry that contains
ImageView.
when i on of the items is touched and scroll up and down the image is
re-sized to about 2/3 its original size! Usually, the image remains in
this smaller size when the user lifts his finger and stops scrolling.
The original size can be restored by tapping your finger on any of the
empty list cells.

any idea?

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        xmlns:app="http://schemas.android.com/apk/res/com.jumptap.test";
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    >

        <ListView
                android:id="@+id/myList"
                        android:layout_width="fill_parent"
                        android:layout_height="300dip"/>
</RelativeLayout>

ListView lv = (ListView)findViewById(R.id.myList);
                lv.setAdapter(new BaseAdapter() {

                        @Override
                        public View getView(int position, View convertView, 
ViewGroup
parent) {

                                if (position==5) {
                                        return imgView;
                                } else {
                                        TextView tv = new 
TextView(TestActivity.this);
                                        tv.setText("Entry #"+position);
                                        tv.setMinimumHeight(50);
                                        tv.setBackgroundColor(Color.DKGRAY);
                                        return tv;
                                }
                        }

                        @Override
                        public long getItemId(int position) {
                                // TODO Auto-generated method stub
                                return position;
                        }

                        @Override
                        public Object getItem(int position) {
                                // TODO Auto-generated method stub
                                return null;
                        }

                        @Override
                        public int getCount() {
                                return 15;
                        }
                });


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to