Giter Club home page Giter Club logo

Comments (11)

fengdai avatar fengdai commented on August 20, 2024

Can you please post a sample code of how to create an alertDialog ?

Well. There's already a demo.

Does it work well on Gingerbread?

Yes. It works well on all versions of the Android platform back to v1.0. So it also works well on Gingerbread.

How do I use this library?

Checkout the project and take a look at the alertdialogpro-demo module.
The styles.xml file shows you how to specify a global theme to the AlertDialogPro.
The MainActivity.java file shows you how to build an AlertDialogPro and change the theme of AlertDialogPro in the code.
You can also take a look at the alertdialogpro-theme-material module which implements a material theme. It can show you how to do theme customization with this project.

from alertdialogpro.

AndroidDeveloperLB avatar AndroidDeveloperLB commented on August 20, 2024

Oh, sorry for missing this. I was sure I've seen only a very short project for material, and now I see more.
Probably missed a lot by staying up late. :)
I think this is the part I've seen:
https://github.com/fengdai/AlertDialogPro/tree/master/alertdialogpro-theme-material

Anyway, how come the support library doesn't have this functionality ?

from alertdialogpro.

fengdai avatar fengdai commented on August 20, 2024

I don't know... Maybe there is no need for Google to do that since this functionality is not as complex as the ActionBar compatibility.

from alertdialogpro.

AndroidDeveloperLB avatar AndroidDeveloperLB commented on August 20, 2024

I see.
Say, now I've tried to use Android-Studio and run the demo, but got an error running it. Can you please help me handle it?
here's the error:

Error:Execution failed for task ':alertdialogpro-demo:processDebugResources'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command:
D:\android\build-tools\21.0.0\aapt.exe package -f --no-crunch -I D:\android\platforms\android-21\android.jar -M D:\android-studio\Android studio Projects\AlertDialogPro\alertdialogpro-demo\build\intermediates\manifests\debug\AndroidManifest.xml -S D:\android-studio\Android studio Projects\AlertDialogPro\alertdialogpro-demo\build\intermediates\res\debug -A D:\android-studio\Android studio Projects\AlertDialogPro\alertdialogpro-demo\build\intermediates\assets\debug -m -J D:\android-studio\Android studio Projects\AlertDialogPro\alertdialogpro-demo\build\generated\source\r\debug -F D:\android-studio\Android studio Projects\AlertDialogPro\alertdialogpro-demo\build\intermediates\libs\alertdialogpro-demo-debug.ap_ --debug-mode --custom-package com.alertdialogpro.demo -0 apk --output-text-symbols D:\android-studio\Android studio Projects\AlertDialogPro\alertdialogpro-demo\build\intermediates\symbols\debug
Error Code:
-1073741819

EDIT: with Eclipse (which I prefer to use anyway), it worked fine.

from alertdialogpro.

fengdai avatar fengdai commented on August 20, 2024

Did you install the latest SDK Build-tools v21?

from alertdialogpro.

AndroidDeveloperLB avatar AndroidDeveloperLB commented on August 20, 2024

@fengdai Yes. I always install the latest.
Anyway, I've succeeded using Eclipse, so if you wish you can close this thread.

from alertdialogpro.

fengdai avatar fengdai commented on August 20, 2024

OK. If any question, be free to ask me : )

from alertdialogpro.

AndroidDeveloperLB avatar AndroidDeveloperLB commented on August 20, 2024

Yes, I actually have a question.
Since I am willing to use only the material design, is it possible to avoid using the rest of the files (of Holo) ?
Is it possible for me to merge the 2 libraries, and use a single one?
BTW, you should check the warnings of the projects.

from alertdialogpro.

fengdai avatar fengdai commented on August 20, 2024

Yes. Just delete the Holo files. And change the defValues to Material:

In AlertController.java, the constructor method:

    mAlertDialogLayout = a.getResourceId(R.styleable.AlertDialogProStyle_adpLayout,
            R.layout.alert_dialog_material);
    mListLayout = a.getResourceId(
            R.styleable.AlertDialogProStyle_adpListLayout,
            R.layout.select_dialog_material);
    mMultiChoiceItemLayout = a.getResourceId(
            R.styleable.AlertDialogProStyle_adpMultiChoiceItemLayout,
            R.layout.select_dialog_multichoice_material);
    mSingleChoiceItemLayout = a.getResourceId(
            R.styleable.AlertDialogProStyle_adpSingleChoiceItemLayout,
            R.layout.select_dialog_singlechoice_material);
    mListItemLayout = a.getResourceId(R.styleable.AlertDialogProStyle_adpListItemLayout,
            R.layout.select_dialog_item_material);

from alertdialogpro.

fengdai avatar fengdai commented on August 20, 2024

Would you please open another issue for this question?

from alertdialogpro.

AndroidDeveloperLB avatar AndroidDeveloperLB commented on August 20, 2024

Yes, here:
#2

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.