0
I’m creating an app, in android, that has tabs. Each tab is a chat room. I took an example of a video about how to create app with Tabs, where the author, in addition to creating the app using a tabs template, he create a tab class for each of the tabs and an xml for each of them as well. In order to send a message, on a given tab, I would have to create the message sending method in the tab class of each of them, however, I am not able to make the proper "link" of the text field (Textview) in this class, because the command findoViewById() does not appear in the tab class!
package com.example.gustavo.vigilantescomunitarios;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class TabRua extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.tab_rua, container, false);
}
}
Tried to use the class Context?
– Henqsan
I’m sorry, but what do you mean?
– GustavoSevero
Take a look at this topical and see if it helps you.
– Henqsan
I did not understand, very well what has to be done kkkkk sorry
– GustavoSevero