1234567891011121314151617181920212223242526272829 |
- package com.drinkertea.test2smack;
- import androidx.appcompat.app.AppCompatActivity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.view.View;
- import android.widget.LinearLayout;
- import android.widget.TextView;
- import org.jivesoftware.smack.packet.Message;
- public class rooms extends AppCompatActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_rooms);
- }
- public void goToRoom(View view) {
- LinearLayout linearLayout = (LinearLayout) view;
- TextView textView = (TextView) linearLayout.getChildAt(1);
- String room_name = textView.getText().toString();
- XMPPClass.XMPP_JoinRoom(room_name, "Evgen Polivanov");
- Intent intent = new Intent(this, Room.class);
- startActivity(intent);
- }
- }
|