用于通知的android自定义视图

| 我想在我的应用程序中添加一个必须可单击的视图,我尝试了一个对话框,但是它阻止了游戏的执行,我也试图将视图添加到WindowManager中,但不是可点击的。如何创建“喜欢的横幅”视图?     
已邀请:
据我了解,您想在游戏视图上方浮动一个“ 0”。尝试使用
FrameLayout
。以下是一个示例xml,希望对您有所帮助:
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"
  android:layout_width=\"fill_parent\" android:layout_height=\"fill_parent\">
    <!-- Replace this with your banner -->
    <ImageView android:layout_width=\"fill_parent\"
        android:layout_height=\"wrap_content\"
        android:src=\"@drawable/icon\"/>
    <TextView android:layout_width=\"fill_parent\"
        android:layout_height=\"fill_parent\"
        android:text=\"Replace this with your game view\"/>
</FrameLayout>
    

要回复问题请先登录注册