Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with gradle and resources #47

Closed
kamilzych opened this issue Mar 25, 2014 · 7 comments
Closed

Problem with gradle and resources #47

kamilzych opened this issue Mar 25, 2014 · 7 comments

Comments

@kamilzych
Copy link

I've added this library to my project with gradle (compile 'eu.inmite.android.lib:android-styled-dialogs:1.1.2@aar') and my project won't compile if I want to style dialogs in styles.xml because it can't find custom attributes from this library. I have other libraries that use custom attributes (like ActionBarCompat or SmoothProgressBar) and in my project structure I can see build/exploded-aar folder where I can find all libs that are distributed with resources included but there is no android-styled-dialogs there.

@suarezjulian
Copy link

I have the same problem. I'm willing to help coding but any pointers on where the problem might be would really help

@be1box
Copy link

be1box commented Apr 14, 2014

I have the same problem with Android Studio 0.5.+ "Cannot resolve symbol DialogStyleLight" in style DialogStyleLight.Custom.

@Sash0k
Copy link

Sash0k commented Apr 21, 2014

+1. Same issue with gradle

@aphexcx
Copy link

aphexcx commented May 11, 2014

same here, how do you solve this?

@davidvavra
Copy link
Contributor

I'm using AAR version of the library in several Gradle-based projects with no problems. If you send me code of your project I will help you troubleshoot.

However I have worked today on a full switch from Maven/Gradle to Gradle-only. I hope it will solve similar issues.

@8Duke8
Copy link

8Duke8 commented Jul 14, 2014

I was using this library earlier and some time ago I have migrated to Gradle (eu.inmite.android.lib:android-styled-dialogs:1.1.2@aar), but my list item styles stopped working.

Error:(62, 21) No resource found that matches the given name: attr 'listItemColorFocused'.
Error:(60, 21) No resource found that matches the given name: attr 'listItemColorNormal'.
Error:(61, 21) No resource found that matches the given name: attr 'listItemColorPressed'.
Error:(59, 21) No resource found that matches the given name: attr 'listItemSeparatorColor'.

I guess they were replaced or completely removed from the library. My question is: Is there a way how I could set up these styles or is there a workaround for it?

Here is a sample of one of my dialogs using BaseDialogFragment:

                BaseDialogFragment selectStateDialog = new BaseDialogFragment() {
                    @Override
                    protected Builder build(Builder builder) {
                        builder.setTitle(getResources().getString(R.string.pick_a_state));
                        final List<String> usStates = Arrays.asList(getResources().getStringArray(
                                R.array.usStates));
                        ListAdapter adapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, usStates);
                        builder.setItems(adapter, -1, new OnItemClickListener() {
                            @Override
                            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                            }
                        });
                        return builder;
                    }
                };

@davidvavra
Copy link
Contributor

@8Duke8 Hi, you are using newer version of the library than 1.1.2 release. Or maybe it's from some fork. ListDialog will be added in newest release, the master branch is ready, I plan to push it to Maven Central this week. You can wait or use the code in master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants