Git Product home page Git Product logo

Comments (10)

fengdai avatar fengdai commented on August 17, 2024

Sorry, there isn't any default theme now. And I think it isn't necessary. Because even if I provide a default theme, it is also a theme, contains layouts and resources, and has no difference with just choosing the holo-theme or material-theme. So if you don't use any built-in theme, you should implement your own. I suggest you to choose a built-in theme from the two as your "default" theme. And do some customization based on it to meet your requirement.

from alertdialogpro.

fengdai avatar fengdai commented on August 17, 2024

Oh, did you add alertDialogProTheme attribute to your app's theme?

Like this:

<item name="alertDialogProTheme">@style/Theme.AlertDialogPro.Material</item>

In this case, you should let your project depend on alertdailogpro-core and alertdailog-theme-material.

from alertdialogpro.

omihaz avatar omihaz commented on August 17, 2024

Need to describe this in install readme section. Thanks.

from alertdialogpro.

omihaz avatar omihaz commented on August 17, 2024

But better, detect if no theme found and use default AlertDialog implementation.

from alertdialogpro.

fengdai avatar fengdai commented on August 17, 2024

Fine. Will describe there.

But better, detect if no theme found and use default AlertDialog implementation.

Good idea. I'll think about it.

from alertdialogpro.

OndrejMalek avatar OndrejMalek commented on August 17, 2024

I am highly likely having same issue. Even when I have add all alertdialogpro dependencies to gradle and set alertDialogProTheme attribute app crashes on dialog.show:

10-14 20:18:01.911  13006-13006/cz.android.vouskopes D/AndroidRuntime﹕ Shutting down VM
10-14 20:18:01.913  13006-13006/cz.android.vouskopes E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: cz.android.vouskopes, PID: 13006
    android.content.res.Resources$NotFoundException: Resource ID #0x0
            at android.content.res.Resources.getValue(Resources.java:1233)
            at android.content.res.Resources.loadXmlResourceParser(Resources.java:2598)
            at android.content.res.Resources.getLayout(Resources.java:1049)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:412)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)
            at com.alertdialogpro.internal.AlertController.installContent(AlertController.java:193)
            at com.alertdialogpro.AlertDialogPro.onCreate(AlertDialogPro.java:166)
            at android.app.Dialog.dispatchOnCreate(Dialog.java:373)
            at android.app.Dialog.show(Dialog.java:274)
            at cz.android.vouskopes.MainActivity.backupData(MainActivity.java:301)
            at cz.android.vouskopes.MainActivity.onOptionsItemSelected(MainActivity.java:190)

from alertdialogpro.

fengdai avatar fengdai commented on August 17, 2024

What's your MainActivity's theme? Does it inherit the Application's theme or other theme which contains the alertDialogProTheme attribute?

from alertdialogpro.

OndrejMalek avatar OndrejMalek commented on August 17, 2024

In my application theme:

    <item name="alertDialogProStyle">@style/YourAlertDialogProStyle</item>
    <item name="alertDialogProTheme">@style/AlertDialogPro.Holo.Light</item>

in YourAlertDialogProStyle:(even when I tried to disable this)

 <style name="YourAlertDialogProStyle" parent="Widget.AlertDialogPro.Holo.Light">
        <item name="adpTitleDividerBackground">@color/dialog_divider</item>
 </style>

My app theme is dependent on Theme.Holo.Light.DarkActionBar
Your library is dependent on AppCompat library thus It seems to me that application theme must be based on AppCompat's themes. Mustn't it?
thx I appreciate your work and time

from alertdialogpro.

fengdai avatar fengdai commented on August 17, 2024

You should use Theme.AlertDialogPro.Holo.Light:

<item name="alertDialogProTheme">@style/Theme.AlertDialogPro.Holo.Light</item>

from alertdialogpro.

fengdai avatar fengdai commented on August 17, 2024

Just inherit Theme.AlertDialogPro.Holo.Light and override attribute adpTitleDividerBackground, if you wanna change it:

<style name="YourAlertDialogProTheme" parent="Theme.AlertDialogPro.Holo.Light">
        <item name="adpTitleDividerBackground">@color/dialog_divider </item>
</style>

And don't forget to set it to your app's theme:

<item name="alertDialogProTheme">@style/YourAlertDialogProTheme</item>

from alertdialogpro.

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.