게시물의 시점에서 게시물의 제안을 테스트 할 기회가 없었지만, 이후 기회가 있었기 때문에 다른 누구도 그렇게하지 않았기 때문에 내 자신의 질문에 대답 할 것입니다. .
예상대로 예, 다음과 같은 시나리오는 (API 레벨 8에서 테스트) 작품 :
레이아웃/main.xml에 :
... <include layout="@layout/included"/> ...
레이아웃/included.xml :
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="GENERIC included fragment"/>
</merge>
layout-ldpi/included.xml :
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="LOW-DPI included fragment"/>
</merge>
예를 들어, QVGA 장치에서 앱을 실행하면 포함 된 부분이 원하는대로 LDPI 디렉토리에있는보기가 렌더링되지만 비 LDPI 장치는 레이아웃 디렉토리에서 기본 항목을 가져옵니다.
아직 에뮬레이터에서이 기능을 사용해 보셨습니까? : D –
화면 밀도가 다른 * 레이아웃 *을 사용하는 이유는 무엇입니까? – CommonsWare
* layouts *을 (를) 정말로 의미합니까? –