Closed kamilzych closed 10 years ago
I have the same problem. I'm willing to help coding but any pointers on where the problem might be would really help
I have the same problem with Android Studio 0.5.+ "Cannot resolve symbol DialogStyleLight" in style DialogStyleLight.Custom.
+1. Same issue with gradle
same here, how do you solve this?
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.
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;
}
};
@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.
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.