Newer
Older
IrisClient / app / src / main / java / org / ntlab / irisclient / MainActivity.java
package org.ntlab.irisclient;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        ActionBar actionBar = getSupportActionBar();
        if(actionBar != null) {
            actionBar.hide();
        }

        Button createButton =(Button)findViewById(R.id.create_room);
        createButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v){
                Intent intent = new Intent(MainActivity.this,CreateRoomActivity.class);
                startActivity(intent);
            }
        });

        Button entryButton =(Button)findViewById(R.id.entry_room);
        entryButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v){
                Intent intent = new Intent(MainActivity.this,EnterRoomActivity.class);
                startActivity(intent);
            }
        });


    }
}