Refresh page or reload activity in android means once data entered, if someone want to clear the data and want to enter the new data can be done through this function. As in the project once data is entered by the farmers and want to edit the respective data can refresh the page through cancel button and can fill in the valid details again.
We can refresh the code by the following code on the click of the button.
first we have to give the intent of same activity i.e. intent from one to the same activity.
Intent refresh = new Intent(SoilQuality.this, SoilQuality.class);
After giving intent then we have to start our activity to proceed further.
startActivity(refresh);
Once activity is done and no longer required then we have to finish the activity by using the finish function.
finish();
Comments
Post a Comment