2012-07-27 6 views
3

내 프로젝트는 휴대 전화와 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> 

답변

8

매니페스트에서 아래의 선언은, 당신이 할 수 있도록 안드로이드 이야기되는 매니페스트 항목으로

번호 10 인치 태블릿에/가시 설치되는 응용 프로그램을 방지 할 수 귀하 앱을 -xlarge 기기에 설치하고 Android를 사용하여 화면을 채우도록 UI를 늘려보세요.

설치를 차단하고 (Play 스토어 목록에서 제외됩니다), you will need to use <compatible-screens>.

+0

투표 up, .// @CommonsWare, 내 앱이 태블릿과 호환되지 않기를 원합니다? 을 사용하는 것을 어떻게 방지 할 수 있습니까? –

+0

@AbdulWahab : 질문 수정에 설명되어 있습니다. – CommonsWare

+0

Ops, 그 질문을 완전히 읽으 려하지 마십시오. 아래 코드는 현명한 코드라고 생각합니다. 맞습니까?

관련 문제