문제가 있습니다.재 팽창하는 Viewstub
2 개의 뷰 스텁이있는 두 영역에서 내 화면을 감습니다.
그러나 ViewStub을 비정상적으로 확장하면 더 이상 액세스 할 수 없으며이 ViewStub 내에서 다른 View를 팽창시킬 수 없습니다.
그래서 이러한 종류의 컨테이너를 사용하는 대안이 무엇입니까?
여기 몇 가지 코드가 있습니다. 당신의 모든 사랑 코드 : 여기
ViewStub contentSpace = (ViewStub) findViewById(R.id.ContentSpace);
contentSpace.setLayoutResource(R.layout.view1);
contentSpace.inflate();
contentSpace.setInflatedId(R.id.Content);
RelativeLayout content = (RelativeLayout) findViewById(R.id.Content);
contentSpace.setLayoutResource(R.layout.view1); //crash
contentSpace.inflate();
이 도움이 될까요? http://stackoverflow.com/questions/5342121/inflate-a-view-layout-into-another-layout/5343733#5343733 – bigstones