Exemplo n.º 1
0
  @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();
  }
Exemplo n.º 2
0
 @Override
 public void onConnected(Bundle bundle) {
   super.onConnected(bundle);
   if (!firstLaunchedPref.isSet()) {
     setUpGeofences();
     firstLaunchedPref.set("yes");
   }
 }
Exemplo n.º 3
0
 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());
   }
 }
Exemplo n.º 4
0
 public void onEvent(InputBottomBarLocationClickEvent event) {
   LocationActivity.startToSelectLocationForResult(this, LOCATION_REQUEST);
 }
 protected void onCreate(Bundle paramBundle) {
   super.onCreate(paramBundle);
   setToolbarTitle(null);
   requestLocationPermission();
 }