title: Lock a Button With timer displayed on the button in android studio
body: <p>I am Working on a android app in which I am displaying a rewarded video ad and want that button to be locked for 10 minutes, I want a timer to be displayed on button after one uses it, here is my java file</p>
  
  <pre><code>watch_video_buuton.setOnClickListener(new View.OnClickListener() {
  
       @Override
       public void onClick(View view) {
  
          Toast.makeText(Home_page.this,"Please tap more times to load the ad", Toast.LENGTH_LONG).show();
  
          if (mRewardedVideoAd.isLoaded()) {
                  mRewardedVideoAd.show();
          }
          else {
                  loadRewardedVideoAd();
         }
  
      }
   });
  
  
  @Override
  public void onRewardedVideoAdLoaded() {
  }
  
  @Override
  public void onRewardedVideoAdOpened() {
  
  }
  
  @Override
  public void onRewardedVideoStarted() {
  
  }
  
  @Override
  public void onRewardedVideoAdClosed() {
  
      loadRewardedVideoAd();
  
  }
  
  @Override
  public void onRewarded(RewardItem rewardItem) {
  
      Toast.makeText(Home_page.this,"Congratulations, you will get 1000 points next time you open the app ", Toast.LENGTH_LONG).show();
  
      SharedPreferences sp = getSharedPreferences("your_prefs", Activity.MODE_PRIVATE);
      SharedPreferences.Editor editor = sp.edit();
  
      int n =  myIntValue+1000;
      editor.putInt("your_int_key", n);
      editor.commit();
      user_id_child.child("scores").setValue(+n);
  
  }
  </code></pre>