GithubHelp home page GithubHelp logo

l-dialogs's People

Contributors

alorma avatar chrismcmine avatar lewisjdeane avatar stephanebg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

l-dialogs's Issues

Button not aligned in same row

CustomDialog.Builder builder = new CustomDialog.Builder(context, "Discard Item ?", "Discard");

    builder.darkTheme(false);
    builder.positiveColor(context.getResources().getColor(R.color.theme_default_primary));
    builder.negativeColor(context.getResources().getColor(R.color.theme_default_primary));
    builder.negativeText("Cancel");
    CustomDialog customDialog = builder.build();

    customDialog.show();
    return customDialog;

While using the above code, I get two button stacked up instead showing in one row.

Set custom view as content

Could you add a method to set custom view as content, like setView() in original AlertDialog.Buider? I have tried setCustomView(), but it will replace all views include what I do not want to replace.
sorry for my bad English.

Content alignment

Hey,
First I have to say : I wanted to pull this by myself. But i don't know why i can't load this project from Github in Eclipse.

Well, My language is right to left,
So it would be great if you add alignment for content.
Then if content alignment is right to left, set buttons alignment to left to right.

Request: add a prefix for all resources and resources files

Just in order to differentiate them with the main files of the project, and to avoid "clashes" between them, by having more unique names.

For example, you can add the prefix "ldi__" for each of the resources.

This is done in many libraries, including ActionBarSherlock and even in the support library (though both missed some files for some reason).

Can't show dialog

When i try to show CustomListDialog I receive such error: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
at this line: customListDialog.show();
What I did wrong?
Android API 16

User input

hi there
i like this library but i have a question
is it possible to have the user enter or modify information in the dialog ? Lets say change the title ?

Custom Adapter

Thoughts on adding a custom adapter instead of using the default array adapter?

My thought is for adding icons next to the lists?

Seems fairly easy to do.

Can't reorder positive/negative text

In your screenshots, the light example has the negative to the left of the positive and the dark example has one over the other. How do you code it so the negative is to the left? The default appears to be vertical but I can't find any options for horizontal. I went through the code but can't find any options to use.

Custom Views as content (req)

Hey, first of all, great lib.
I was wondering if it's possible to add custom views to the dialog. I would really like to add images to the dialog. One way of doing that with the default dialogs in Android was to use setView() and set an ImageView, so maybe you can do something similar.

Thanks.

Dialog appers black on 2.3 Gingerbread even as darktheme ist set to false

android-l-dialog

 CustomDialog.Builder builder = new CustomDialog.Builder(this, "Bestätigen","Hinzufügen abbrechen");
        builder.negativeText("Schließen");
        builder.darkTheme(false);
        builder.content("Möchtest du das Hinzufügen einer neuen Prüfung wirklich abbrechen?");
        builder.titleAlignment(BaseDialog.Alignment.LEFT); // Use either Alignment.LEFT, Alignment.CENTER or Alignment.RIGHT
        builder.titleColor(R.color.app_blau); // int res, or int colorRes parameter versions available as well.#
        CustomDialog customDialog = builder.build();
        customDialog.show();

Any fix or are you not support Android before ICS?

"Color" spelling

I suppose, that renaming methods titleColor and itemColor to title/itemColour removes backward compatibility with old libs.

Click events

I'm new to this so how exactly to handle click events for CustomDialogs. I have 3 dialogs and if I implement CustomDialog.ClickListener and then onConfirmClick() & onCancelClick(), all confirm and cancel buttons from all dialogs use the same method & functionality..

Choice Mode for CustomListDialog

Is it possible to implement a multi choice list view and also a single choice list view? I tried using dialog.getListView().setChoiceMode() but it didn't work.

Dialog is shown twice

My code:

CustomDialog.Builder builder = new CustomDialog.Builder(mActivity,
                    mActivity.getString(R.string.restart_required), mActivity.getString(R.string.yes_restart));
            builder.negativeText(mActivity.getString(R.string.no));
            builder.darkTheme(false);
            builder.content(mActivity.getString(R.string.restart_now));
            builder.titleAlignment(BaseDialog.Alignment.LEFT);
            builder.titleColor(R.color.app_blau);
            CustomDialog customDialog = builder.build();
            customDialog.show();
            customDialog.setClickListener(new CustomDialog.ClickListener() {
                @Override
                public void onConfirmClick() {
                    [...]
                }

                @Override
                public void onCancelClick() {
                    [...]
                }
            });

The Dialog is shown twice on top of another, any fix available?

Crash on init, please help

08-18 13:23:15.023: E/AndroidRuntime(1508): FATAL EXCEPTION: main
08-18 13:23:15.023: E/AndroidRuntime(1508): Process: com.salut.jumbo, PID: 1508
08-18 13:23:15.023: E/AndroidRuntime(1508): android.view.InflateException: Binary XML file line #25: Error inflating class android.support.v7.internal.widget.ActionBarView
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.createView(LayoutInflater.java:620)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.parseInclude(LayoutInflater.java:814)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
08-18 13:23:15.023: E/AndroidRuntime(1508): at uk.me.lewisdeane.ldialogs.CustomDialog.init(CustomDialog.java:55)
08-18 13:23:15.023: E/AndroidRuntime(1508): at uk.me.lewisdeane.ldialogs.CustomDialog.(CustomDialog.java:48)
08-18 13:23:15.023: E/AndroidRuntime(1508): at some.package.SomeFragment$1.onClick(SomeFragment.java:27)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.View.performClick(View.java:4438)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.View$PerformClick.run(View.java:18422)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.os.Handler.handleCallback(Handler.java:733)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.os.Handler.dispatchMessage(Handler.java:95)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.os.Looper.loop(Looper.java:136)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.app.ActivityThread.main(ActivityThread.java:5017)
08-18 13:23:15.023: E/AndroidRuntime(1508): at java.lang.reflect.Method.invokeNative(Native Method)
08-18 13:23:15.023: E/AndroidRuntime(1508): at java.lang.reflect.Method.invoke(Method.java:515)
08-18 13:23:15.023: E/AndroidRuntime(1508): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
08-18 13:23:15.023: E/AndroidRuntime(1508): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
08-18 13:23:15.023: E/AndroidRuntime(1508): at dalvik.system.NativeStart.main(Native Method)
08-18 13:23:15.023: E/AndroidRuntime(1508): Caused by: java.lang.reflect.InvocationTargetException
08-18 13:23:15.023: E/AndroidRuntime(1508): at java.lang.reflect.Constructor.constructNative(Native Method)
08-18 13:23:15.023: E/AndroidRuntime(1508): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.createView(LayoutInflater.java:594)
08-18 13:23:15.023: E/AndroidRuntime(1508): ... 22 more
08-18 13:23:15.023: E/AndroidRuntime(1508): Caused by: android.view.InflateException: Binary XML file line #22: Error inflating class
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.createView(LayoutInflater.java:620)
08-18 13:23:15.023: E/AndroidRuntime(1508): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:669)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:694)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.support.v7.internal.widget.ActionBarView.(ActionBarView.java:218)
08-18 13:23:15.023: E/AndroidRuntime(1508): ... 25 more
08-18 13:23:15.023: E/AndroidRuntime(1508): Caused by: java.lang.reflect.InvocationTargetException
08-18 13:23:15.023: E/AndroidRuntime(1508): at java.lang.reflect.Constructor.constructNative(Native Method)
08-18 13:23:15.023: E/AndroidRuntime(1508): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.view.LayoutInflater.createView(LayoutInflater.java:594)
08-18 13:23:15.023: E/AndroidRuntime(1508): ... 32 more
08-18 13:23:15.023: E/AndroidRuntime(1508): Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x2/d=0x7f010012 a=-1}
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.content.res.Resources.loadDrawable(Resources.java:2068)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.widget.ImageView.(ImageView.java:129)
08-18 13:23:15.023: E/AndroidRuntime(1508): at android.widget.ImageView.(ImageView.java:119)
08-18 13:23:15.023: E/AndroidRuntime(1508): ... 35 more

3 Buttons version

Is it possible to add the version with the neutral button also?
Thanks in advance

How to make buttons align in a row?

I'm using this code:

CustomDialog.Builder builder = new CustomDialog.Builder(
                            this, "تأیید", "عنوان");
builder.content("بایستی دوباره وارد شوید...")
                            .negativeText("خروج")
                            .titleAlignment(BaseDialog.Alignment.RIGHT)
                            .contentAlignment(BaseDialog.Alignment.RIGHT)
                            .positiveColorRes(R.color.text_color)
                            .build().show();

The buttons are shown in a column a the right (like the standard dark themed titled "Factory Reset"). How can I make them aligned in a row (like the standard permission dialog)?

Add to maven central

Can you add the library to maven central?its more easy to integrate in the app, than download the aar ..etc.
Thanks

Adding a custom View

I tried adding a layout file to the method and it kept flagging an error... then i tried using the .seContentView() still it kept flagging an error... which makes me confused...by "customView" what do you actually mean?....

Problem at setCustomView()

setCustomView() is good, but when I use it, I found a problem.

When I try to add a WebView at a L-Dialogs, you know that some web pages are long so they compress the Confirm Button and the Cancel Buttom under the screen, we can't see them.

Meanwhile, the AlertDialog doesn't have this problem, we can still get the Button.

Gradle problem

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'uk.me.lewisdeane.ldialogs:ldialog@aar'
}

repositories{
flatDir{
dirs 'libs'
}

}

Error:

Error:Failed to resolve: uk.me.lewisdeane.ldialogs:ldialog:
Open File

Android Studio version 1.1.0

Light theme issue

Hey mate,
This is an awesome library. But, I am unable to do so although i commented mDarkTheme, passed false value in it.
Since, I am using eclipse had to copy your src files, style and other values in my project. All worked good except this Light theme issue. :(
Thanks for this lib. :) 👍

issue with title

the builder.titleTextSize(12); isn't working if you don't remove the android:textSize="22sp" in the xml

Text sizes

Is there any possibility that we could set text sizes for title/items?

Colors should be int and not String

It should be possible to set the color with a resource id.

    public Builder positiveColor(@ColorRes int colorResId) {
        this.mPositiveColour = mContext.getResources().getColor(colorResId);
        return this;
    }

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.