我有一个FrameLayout视图,其中包含一个(类似MapView的)控件和一些覆盖它的其他按钮。 (布局xml在下面)。如何控制Android视图中的轨迹球行为?
我想允许用户平移/不仅使用触摸而且轨迹球滚动主视图。 问题是 - 采用了轨迹球刚接通布局的所有控件之间的焦点,而我似乎无法找到一种方法来包含onTrackballEvent到刚刚的MainView。
欢迎任何建议,在此先感谢。
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<FrameLayout android:id="@+id/pageView"
xmlns:panel="http://schemas.android.com/apk/res/com.yappa"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<MainView
android:id="@+id/mainView"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</MainView>
<ZoomControls android:id="@+id/ZoomControls01"
android:layout_gravity="bottom|center"
android:layout_height="wrap_content" android:layout_width="wrap_content">
</ZoomControls>
<Panel
....
</Panel>
</FrameLayout>
</merge>
你有没有试过玩过`android:focusable`属性? – Ari 2009-07-01 03:17:16
可控焦点控制你如何从一个控件转到另一个控件。不是我的问题,意味着 – reflog 2009-08-09 10:45:36