SwipeStack icon indicating copy to clipboard operation
SwipeStack copied to clipboard

cannot use with Picasso ?

Open korrio opened this issue 9 years ago • 2 comments

my card.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    android:layout_height="match_parent"
    android:layout_width="match_parent"
    card_view:cardCornerRadius="@dimen/card_corner_radius"
    card_view:cardElevation="@dimen/elevation_large">

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/ivCard"
            android:src="@drawable/placeholder" />
        <TextView
            android:id="@+id/textViewCard"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center"
            android:textSize="44sp"
            android:text="@string/dummy_text"/>

    </RelativeLayout>



</android.support.v7.widget.CardView>

my adapter

...
@Override
        public View getView(final int position, View convertView, ViewGroup parent) {
            holder = null;
            if (convertView == null) {
                holder = new ViewHolder();
                convertView = getLayoutInflater().inflate(R.layout.card, parent, false);
                convertView.setTag(holder);
            } else {
                holder = (ViewHolder) convertView.getTag();
            }

            holder.ivCard = (ImageView) convertView.findViewById(R.id.ivCard);
            Picasso.with(mContext).load(mData.get(position).getUrl()).resize(480, 480).centerCrop().into(holder.ivCard);
            Log.e("555",mData.get(position).getUrl());

            holder.tvCard = (TextView) convertView.findViewById(R.id.textViewCard);
            holder.tvCard.setText(mData.get(position).getWho());

            return convertView;
        }

        public class ViewHolder {
            ImageView ivCard;
            TextView tvCard;
        }
...

it only display the text (from the internet but no luck with ImageView to display image (from URL) via Picasso)

korrio avatar Mar 03 '16 07:03 korrio

+1 Same problem here.

Wafel avatar Aug 30 '16 07:08 Wafel

Strange. I'm Picasso and it works. Is the swipe stack taking the entire screen space? Along with setting wrap_content in height and width of imageview, try and set and minimum height and width in the imageview. If it displays the image (or part of it), that might mean the swipe stack hasn't inflated to the size required by the imageview.

crearo avatar Aug 30 '16 13:08 crearo