SwipeStack
SwipeStack copied to clipboard
Can't change the card after it is created
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;
}