2013-07-25 4 views
0

IDE보기에서 완벽하게 표시되는 레이아웃 파일이 있는데 줄이 잘못 표시되지 않습니다. 그러나 내가 그것을 실행할 때 활동은 공백이다. ...android layout이 표시되지 않지만 ide에 표시됩니다.

이것은 일 수 있었느냐?

그것을위한 XML 코드는 아래 다음과 같습니다 : IDE에서 에뮬레이터보기의 스크린 샷과보기가 있습니다

enter image description here

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" > 

<TableRow 
    android:id="@+id/tableRow1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" > 

    <QuickContactBadge 
     android:id="@+id/quickContactBadge1" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" /> 

    <EditText 
     android:id="@+id/editText1" 
     android:layout_width="0dp" 
     android:layout_height="match_parent" 
     android:layout_weight="1" 
     android:ems="10" 
     android:inputType="textMultiLine" 
     android:text="This a pictuer of a hamburger" /> 

    <EditText 
     android:id="@+id/editText2" 
     android:layout_width="0dp" 
     android:layout_height="match_parent" 
     android:layout_weight="0.5" 
     android:ems="10" 
     android:inputType="numberDecimal" 
     android:text="R41.24" /> 
</TableRow> 

<TableRow 
    android:id="@+id/tableRow12" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" > 

    <QuickContactBadge 
     android:id="@+id/quickContactBadge12" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" /> 

    <EditText 
     android:id="@+id/editText21" 
     android:layout_width="0dp" 
     android:layout_height="match_parent" 
     android:layout_weight="1" 
     android:ems="10" 
     android:inputType="textMultiLine" 
     android:text="This a pictuer of a hamburger" /> 

    <EditText 
     android:id="@+id/editText22" 
     android:layout_width="0dp" 
     android:layout_height="match_parent" 
     android:layout_weight="0.5" 
     android:ems="10" 
     android:inputType="numberDecimal" 
     android:text="R41.24" /> 
</TableRow> 

활동 코드 :

public class FoodMenuActivity extends Activity { 

@Override 
protected void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.activity_food_menu); 
} 

@Override 
public boolean onCreateOptionsMenu(Menu menu) { 
    // Inflate the menu; this adds items to the action bar if it is present. 
    getMenuInflater().inflate(R.menu.food_menu, menu); 
    return true; 
} 

+0

활동 코드에 무엇을 넣었습니까? –

+0

setContentView를 사용하고 있습니까? –

+0

를 참조하십시오. – Zapnologica

답변

0

문제점은 내 QuickContactBadge이고, 변경된 내용은 ImageView이며 작동했습니다.

관련 문제