1

次のようなダイアログを作成します。

Dialog dialog = new Dialog(this);
dialog.setContentView(R.layout.please_wait); 
dialog.show(); //this will show dialog 

これがそのxmlです。

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

<ImageView
    android:id="@+id/please_wait"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/please_wait_1"/>

</RelativeLayout>

画像はレンダリングされますが、画像の上に不要な黒いバーが表示されます。それは一般的ですか?そして、どうすれば黒いバーを取り除くことができますか?

ありがとう!

4

1 に答える 1

1

使用している画像が小さすぎて拡大縮小できないようです。次の属性を xml の ImageView 要素に追加しようとしましたか?

android:scaleType="fitXY"
于 2012-09-09T18:21:36.900 に答える