@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); initSortSpinner(); mRecyclerView = (RecyclerView) findViewById(R.id.my_recycler_view); mRecyclerView.setHasFixedSize(true); mLayoutManager = new LinearLayoutManager(this); mRecyclerView.setLayoutManager(mLayoutManager); mAdapter = new MyRecyclerViewAdapter(getDataSet()); // mAdapter.setOnItemClickListener(this); mRecyclerView.setAdapter(mAdapter); RecyclerView.ItemDecoration itemDecoration = new DividerItemDecoration(this, LinearLayoutManager.VERTICAL); mRecyclerView.addItemDecoration(itemDecoration); createEvent = (FloatingActionButton) findViewById(R.id.fab2); createEvent.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(MainActivity.this, New_Activity_A.class); startActivity(i); } }); init(); }
@Override public void onConnected(Bundle bundle) { super.onConnected(bundle); if (!firstLaunchedPref.isSet()) { setUpGeofences(); firstLaunchedPref.set("yes"); } }
public void onEvent(LocationItemClickEvent event) { if (null != event && null != event.message && event.message instanceof AVIMLocationMessage) { AVIMLocationMessage locationMessage = (AVIMLocationMessage) event.message; LocationActivity.startToSeeLocationDetail( this, locationMessage.getLocation().getLatitude(), locationMessage.getLocation().getLongitude()); } }
public void onEvent(InputBottomBarLocationClickEvent event) { LocationActivity.startToSelectLocationForResult(this, LOCATION_REQUEST); }
protected void onCreate(Bundle paramBundle) { super.onCreate(paramBundle); setToolbarTitle(null); requestLocationPermission(); }