I have a fragment and need within it some of the functions of AppCompatActivity, how to implement the two in the same class?
You're like this:
public class clientes extends Fragment {
I've tried:
public class clientes extends Fragment implementes AppCompatActivity{
Or vise versa.
If it is not possible to do, how do I do this check:
ConnectivityManager connMgr = (ConnectivityManager)
getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
if (networkInfo != null && networkInfo.isConnected()) {
The getSystemService is red, and you can not use it in the fragment Also, I need to use the:
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view =
act.getLayoutInflater().inflate(R.layout.lista_curso_personalizada,
parent, false);
The getLayoutInflater () also turns red, shows that it can not be used in a