Android 活动中的透明小组
我试图在我的应用程序中使用教程设置透明面板,但每当我在我的活动中使用以下xml时,它就会强制关闭Android 活动中的透明小组,android,Android,我试图在我的应用程序中使用教程设置透明面板,但每当我在我的活动中使用以下xml时,它就会强制关闭 <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/home_container" android:layout_width
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/home_container"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:id="@+id/city_map_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="0DUEIIn35xtmC6Vk1JkFEF74kwkUjgb7HrUMKfA"/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:gravity="bottom"
android:paddingLeft="5px"
android:paddingTop="5px"
android:paddingRight="5px">
<com.pocketjourney.view.TransparentPanel
android:id="@+id/transparent_panel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="5px"
android:paddingLeft="5px"
android:paddingBottom="5px"
android:paddingRight="5px">
<Button android:id="@+id/button_click_me"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Click Me!"/>
</com.pocketjourney.view.TransparentPanel>
</LinearLayout>
</FrameLayout>
现在我明白了
07-04 00:28:31.914: ERROR/ActivityManager(101): fail to set top app changed!
XML声明
在包com/pocketTravely/view中会有一个名为TransparentPanel的类
所以我假设您的包不是这样的,您将自己命名它,所以您需要更新您的XML
com.your.package.TransparentPanel
你犯了什么错误?也许TransparentPanel不是xml所说的那样?或者您没有正确实现自定义视图。向我们提供您的错误日志。感谢您的关注,我已经修复了此问题,并将TransparentPanel类也放入其中,但我仍将强制关闭,我已使用logcat错误更新它,请查看它,现在我只收到07-04 00:28:31.914:错误/活动管理器(101):无法更改机顶应用程序!我解决了你原来的问题。请将此标记为已回答并创建另一个问题。你不能只是改变问题,这会让答案与其他有同样问题的人无关,
07-04 00:28:31.914: ERROR/ActivityManager(101): fail to set top app changed!