last day (14 days later) » 

7:39 PM
0
Q: Change Password Activity

tuniprocoderI have a problem in this app, it show me "Unfortunately, app has stopped" MainActivity.class package ahmedchtn.stockmanager; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button;...

 
Please look in the logcat and post the exception with stacktrace
Also, you posted your MainActivity twice, instead of your PasswordChange class.
 
Display the log trace
 
I have added it @RakshitNawani
 
What is Line 28 in PasswordChange Activity?
 
@DavidWasser Thanks, I have changed the code
@RakshitNawani It is
bchange.setOnClickListener(new View.OnClickListener() {
 
7:39 PM
Is your support library upto date ? as this error persists when support library is less then 21. Please check and verify
 
@RakshitNawani yes it is updated
 
Please also post activity_password_change.xml
 
Show me your XML file of PasswordChange activity
Try removing android:onClick="onClick" from your XML file and then run code again
 
it still .I have this error
ViewRootImpl #2 Surface is not valid.
 
Why are you using startActivity at the onCreate of PasswordChange class ? It will always send false to your MainActivity
 
7:39 PM
@tuniprocoder See my updated answer below.
 
@tuniprocoder, why do you have startActivity(..) in your onCreate(..) ?
 
I use it to pass oldpassword to PasswordChange.class
 
@tuniprocoder, but you're already in the PasswordChange.class Can you try removing startActivity(..) in the onCreate(..) of the PasswordChange.class
 
Ah, I use it to send the boolean value to MainActivity to check whether there is passowrd change or not
 
But that doesn't make any sense. As soon as that activity is created you're starting your original activity.
 
7:39 PM
I did not understand
 
What's line 46 of MainActivity?
 
@HuskyHuskie bmain = intentbool.getBooleanExtra("bool", bmain); - See my updated answer.
 
I have deleted the boolean , I think the idea is clear ? it still some resolutions .Can you help me please on the code ?
Can someone give me updated resolved code I think it is simple now?
@Wilder Have you any idea? I think it is not ambigious now the code?
 
@tuniprocoder I didn't say you needed to delete the boolean, only change it from an object to a primitive.
 

last day (14 days later) »