これはちょっとしたハックですが、xmlでこれを行うことができます。
あなたは、たとえば、トップの画像は、その後、あなたは、画面の割合の面での位置とサイズにトップ画像をのLinearLayoutのlayout_weightを使用することができ、下の1の大きさのX%である、ということが分かっている場合:
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView android:id="@+id/left_filler" android:layout_weight="20"
android:layout_width="wrap_content" android:layout_height="wrap_content"/>
<ImageView android:id="@+id/top_image" android:layout_weight="50"
android:layout_width="wrap_content" android:layout_height="wrap_content"/>
<ImageView android:id="@+id/right_filler" android:layout_weight="30"
android:layout_width="wrap_content" android:layout_height="wrap_content"/>
</LinearLayout>
... bottom image
上記のサイズは、画面の50%でtop_imageのサイズになり、左から20%のオフセットがあります。 top_imageがbottom_imageのサイズの50%である限り、これは同様の縮尺を維持します。
これを行う「正しい」方法は、カスタムビューでonDraw()をオーバーライドし、キャンバスの描画メソッドを使用することです。
この問題は解決しましたか?あなたが見たことがあるのか分からないが、あなたの 'Canvas.onDraw'問題に対する答えを更新した。 – techiServices
いいえ、解決しません。プログラムでやるよ –