2012-01-26 2 views
0

태블릿 에뮬레이터에서 내 앱을 실행하면 다른 색상으로 표시됩니다. 이 이미지를 참조동일한 레이아웃으로 태블릿에서 다른 색상을 생성합니다.

enter image description here

(그것의 단지 부분이다, 그래서 나는 이미지의 오른쪽을 잘라) 그리고 이것은의 standart 스마트 폰 에뮬레이터에서이다 : 그래서

enter image description here

당신은 이상한 차이가 있다는 것을 알 수 있습니다. 그러나 코드는 동일합니다. 여기 내 레이아웃 XML입니다 :

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res/com.markupartist.android.actionbar.example" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" > 

    <com.markupartist.android.widget.ActionBar 
     android:id="@+id/actionbar" 
     style="@style/ActionBar" 
     app:title="@string/some_title" /> 

    <RelativeLayout 
     xmlns:a="http://schemas.android.com/apk/res/android" 
     a:layout_width="fill_parent" 
     a:layout_height="fill_parent" 
     a:background="#ffffff" > 

     <LinearLayout 
      a:layout_width="fill_parent" 
      a:layout_height="wrap_content" 
      a:orientation="horizontal" 
      a:paddingBottom="5dip" 
      a:paddingLeft="5dip" 
      a:paddingRight="5dip" 
      a:paddingTop="5dip" > 

      <MultiAutoCompleteTextView 
       a:id="@+id/recipientBody" 
       a:layout_width="0dip" 
       a:layout_height="wrap_content" 
       a:layout_weight="1.0" 
       a:hint="@string/sms_to_whom" 
       a:maxLines="10" 
       a:nextFocusRight="@+id/smsRecipientButton" /> 

      <LinearLayout 
       a:layout_width="wrap_content" 
       a:layout_height="fill_parent" 
       a:orientation="vertical" > 

       <Button 
        a:id="@+id/smsRecipientButton" 
        a:layout_width="wrap_content" 
        a:layout_height="0dip" 
        a:layout_marginLeft="5dip" 
        a:layout_weight="1.0" 
        a:enabled="true" 
        a:nextFocusLeft="@+id/recipientBody" 
        a:onClick="onPickContact" 
        a:text="@string/sms_contacts" /> 
      </LinearLayout> 
     </LinearLayout> 

     <LinearLayout 
      a:layout_width="wrap_content" 
      a:layout_height="fill_parent" 
      a:layout_marginRight="10dip" 
      a:layout_marginBottom="10dip" 
      a:gravity="bottom" 
      a:orientation="vertical" 
      a:layout_above="@+id/bottomLayer" a:layout_alignParentRight="true"> 

      <TextView 
       android:id="@+id/chars" 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       android:layout_alignParentRight="true" 
       android:text="" /> 
     </LinearLayout> 

     <LinearLayout 
      a:id="@+id/bottomLayer" 
      a:layout_width="fill_parent" 
      a:layout_height="wrap_content" 
      a:layout_alignParentBottom="true" 
      a:background="#9c9e9c" 
      a:orientation="horizontal" 
      a:paddingBottom="5dip" 
      a:paddingLeft="5dip" 
      a:paddingRight="5dip" 
      a:paddingTop="5dip" > 

      <EditText 
       a:id="@+id/smsBody" 
       a:layout_width="0dip" 
       a:layout_height="wrap_content" 
       a:layout_weight="1.0" 
       a:autoText="true" 
       a:capitalize="sentences" 
       a:hint="@string/sms_enter_message" 
       a:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine" 
       a:nextFocusRight="@+id/send_button" 
       a:minLines="5" 
       a:gravity="left|top"/> 

      <LinearLayout 
       a:layout_width="wrap_content" 
       a:layout_height="fill_parent" 
       a:orientation="vertical" > 

       <Button 
        a:id="@+id/smsSendButton" 
        a:layout_width="wrap_content" 
        a:layout_height="0dip" 
        a:layout_marginLeft="5dip" 
        a:layout_weight="1.0" 
        a:enabled="false" 
        a:nextFocusLeft="@+id/smsBody" 
        a:text="@string/sms_send_abbr" /> 
      </LinearLayout> 
     </LinearLayout> 
    </RelativeLayout> 
</LinearLayout> 

어떤 아이디어가 잘못되었거나 어떻게 수정해야합니까?

+1

잘못된 것은 아니지만 의도 된 것입니다. Android는 기기/Android 버전의 기본 스타일을 사용합니다. 태블릿의 기본 스타일은 스마트 폰의 스타일과 다릅니다. 앱에서 기본 스타일을 고수하는 것이 좋으므로이 행동은 옳다는 것을 알 수 있습니다. –

+0

감사합니다. 원하는 경우이 답변을 만들 수 있습니다. –

답변

2

잘못된 것은 아니지만 의도 된 것입니다. Android는 기기/Android 버전의 기본 스타일을 사용합니다. 태블릿의 기본 스타일은 스마트 폰의 스타일과 다릅니다. 앱에서 기본 스타일을 고수하는 것이 좋으므로이 행동은 옳다는 것을 알 수 있습니다.

관련 문제