use of com.inceptai.dobby.ui.WifiFragment in project dobby-android by InceptAi.
the class MainActivity method onNavigationItemSelected.
@SuppressWarnings("StatementWithEmptyBody")
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_wifi_scan) {
ListenableFuture<List<ScanResult>> scanFuture = networkLayer.wifiScan();
Toast.makeText(this, "Starting wifi scan...", Toast.LENGTH_SHORT).show();
WifiFragment fragment = (WifiFragment) setupFragment(WifiFragment.class, WifiFragment.FRAGMENT_TAG);
fragment.setWifiScanFuture(scanFuture, threadpool.getExecutor());
} else if (id == R.id.nav_debug) {
DebugFragment fragment = (DebugFragment) setupFragment(DebugFragment.class, DebugFragment.FRAGMENT_TAG);
} else if (id == R.id.nav_fake_data) {
FakeDataFragment fragment = (FakeDataFragment) setupFragment(FakeDataFragment.class, FakeDataFragment.FRAGMENT_TAG);
} else if (id == R.id.nav_manage) {
} else if (id == R.id.nav_share) {
} else if (id == R.id.nav_send) {
} else if (id == R.id.about_wifi_expert) {
showAboutAndPrivacyPolicy();
} else if (id == R.id.feedback_wifi_expert) {
showFeedbackForm();
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
item.setChecked(false);
return true;
}
Aggregations