Приложение, над которым я работаю, состоит из одного большого пользовательского представления, которое заполняет экран.Я поместил одну кнопку в центре каждой стороны пользовательского вида, которую можно использовать для перемещения нарисованного объекта в этом направлении.Представьте, что пользовательский вид - это «видоискатель» камеры, и я бы хотел, чтобы пользователь мог панорамировать видоискатель с помощью кнопок со всех четырех сторон.
Кнопки работают отлично, но при нажатии одной изпользовательское представление под ним подвергается большому перерисовыванию (4 перерисовки вместо 1), и пользовательский интерфейс немного отстает.
Есть ли какой-нибудь способ остановить перерисовку пользовательского представления из-за анимации кнопки?1006 * Простите, если я упускаю что-то очевидное.
Заранее благодарен за любую помощь ... Android рулит !!!
XML Layout:
<?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"
>
<com.app.CustomView
android:id="@+id/CustomView" android:layout_above="@+id/menuButton" android:layout_height="fill_parent" android:layout_width="fill_parent"/>
<Button android:layout_height="wrap_content" android:layout_below="@+id/CustomView" android:layout_width="wrap_content" android:layout_alignRight="@+id/CustomView" android:id="@+id/toolsButton" android:text="Tools" android:textSize="24sp"></Button>
<Button android:layout_height="wrap_content" android:id="@+id/outButton" android:text="-" android:textSize="30sp" android:layout_toLeftOf="@+id/inButton" android:layout_alignTop="@+id/inButton" android:layout_width="40sp"></Button>
<Button android:layout_height="wrap_content" android:layout_alignRight="@+id/CustomView" android:layout_alignBottom="@+id/CustomView" android:text="+" android:textSize="30sp" android:id="@+id/inButton" android:layout_width="wrap_content"></Button>
<Button android:layout_alignTop="@+id/CustomView" android:layout_centerHorizontal="true" android:layout_height="40sp" android:layout_width="60sp" android:text="^" android:id="@+id/upButton"></Button>
<Button android:layout_alignBottom="@+id/CustomView" android:layout_centerHorizontal="true" android:text="v" android:layout_height="40sp" android:layout_width="60sp" android:id="@+id/downButton"></Button>
<Button android:layout_alignRight="@+id/CustomView" android:text=">" android:id="@+id/rightButton" android:layout_height="60sp" android:layout_width="40sp" android:layout_centerVertical="true"></Button>
<Button android:id="@+id/leftButton" android:text="<" android:layout_height="60sp" android:layout_width="40sp" android:layout_centerVertical="true"></Button>
<Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_alignLeft="@+id/CustomView" android:id="@+id/menuButton" android:textSize="24sp" android:text="Functions" android:layout_alignParentBottom="true"></Button>
</RelativeLayout>