-
Notifications
You must be signed in to change notification settings - Fork 0
/
notournament.java
55 lines (50 loc) · 1.6 KB
/
notournament.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package tinesandbarbs.tinesandbarbs;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
public class notournament extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_notournament);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.toolbar1, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.site:
login.a=6;
Intent j=new Intent(this,sitepage.class);
j.putExtra("page","notournament");
startActivity(j);
return(true);
case R.id.out:
shared();
startActivity(new Intent(this,login.class));
return(true);
}
return(super.onOptionsItemSelected(item));
}
public void button2(View view)
{
}
public void onBackPressed()
{
startActivity(new Intent(this,round.class));
}
public void shared() {
SharedPreferences sharedPreferences = getSharedPreferences(login.MyPREFERENCES, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.clear();
editor.apply();
}
}