Android ストレッチ機能を使用して、すべての画面サイズでアプリがフルスクリーンで実行されることを期待しています。XML レイアウトを 1 つだけ使用しています。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<com.nwm.CD.CCanvas_480x320
android:layout_weight ="1"
android:fillViewport="true"
android:id="@+id/cc_320x480"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
しかし、WVGA00 (480x800) でアプリを実行すると、右端に約 80 ピクセルの幅の黒いバーが表示され、アプリが画面全体に表示されません。
クラス拡張ビュー
public class CC_480x320 extends View implements Runnable{
public CricCanvas_480x320(Context context, AttributeSet attrs) {
super(context, attrs);
this.context = (CricDhamaka)context;
}
フルスクリーンで実行する方法についてのアイデアはありますか??