Hello,
You can save the button's previous BackgroundTinitList
with property. Before you want to reset it.
For example, you can save the BackgroundTinitList in the OnCreate method.
ColorStateList OriginalColorStateList;
protected override void OnCreate(Bundle? savedInstanceState)
{
base.OnCreate(savedInstanceState);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.activity_main);
button1= FindViewById<Button>(Resource.Id.button1);
OriginalColorStateList = button1.BackgroundTintList;
...
}
Then, you want to reset it. You can use button1.BackgroundTintList = OriginalColorStateList;
.
By the way, if you still cannot reset it, please share a mini demo with us.
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.