I have a fragment that is suppose to populate a background with an Imageview that is created with Picasso.
public class Fragment1 extends SherlockFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Context c = getActivity().getApplicationContext();
View myFragmentView = inflater.inflate(R.layout.home, container, false);
TextView text = (TextView) myFragmentView.findViewById(R.id.text);
ImageView imageView = (ImageView) myFragmentView.findViewById(R.id.image);
String url = ModalScreens.byId(1).getBackgroundImagePath();
Picasso.with(c).load(url).fit().into(imageView);
return myFragmentView;
}
}
I can't figure out what I am doing wrong but the image wont load.