0
Fragment
을 포함하는 활동이 있고 Activity
을 만들 때 보이지 않게하려면 사용자 입력에 따라 조각을 표시합니다. 조각을 초기화 할 때 보이지 않게 함
Fragment
invisbile 설정하려고 :
<fragment
android:name="com.app.ui.ArticleListFragment"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:id="@+id/poiSearchFrag"
android:visibility="gone"></fragment>
<fragment
android:name="com.app.ui.ArticleReaderFragment"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:id="@+id/routeSearchFrag"
android:visibility="gone"></fragment>
을하지만이 작동하지 않는 것 같다.
문제를 해결하는 방법은 무엇입니까?
"작동하지 않는 것 같습니다"는 의미 – Blackbelt
활동이 시작되면 두 조각 모두 볼 수 있습니다. – hguser
대신 프로그램 적으로 fragmenttransaction의 hide() 메소드를 사용해보십시오 .. – bakriOnFire