SwipeStack icon indicating copy to clipboard operation
SwipeStack copied to clipboard

Can't change the card after it is created

Open ShBogdan opened this issue 10 years ago • 0 comments

I can't change the card after it is created. Can't add items programmatically. Nothing happens. Can you give me advice?

Here is a small example:


public class SwipeStackAdapter extends BaseAdapte
......
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
    if (convertView == null) {
        convertView = getLayoutInflater().inflate(R.layout.card, parent, false);
    }
    final LinearLayout linearLayout = (LinearLayout) convertView.findViewById(R.id.linearLayout);
    linearLayout.post(new Runnable() {
        @Override
        public void run() {
            TextView textView = new TextView(getApplication());
            textView.setText("I am a Text");
            textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 22);
            linearLayout.addView(textView);
        }
    });
    return convertView;
}

ShBogdan avatar Apr 21 '16 19:04 ShBogdan