2011-08-05 18 views
0

は、私は私のmain.xmlアップと私が持っているXMLコードを持っている:Androidアプリケーションの背景色

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="#ffffff"> 
    <ImageView android:id="@+id/imageView1" android:layout_height="wrap_content" android:src="@drawable/logo" android:layout_width="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="116dp"></ImageView> 
    <TextView android:layout_height="wrap_content" android:text="Administration 0.0.1" android:textAppearance="?android:attr/textAppearanceSmall" android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_below="@+id/imageView1" android:layout_centerHorizontal="true"></TextView> 

</RelativeLayout> 

をしかし、私はエミュレータでアプリケーションを実行すると、デフォルトのテーマは、まだ黒の背景で表示されます。私はなぜこれをやっているのか分かりません。

アイデア?

+0

それが動作するはずです - これは、画面は(私はアンドロイドのアイコンを使用して画像を置換している)

My Screen

あなたのonCreate()は次のようになりないように見えるものです。あなたはそれの周りにコードを投稿できますか? – Suchi

+0

完了 - ありがとうございました – oli

答えて

0

どのような背景色を期待していますか?あなたが白を期待しているなら、それは私のために正しく表示されます。

@Override 
public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.main); 
} 
+0

こんにちはいいえ、デザインビューでも白く見えますが、エミュレーターで実行すると黒に戻ります。はい、私のonCreate()もそのように見えます... – oli

+0

これは、デバイスと同様に、エミュレータ上で私の白に見えました。どのエミュレータを使用していますか?あなたはAndroidのどのバージョンを使用していますか? – Suchi

+0

私はAndroid 2.1を使用しました – oli