私は基本的な誤りを得ているかもしれないので、私は完全なnoobですが、これはちょうど私からの地獄を混乱させています。Android(newbie)image/s layout/scaling problem
ここには画像ボタンと背景画像があります (注:ビキニの女の子はNSFWかもしれません - 私はこの画面を長時間見ていると思いました。あなたが別の画面で見ることができるように)
http://imageshack.us/photo/my-images/6/finaldi.jpg/
は、背景画像が細かいスケールサイズが、最初に私のイメージボタンは、その周りに奇妙な境界線を持っており、それは単に縮小し始めます。
私は、同じ画像36x36,48x48,72x72でボタンとに96x96を作り、そのまま 描画可能LDPI、描画可能MDPI、描画可能-hdpiディレクトリにそれらを入れている:(
私が取得できますかそのボタンはすべての画面で同じになるように 私はDIPに読んでいたが、どこが、私はそれを宣言しない
おかげ
EDIT、XMLコード:??!
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@drawable/background_ass">
<TableLayout android:id="@+id/tableLayout1" android:layout_height="wrap_content" android:layout_width="fill_parent">
<TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content" android:layout_height="wrap_content">
<ImageButton android:src="@drawable/level1"
android:id="@+id/imageButton1"
android:onClick="button_clicked1"
android:background="#00000000" android:layout_width="48dip" android:layout_height="48dip">
</ImageButton>
</TableRow>
<TableRow android:id="@+id/tableRow2" android:layout_width="wrap_content" android:layout_height="wrap_content">
<TextView android:text="TextView" android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"></TextView>
</TableRow>
<TableRow android:id="@+id/tableRow3" android:layout_width="wrap_content" android:layout_height="wrap_content">
</TableRow>
<TableRow android:id="@+id/tableRow4" android:layout_width="wrap_content" android:layout_height="wrap_content"></TableRow>
</TableLayout>
</LinearLayout>
そのヒントありがとうございました! しかし、サイズ変更はまだ起こっています... – Ryan
0にパディングを設定しようとしました –
OK、パディングが変更されませんでした..あなたの答えをupvoted。 "密度に依存しないピクセル(ディップ)"を試みることを考えていますが、値を入力する場所はわかりません。 – Ryan