Skip to content

Commit f108033

Browse files
committed
locagic change
1 parent edb10b9 commit f108033

File tree

1 file changed

+6
-24
lines changed

1 file changed

+6
-24
lines changed

app/src/main/java/com/pavel/responsecode/MainActivity.java

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,17 @@ protected void onCreate(Bundle savedInstanceState) {
2525
httpResponseCode = new HttpResponseCode(getApplicationContext() , true);
2626

2727
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
28+
29+
2830
fab.setOnClickListener(new View.OnClickListener() {
2931
@Override
3032
public void onClick(View view) {
31-
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
32-
.setAction("Action", null).show();
33-
httpResponseCode.checkResponse(100);
33+
34+
if (!httpResponseCode.checkResponse(100)){
35+
// do what ever you want
36+
}
3437
}
3538
});
3639
}
3740

38-
@Override
39-
public boolean onCreateOptionsMenu(Menu menu) {
40-
// Inflate the menu; this adds items to the action bar if it is present.
41-
getMenuInflater().inflate(R.menu.menu_main, menu);
42-
return true;
43-
}
44-
45-
@Override
46-
public boolean onOptionsItemSelected(MenuItem item) {
47-
// Handle action bar item clicks here. The action bar will
48-
// automatically handle clicks on the Home/Up button, so long
49-
// as you specify a parent activity in AndroidManifest.xml.
50-
int id = item.getItemId();
51-
52-
//noinspection SimplifiableIfStatement
53-
if (id == R.id.action_settings) {
54-
return true;
55-
}
56-
57-
return super.onOptionsItemSelected(item);
58-
}
5941
}

0 commit comments

Comments
 (0)