Skip to content

Instantly share code, notes, and snippets.

@vestrel00
Created July 26, 2017 17:27
Show Gist options
  • Save vestrel00/a9ceb8b41ea2748ffc1a25684fa2008b to your computer and use it in GitHub Desktop.
Save vestrel00/a9ceb8b41ea2748ffc1a25684fa2008b to your computer and use it in GitHub Desktop.
A: 5 - ui/main/MainActivity.java
public final class MainActivity extends BaseActivity implements MainFragmentListener {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
if (savedInstanceState == null) {
addFragment(R.id.fragment_container, new MainFragment());
}
}
@Override
public void onExample1Clicked() {
// TODO start example 1 activity
Toast.makeText(this, "Launch example 1", Toast.LENGTH_SHORT).show();
}
@Override
public void onExample2Clicked() {
// TODO start example 2 activity
Toast.makeText(this, "Launch example 2", Toast.LENGTH_SHORT).show();
}
@Override
public void onExample3Clicked() {
// TODO start example 3 activity
Toast.makeText(this, "Launch example 3", Toast.LENGTH_SHORT).show();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment