Good, I'm trying to add an image in the application through Glide or piccasa and it gives me both the same error and I do not know why -
The specified child already has a parent. You must call removeView () on the child's first parent.
I think it fails me because I do not take the context well
It is a class that inherits from Fragment
.
Setting v.getContext()
, getActivity()
or this
in with()
, gives the same error always
public class Premios extends Fragment {
public static final String URL = "http://frasesconindirectas.com/wp-content/uploads/2016/10/Im%C3%A1genes-para-Celular-Divertidas-con-Movimiento.jpg";
ImageView image;
public Premios() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragment_premios, container);
image = (ImageView) v.findViewById(R.id.imageView2);
Glide.with(this).load(URL).into(image);
return v;
}
Let's see if anyone knows why T-T