@OnClick({R.id.current_location_button}) public void onButtonClick(View view) { mUser.setSelectedLocation(null); SharedPrefUtil.storeProfileDescription(mUser, getActivity()); MenuItem actionRestart = ((BaseActivity) getActivity()).mNavigationView.getMenu().getItem(0); actionRestart.setChecked(true); ((BaseActivity) getActivity()).onNavigationItemSelected(actionRestart); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mUser = SharedPrefUtil.getUserProfile(getActivity()); mLocation = mUser.getSelectedLocation(); mAddresses = GeocoderUtil.GetAddressOfLocation(getActivity(), mLocation); setHasOptionsMenu(true); }