CopyPastor

Detecting plagiarism made easy.

Score: 1.7824068069458008; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2014-02-14
by Nayan Rath

Original Post

Original - Posted on 2013-11-01
by Lalit Jawale



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Hey I think it May Help you to get your solution :
Just write this code on your button EXIT click.
Intent intent = new Intent(getApplicationContext(), MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putExtra("LOGOUT", true); startActivity(intent);
And in the **onCreate()** method of your MainActivity.class write below code as a first line,
if (getIntent().getBooleanExtra("LOGOUT", false)) { finish(); }
<b>Just write this code on your button EXIT click.</b>
Intent intent = new Intent(getApplicationContext(), MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putExtra("LOGOUT", true); startActivity(intent);
<b>And in the <i>onCreate()</i> method of your <i>MainActivity.class</i> write below code as a first line,</b>
if (getIntent().getBooleanExtra("LOGOUT", false)) { finish(); }

        
Present in both answers; Present only in the new answer; Present only in the old answer;