-
Notifications
You must be signed in to change notification settings - Fork 0
/
groupchatpage.java
31 lines (24 loc) · 976 Bytes
/
groupchatpage.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.example.chat;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import androidx.appcompat.app.AppCompatActivity;
public class groupchatpage extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_groupchatpage);
Button btn = (Button)findViewById(R.id.go);
btn.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
EditText text = (EditText)findViewById(R.id.newgroup);
String roomName = text.getText().toString();
Intent i = new Intent(groupchatpage.this, MainActivityChat.class);
i.putExtra("chatroomname", roomName);
startActivity(i);
}
});
}
}