简体   繁体   中英

How to change a Button layout to its default layout on Android using Java

want to change back the layout from blue to the default layout using code

Assuming the reset button is what you want to use to do this:

  reset-button.setOnClickListener(new View.OnClickListener() {
     @Override
     public void onClick(View v) {
        Intent intent = getIntent();
        finish();
        startActivity(intent);
     }

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