Android 安卓平板电脑和软件按钮,菜单不可触摸
首先。。我是Android世界的新手(我只是从iOS开发扩展而来),在互联网上做了相当多的研究,但这一点让我有些困惑 我的应用程序是一个相当基本的应用程序,MainActivity由一个MapActivity和一个菜单组成 我这里的测试设备如下:Android 安卓平板电脑和软件按钮,菜单不可触摸,android,menu,touches,Android,Menu,Touches,首先。。我是Android世界的新手(我只是从iOS开发扩展而来),在互联网上做了相当多的研究,但这一点让我有些困惑 我的应用程序是一个相当基本的应用程序,MainActivity由一个MapActivity和一个菜单组成 我这里的测试设备如下: HTC One X-4.0.4-硬件备份/主/多任务-软件菜单 华硕Nexus 7-4.2.1-软件备份/主/多任务/菜单 华为Ascend G 300-2.3.6-硬件备份/主菜单 我的应用程序在所有这些设备上都运行良好,我向我的客户发送了一个构
- HTC One X-4.0.4-硬件备份/主/多任务-软件菜单
- 华硕Nexus 7-4.2.1-软件备份/主/多任务/菜单
- 华为Ascend G 300-2.3.6-硬件备份/主菜单
- 三星Galaxy Tab“10-3.1-软件备份/主页/多任务/菜单
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.cyrilmottier.polaris.PolarisMapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_height="fill_parent"
android:layout_width="match_parent"
android:apiKey="MY API KEY HERE" />
<RelativeLayout
android:id="@+id/adsdkContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" >
</RelativeLayout>
</RelativeLayout>
感谢阅读《人物》!尝试将目标SDK设置为10@AliImran这会迫使菜单向下移动到底部栏,但似乎无法解决主要问题(在MapView上触摸仍然无法正常工作)
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
Log.i("NOTE","Menu Item Pressed: "+item.getItemId());
switch (item.getItemId()) {
case R.id.menu_search:
showSearch();
return true;
case R.id.menu_history:
Intent history = new Intent(this, HistoryActivity.class);
startActivityForResult(history, HISTORY_REQUEST_CODE);
return true;
default:
Intent settings = new Intent(this, SettingsActivity.class);
startActivity(settings);
return super.onOptionsItemSelected(item);
}
}
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.cyrilmottier.polaris.PolarisMapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_height="fill_parent"
android:layout_width="match_parent"
android:apiKey="MY API KEY HERE" />
<RelativeLayout
android:id="@+id/adsdkContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" >
</RelativeLayout>
</RelativeLayout>