I need help..
I have two classes Class1.java and Class2.java. In Class1 one button(PAY) is there to goto Class2. Class2 is Billing Activity and it has one button to go back to Class1.
Button Color should changed when Billing is completed for current month. I want Class1 button to be disable from current date to 1st of next month and enable every 1st of month..
I have tried but havn't got anything...
This is my code..
Class1.java
Intent i=new Intent(Class1.this,Class2.class);<br>
startActivityForResult(i, 123);
protected void onActivityResult(int requestCode, int resultCode, Intent data){
super.onActivityResult(requestCode, resultCode, data);<br>
if (requestCode == 123) {
pay.getBackground().setColorFilter(ContextCompat.getColor(this,
R.color.Green), PorterDuff.Mode.MULTIPLY);
pay.setEnabled(false);
}
}
Class2.java
Intent i1=new Intent(Class2.this,Class1.class);<br>
setResult(123,i1);<br>