0
I added two tabs to the main Activity layout, and created two java classes, one for each tab. So I took the buttons of Activity xml from main Activity and put it in the layout of Fragment, but I will use find view by id in the java class of Fragment and it didn’t work.
public class Fragmenta extends Fragment{
public ImageButton trans ;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate( R.layout.fragment_a, container, false );
trans = (ImageButton)findViewByID(R.id.imagem)
}
}
Instead of this ricycler View I used the image :
– Cleh Silvah