내 프로젝트는 휴대 전화와 10 인치 태블릿 모두에 대해 단일 apk를 지원합니다. 그러나 휴대 전화와 태블릿의 UI는 매우 다릅니다. 나는 다음 주에 앱을 발표 할 예정이며 당분간 전화 사용자가 앱을 사용할 수 있기를 바랍니다. 테스트가 완료되지 않았으므로 타블렛 버전은 보류 상태입니다. 는 매니페스트에서 아래의 선언에서 응용 프로그램은 10 인치 태블릿응용 프로그램이 안드로이드 타블렛에서 실행되는 것을 방지합니다.
<manifest ... >
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="false"/>
...
<application ... >
...
</application>
</manifest>
이에 대한 해결책이 있어야한다을에/가시 설치되는 방지 할 수 있습니다 :이 10 인치 (초대형) 정제에서 응용 프로그램을 필터링 할 것인가?
<manifest ... >
<compatible-screens>
<!-- all small size screens -->
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<!-- all normal size screens -->
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
<!-- all large size screens -->
<screen android:screenSize="large" android:screenDensity="ldpi" />
<screen android:screenSize="large" android:screenDensity="mdpi" />
<screen android:screenSize="large" android:screenDensity="hdpi" />
<screen android:screenSize="large" android:screenDensity="xhdpi" />
</compatible-screens>
...
<application ... >
...
<application>
투표 up, .// @CommonsWare, 내 앱이 태블릿과 호환되지 않기를 원합니다?을 사용하는 것을 어떻게 방지 할 수 있습니까? –
@AbdulWahab : 질문 수정에 설명되어 있습니다. – CommonsWare
Ops, 그 질문을 완전히 읽으 려하지 마십시오. 아래 코드는 현명한 코드라고 생각합니다. 맞습니까? compatible-screens> –