I am trying to programically set the background of my app with an image in my drawable-hdpi folder. It is only seeing the default ic_launcher file in R.drawable so when I go to set the background, its simply unexistant. I am using this class as a fragment class with a swipe menu so maybe that has something to do with it.
EDIT: I was able to set the background in my xml file, but I couldn't set the background in my oncreateview method.
public class inputClass extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.input_xml, container, false);
rootView.setBackgroundResource(R.drawable.hidden);
return rootView;
}