Newer
Older
CosmosClient / app / src / main / java / com / example / cosmosclient / views / JoinGroupByIDActivity.java
package com.example.cosmosclient.views;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.example.cosmosclient.R;

public class JoinGroupByIDActivity extends AppCompatActivity {
    private String GroupID=null;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_join_group_by_id);
        //テストでグループIDを出力
        final TextView result = (TextView)findViewById(R.id.IDresult);
        //buttonを取得
        Button btn = (Button)findViewById(R.id.button);
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //ボタンを押されると入力されたグループIDを取得
                EditText inputGroupID = (EditText)findViewById(R.id.inputGroupID);
                GroupID = inputGroupID.getText().toString();
                result.setText(GroupID);
            }
        });
    }
}