프래그먼트 사용시
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (container == null) {
// We have different layouts, and in one of them this
// fragment's containing frame doesn't exist. The fragment
// may still be created from its saved state, but there is
// no reason to try to create its view hierarchy because it
// won't be displayed. Note this is not needed -- we could
// just run the code below, where we would create and return
// the view hierarchy; it would just never be used.
return null;
}
View v = inflater.inflate(R.layout.contactscontract, container, false); // 여기서 에러가 납니다
어떤에러인지 살펴볼려면 어떻게해야될까요?
엑티비티 클래스를 프래그먼트 클래스로 바꾸는데
엑티비티클래스에서는
setContentView(R.layout.contactscontract);
가 이상없이 동작되었습니다