Skip to content

Commit

Permalink
pushing shit
Browse files Browse the repository at this point in the history
  • Loading branch information
kdagley14 committed Nov 14, 2017
1 parent 585fa0c commit 9d6bf70
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 27 deletions.
1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -41,7 +41,7 @@ protected void onCreate(Bundle savedInstanceState) {
//the objects from the layout
final EditText etDate = (EditText) findViewById(R.id.etDate);
final EditText etLocationType = (EditText) findViewById(R.id.etLocationType);
final EditText etZipCode = (EditText) findViewById(R.id.etZipCode);
final EditText etZipCode = findViewById(R.id.etZipCode);
final EditText etAddress = (EditText) findViewById(R.id.etAddress);
final EditText etCity = (EditText) findViewById(R.id.etCity);
final EditText etBorough = (EditText) findViewById(R.id.etBorough);
Expand All @@ -65,23 +65,8 @@ protected void onCreate(Bundle savedInstanceState) {
*/
@Override
public boolean onNavigationItemSelected(MenuItem menuItem) {
switch (menuItem.getItemId()) {
case(R.id.reports_list):
Intent reportsListIntent = new Intent(CreateReportActivity.this, HomeActivity.class);
startActivity(reportsListIntent);
break;
case(R.id.create_report):
Intent createReportIntent = new Intent(CreateReportActivity.this, CreateReportActivity.class);
startActivity(createReportIntent);
break;
case(R.id.view_map):
Intent viewMapIntent = new Intent(CreateReportActivity.this, MapActivity.class);
startActivity(viewMapIntent);
break;
case(R.id.logout):
Intent logoutIntent = new Intent(CreateReportActivity.this, MainActivity.class);
startActivity(logoutIntent);
}
NavigationDrawer nav = new NavigationDrawer();
nav.getActivityOptions(CreateReportActivity.this, menuItem);
return true;
}
});
Expand Down
Expand Up @@ -56,7 +56,7 @@ public void onClick(View v) {
* turns it into a new RatReport object.
*
* @param response id of object selected
* @throws e JSONException if occurs
* @throws JSONException if occurs
*/
@Override
public void onResponse(String response) {
Expand Down
Expand Up @@ -83,7 +83,8 @@ protected void onCreate(Bundle savedInstanceState) {
*/
@Override
public boolean onNavigationItemSelected(MenuItem menuItem) {
NavigationDrawer.getActivityOptions(GraphActivity.this, menuItem);
NavigationDrawer nav = new NavigationDrawer();
nav.getActivityOptions(GraphActivity.this, menuItem);
return true;
}
});
Expand All @@ -101,7 +102,8 @@ public boolean onNavigationItemSelected(MenuItem menuItem) {
* a JSON object if an ID corresponds with the entered String.
* It then updates graph with new entry.
*
* @param response String that should correspond with an id
* @param response String that should correspond with an id*
* @throws JSONException
*/
@Override
public void onResponse(String response) {
Expand Down
Expand Up @@ -34,7 +34,8 @@ protected void onCreate(Bundle savedInstanceState) {
nv.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(MenuItem menuItem) {
NavigationDrawer.getActivityOptions(GraphDateRangeActivity.this, menuItem);
NavigationDrawer nav = new NavigationDrawer();
nav.getActivityOptions(GraphDateRangeActivity.this, menuItem);
return true;
}
});
Expand Down
Expand Up @@ -10,7 +10,6 @@
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListAdapter;
import android.widget.ListView;
import com.android.volley.RequestQueue;
Expand Down Expand Up @@ -68,7 +67,8 @@ protected void onCreate (Bundle savedInstanceState) {
*/
@Override
public boolean onNavigationItemSelected(MenuItem menuItem) {
NavigationDrawer.getActivityOptions(HomeActivity.this, menuItem);
NavigationDrawer nav = new NavigationDrawer();
nav.getActivityOptions(HomeActivity.this, menuItem);
return true;
}
});
Expand All @@ -82,7 +82,7 @@ public boolean onNavigationItemSelected(MenuItem menuItem) {
* into a new JSONArray object.
*
* @param response String used to identify desired JSON object
* @throws e JSONException
* @throws JSONException e
*/
@Override
public void onResponse(String response) {
Expand Down
Expand Up @@ -67,7 +67,8 @@ protected void onCreate(Bundle savedInstanceState) {
*/
@Override
public boolean onNavigationItemSelected(MenuItem menuItem) {
NavigationDrawer.getActivityOptions(MapActivity.this, menuItem);
NavigationDrawer nav = new NavigationDrawer();
nav.getActivityOptions(MapActivity.this, menuItem);
return true;
}
});
Expand Down
Expand Up @@ -19,7 +19,7 @@ public class NavigationDrawer {
* @param currActivity current activity state of application
* @param menuItem new menu item object
*/
public static void getActivityOptions(AppCompatActivity currActivity, MenuItem menuItem) {
public void getActivityOptions(AppCompatActivity currActivity, MenuItem menuItem) {
final AppCompatActivity current = currActivity;
switch (menuItem.getItemId()) {
case (R.id.reports_list):
Expand Down

0 comments on commit 9d6bf70

Please sign in to comment.