我有一个 FrameLayout 视图,其中包含一个(类似 MapView)控件和一些覆盖它的附加按钮。(布局xml如下)。
我想让用户不仅使用触摸而且还使用轨迹球来平移/滚动主视图。问题是 - 使用轨迹球只是在布局上的所有控件之间切换焦点,我似乎找不到将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>