简体   繁体   中英

Cannot refresh ListView which gets data from JSON when click button from its Adapter in Android

I am new with this and I try to have a ListView which get data from JSON

I have in its Adapter a button which updates a MySQL field

I try to update the ListView by reloading it but nothing is displayed

viewHolder.Valid.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {

           final DailyCrud mycrud = new DailyCrud();
           mycrud.Extend(String.valueOf(id));

            Intent intent = new Intent(getContext(), Actions.class);

            getContext().startActivity(intent);

            ((Activity)getContext()).finish();


        }
    });

and I get a null exception message in a toast message, how I can fix this?

最后我明白了,那是一个拼写错误的Actions.class谢谢

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM