Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to refresh the action text #142

Open
xcw0579 opened this issue May 17, 2016 · 0 comments
Open

Fail to refresh the action text #142

xcw0579 opened this issue May 17, 2016 · 0 comments

Comments

@xcw0579
Copy link

xcw0579 commented May 17, 2016

when I using such the follow code:

Card card = new Card.Builder(this)
            .withProvider(new CardProvider())
            .setLayout(R.layout.material_image_with_buttons_card)
            .setTitle("Card number 5")
            .setDescription("Lorem ipsum dolor sit amet")
            .setDrawable(R.drawable.photo)
            .addAction(R.id.left_text_button, new TextViewAction(this)
                    .setText("Izquierda")
                    .setTextResourceColor(R.color.black_button)
                    .setListener(new OnActionClickListener() {
                        @Override
                        public void onActionClicked(View view, Card card) {
                                    TextViewAction act = (TextViewAction) card.getProvider().getAction(R.id.right_text_button);
                                    act.setText(act.getText()+"e");    // the other action text modified here 
                        }
                    }))
            .addAction(R.id.right_text_button, new TextViewAction(this)
                    .setText("Derecha")
                    .setTextResourceColor(R.color.accent_material_dark)
                    .setListener(new OnActionClickListener() {
                        @Override
                        public void onActionClicked(View view, Card card) {

                        }
                    }))
            .endConfig()
            .build();

If you try this code in your own project, you will meet a problem:
Some card cannot be updated immediately, it always happen.But it can be updated by sliding the list.

It's a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant