How to make a Button clickable only once in a day
NickName:Dude Ask DateTime:2014-06-30T17:13:49

How to make a Button clickable only once in a day

i have a button through which a customer can claim his daily rewards. i want that button to be clicked only once a day. how could i do this?

i have no idea how to achieve this functionality

i know i can set it View.gone but i want it to be visible again next day.what should come in the on click of button to get one day time

here is on click of my button what should i do?

@Override
public void onClick(View v) {
    super.onClick(v);
    switch (v.getId()) {
    case R.id.creditClaimBT: {

        break;
    }
    }
}

help would be greatly appreciated.

Copyright Notice:Content Author:「Dude」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/24486644/how-to-make-a-button-clickable-only-once-in-a-day

Answers
PKlumpp 2014-06-30T09:15:59

When your button was clicked, write the date of the event into SharedPreferences. If somebody clicks the button, check if the current date is already saved in SharedPreferences. Done.",


More about “How to make a Button clickable only once in a day” related questions

How to make button clickable only once in actionscript?

I have two scenes in Flash. In the first I have a button and if somebody click on that button it goes to the second scene. In the second scene I remove the button with an image so it is not click...

Show Detail

How to make a Button clickable only once in a day

i have a button through which a customer can claim his daily rewards. i want that button to be clicked only once a day. how could i do this? i have no idea how to achieve this functionality i kno...

Show Detail

Flutter Habit Tracker - How to make a button clickable only once a day

I want to build a habit tracker for myself and I want, that the buttons (habits) are clickable once a day.

Show Detail

I have a Button For Submission Attendance I Want to click a button in a day

I have a Button For Submission Attendance I Want to click a button in a day . I want the button to click only once per day. For example you can't click the button for a second time again. Here's my...

Show Detail

Only can Click the Button for one time per day

I have a button with numeric values of 100. A total number will be displayed on the page. When I click on the "Add 100", it will update and display on the page. I want the button to click only o...

Show Detail

Vanilla Javascript : how to make a button clickable once only

I have a quiz app application that I am working on that dynamically creates 2-4 buttons for the answer. However, if you click on an answer, you can keep clicking on the same answer or keep clicking...

Show Detail

Make button clickable after state changes

So I have this count where I will increment once the button with handleFollow() is clicked (i have multiple buttons with handleFollow() and I'm only showing one here). How do keep track of the coun...

Show Detail

How do i make a div/iframe clickable only once

The title says it all : How do i make a div/iframe clickable only once Im stuck with this for a long time,so I decided to ask for a little help. Please,if you wanna help,put the whole script in h...

Show Detail

Flutter Button It should be pressed once in a day

Is there any where I can make a button to be pressed only once in a day. You cannot press that button again in that day. you need to wait till next day inorder to press it again

Show Detail

Only make it clickable if....?

I have an application, where you can click on the background, and it's changes from the drawables to another background, but I only want to make it clickable when the user click on a button that i ...

Show Detail