package com.example.grghajj1.memecreator1;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class BottomPictureFragment extends Fragment {
private static View topMemeText;
private static View bottomMemeText;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.bottom_picture_fragment, container, false);
topMemeText = (TextView)view.findViewById(R.id.topMemeText);
bottomMemeText = (TextView)view.findViewById(R.id.bottomMemeText);
return view;
}
public void setMemeText(String top, String bottom){
topMemeText.setText(top);
bottomMemeText.setText(bottom);
}
compiler showserror: cannot find symbol method setText(String) and cannot resolve method setText(java.lang.String).
pls could some one let me know how to solve this problem
topMemeTextandbottomMemeTextasTextViewinstead ofViewbecausesetTextmethod is inTextViewinstead of in super class(View) of TextView