2012-06-26 39 views
0

我想展開一個基本的谷歌電視世界應用程序的基本。我創建了一個帶有EditText和Button的LinearLayout,並將它放在非常大的'Hello world'TextView(78sp)下。 當我在谷歌電視盒(adb)上啓動應用程序時,我得到了'Hello World',但只有EditText和Button的最頂端。谷歌電視不顯示我的Android應用程序的完整佈局

在Eclipse Android佈局管理器中查看應用程序,它的一切都很好,可見。

有關如何解決此問題的任何想法?

我相信我必須在所有這些中缺少一些配置元素。

任何幫助表示讚賞。由於

代碼,我的main.xml:

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

    <TextView 
     android:layout_width="fill_parent" 
     android:layout_height="475dp" 
     android:gravity="center" 
     android:text="@string/hello" 
     android:textSize="78sp" /> 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" > 

     <EditText 
      android:id="@+id/edit_message" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_weight="1" 
      android:ems="10" 
      android:hint="@string/edit_message" > 

      <requestFocus /> 
     </EditText> 

     <Button 
      android:id="@+id/button_send" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 

      android:text="@string/button_send" /> 

    </LinearLayout> 

</LinearLayout> 

回答

2

可能是因爲你的第一個文本視圖是475dp高。你可以看到here電視只有540dp高(請記住,除非屏幕是沒有Google TV的mdpi,否則實際像素和獨立顯示像素[dp]不一樣)

相關問題