Search in sources :

Example 1 with BackPressCloseHandler

use of com.alphago.alphago.handler.BackPressCloseHandler in project Alphago by Onedelay.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    backPressCloseHandler = new BackPressCloseHandler(this);
    findViewById(R.id.btn_recognition).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            new ImageSelectionMethodDialog().show(getSupportFragmentManager(), "dialog");
        }
    });
    findViewById(R.id.btn_card_book).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent intent = new Intent(MainActivity.this, CardBookActivity.class);
            startActivity(intent);
        }
    });
    findViewById(R.id.btn_game).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            new GameModeSelectionDialog().show(getSupportFragmentManager(), "dialog");
        }
    });
    findViewById(R.id.btn_collection).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent intent = new Intent(MainActivity.this, CollectionActivity.class);
            startActivity(intent);
        }
    });
}
Also used : GameModeSelectionDialog(com.alphago.alphago.fragment.GameModeSelectionDialog) Intent(android.content.Intent) View(android.view.View) BackPressCloseHandler(com.alphago.alphago.handler.BackPressCloseHandler) ImageSelectionMethodDialog(com.alphago.alphago.fragment.ImageSelectionMethodDialog)

Aggregations

Intent (android.content.Intent)1 View (android.view.View)1 GameModeSelectionDialog (com.alphago.alphago.fragment.GameModeSelectionDialog)1 ImageSelectionMethodDialog (com.alphago.alphago.fragment.ImageSelectionMethodDialog)1 BackPressCloseHandler (com.alphago.alphago.handler.BackPressCloseHandler)1