Coder Social home page Coder Social logo

老铁,为什么我的自定义的dialog,每次弹出来都是浮动在在一个新界面(activity), about checkversionlib HOT 9 CLOSED

alexliusheng avatar alexliusheng commented on May 21, 2024
老铁,为什么我的自定义的dialog,每次弹出来都是浮动在在一个新界面(activity),

from checkversionlib.

Comments (9)

GuodongQi avatar GuodongQi commented on May 21, 2024

然后今天发现,只要builder设置CustomDownloadActivityClass(MyVersionUpdateDialogActivity.class)时,即使MyVersionUpdateDialogActivity 仅继承VersionDialogActivity,其他内容为空时,也会出现这个问题。

from checkversionlib.

AlexLiuSheng avatar AlexLiuSheng commented on May 21, 2024

设置activity Theme

from checkversionlib.

GuodongQi avatar GuodongQi commented on May 21, 2024

设置过了
一套用了网上的常用的透明theme,不行
另一套用了你的的basedialog theme也不行

from checkversionlib.

AlexLiuSheng avatar AlexLiuSheng commented on May 21, 2024

你的MyVersionUpdateDialogActivity 设置了android:theme="@style/versionCheckLibvtransparentTheme"没有

from checkversionlib.

GuodongQi avatar GuodongQi commented on May 21, 2024

设置过,但一设置就报错 Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
主题代码如下

<style name="BaseDialog" parent="android:Theme.Light">
    <item name="android:windowFrame">@null</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:windowIsFloating">true</item>
    <item name="android:windowContentOverlay">@null</item>

</style>

这俩style都不可以

from checkversionlib.

GuodongQi avatar GuodongQi commented on May 21, 2024
<style name="activity_version_update_dialog" parent="android:style/Theme.Dialog"> @null @android:color/transparent true true false </style>

from checkversionlib.

AlexLiuSheng avatar AlexLiuSheng commented on May 21, 2024

android:theme="@style/versionCheckLibvtransparentTheme" 老铁库自带就有个

from checkversionlib.

AlexLiuSheng avatar AlexLiuSheng commented on May 21, 2024

android:theme="@style/versionCheckLibvtransparentTheme"

from checkversionlib.

GuodongQi avatar GuodongQi commented on May 21, 2024

@AlexLiuSheng扎心了老铁,已解决
😂thanks

from checkversionlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.