Comments (44)
odd. when trying the library on kitkat, I don't see the dividers.
from alertdialogpro.
I highly agree with point number 1 and 3!
from alertdialogpro.
There are also other warnings on other files, not just on this layout.
This was just the most visible stuff...
from alertdialogpro.
About the layout optimization. I ported it from the Android platform. I hope this project would perform the same as the platform's AlertDialog. So I suggest not modify the layout structure and keep it consistent with the platform.
About support RTL, I opened a new issue #6.
About the theme, I think the Lollipop's button use the color which is defined as android:colorAccent
. It's Lollipop's new feature called "Color palette". I will try to fix it. Use the appcompat-v7:21.0.0
in material theme module may be a good choice.
from alertdialogpro.
@fengdai Then I should probably tell Google about those issues instead. I should also tell them about the bug with the customView, which makes the buttons disappear .
I don't get why the divider looks different. Maybe it's a bug on the emulator?
About the Layout, I think I know why they added it: for some cases, the dialog's width would be very small without any reason, making the height very large.
This looks like a workaround. I'm not sure why exactly it occurs though, so I'm not sure how to fix it (other than using what they did).
About the color of the buttons, according to the xml, it's based on "textColorPrimary" , but I usually set it to black, as texts are usually black...
But this doesn't explain why I got a different color on the native dialog. Weird.
Is it possible that the emulator doesn't have the exact version as the code you've extracted from?
from alertdialogpro.
About the bug with customView, It‘s my mistake. I missed android:layout_weight="1"
. The Android platform's layout doesn't have this issue.
About the color of the buttons, The reason is that the platform's AlertDialog uses the android:colorAccent
as it's button color. My project's is based on textColorPrimary
. I'm trying to make it the same as the platform with appcompat-v7.
from alertdialogpro.
I don't understand.
Do you mean they've fixed it exactly as I've recommended?
On Sun, Oct 26, 2014 at 10:37 AM, Feng Dai [email protected] wrote:
About the bug with customView, It‘s my mistake. I missed
android:layout_weight="1". The Android platform's layout
https://github.com/android/platform_frameworks_base/blob/master/core/res/res/layout/alert_dialog_holo.xml
doesn't have this issue.—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from alertdialogpro.
No. The platform itself doesn't have that issue. I deleted android:layout_weight="1"
by mistake when I ported the layout from the platform.
from alertdialogpro.
That's what I meant :
They solved it by using the same thing I've suggested, and you accidentally
removed it.
On Sun, Oct 26, 2014 at 12:52 PM, Feng Dai [email protected] wrote:
No. The platform itself doesn't have that issue. I deleted
android:layout_weight="1" by mistake when I ported the layout from the
platform.—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from alertdialogpro.
@fengdai Why did you close it? now it's shown like on Lollipop?
from alertdialogpro.
Hi, @AndroidDeveloperLB. I have fixed it. Now it looks the same as the Lollipop's AlertDialog.
You can go to checkout the newest code. If you find some other problems about materal theme, you can open new issues for them respectively. The topic of this issue is a little broad.
from alertdialogpro.
@fengdai Nice. But I see the buttons of the dialog on the sides. Did Google make it?
Also, how come the custom View is again minimized in width? It makes my listView to become very thin this way, and it hides the buttons on the bottom this way...
Looking at the previous version, I don't see much difference. How could it be?
How can I fix this?
from alertdialogpro.
@AndroidDeveloperLB can you post screen capture and code snippets?
BTW: I suggest you to open a new issue. Do not combine multiple problems. Write different reports for each problem.
from alertdialogpro.
yes, here's a screenshot. I will try to make a new post when I get back home, and maybe add a code to demonstrate it.
from alertdialogpro.
Well this is weird. I've tried using the sample app you've created, and it seems to work fine with a listView that I've giving it.
However, when using "material" style, it seems to have quite odd colors.
I'll need to investigate it further.
Thanks for all the help.
from alertdialogpro.
What do you mean by "odd colors"?
from alertdialogpro.
A list alone doesn't cause the problem. It's the whole view itself that caused it, but it worked fine before...
ok, I've come up with a sample to show what I mean, but since I can't put files here (except for images), here's a Google drive link instead:
https://drive.google.com/file/d/0B-PZZGk2vPohanpDcWd0YmpEMEE
The sample shows 2 problems that I didn't have on the previous version I've tested:
- when choosing the "material" theme (not the light one) , the text color is black on a gray background, hence I call it weird colors. Pretty sure I can fix it, but I don't understand why it happened. It occurs for case #2 too.
- when using my custom view, which has a listView and a spinner, it becomes very narrow. I have no idea why it happens. This doesn't occur on the native alertDialog (I've also added a proof for it, by adding a native dialog option).
Please check it out.
Here are some screenshots:
case #1 , using "material" theme (not the light one) :
case #2 , using custom view (listView+spinner) and "material light" :
case #2, using custom view (listView+spinner) and the native theme :
This all was running on Kitkat. I've also tested it on the Lollipop emulator and for some reason, only case #1 occurred there. case #2 was working just fine...
from alertdialogpro.
- when choosing the "material" theme (not the light one) , the text color is black on a gray background, hence I call it weird colors. Pretty sure I can fix it, but I don't understand why it happened. It occurs for case #2 too.
That's because when you inflate the custom ListView, the platform use the activity's default theme AppTheme
. So the text color is black. To fix this, use ContextThemeWrapper:
LayoutInflater.from(new ContextThemeWrapper(MainActivity.this,mTheme)).inflate(R.layout.select_dialog_item,parent,false);
from alertdialogpro.
I see. How do I fix the other issue?
On Nov 8, 2014 5:11 AM, "Feng Dai" [email protected] wrote:
when choosing the "material" theme (not the light one) , the text
color is black on a gray background, hence I call it weird colors. Pretty
sure I can fix it, but I don't understand why it happened. It occurs for
case #2 #2 too.That's because when you inflate the custom ListView, the platform use
the activity's default theme AppTheme. So the text color is back. To fix
this, use ContextThemeWrapper:LayoutInflater.from(new ContextThemeWrapper(MainActivity.this,mTheme)).inflate(R.layout.select_dialog_item,parent,false);
—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from alertdialogpro.
I haven't found the reason. I'll reply you as soon as possible when I find it.
from alertdialogpro.
Thank you.
from alertdialogpro.
To some extent this commit 1576799 can fix the second issue.
But this only works in android 3.0 and above. I'll continue digging.
from alertdialogpro.
Odd.
How could it be that the previous version of the library worked, and now it doesn't? maybe you could compare between the two?
from alertdialogpro.
The previous version also has this issue, if you run it on Android version below 3.0.
from alertdialogpro.
Modify the dialog_share.xml file. Let the two TextViews' layout_width
"match_parent". Then it works fine.
from alertdialogpro.
Hey you are right. I wonder why it's different between the APIs...
Also, when using "android.support.v7.widget.LinearLayoutCompat" , it works fine, so it's probably something in how the LinearLayout is implemented.
from alertdialogpro.
Say, why did you make the class "CheckedTextViewCompat" ?
from alertdialogpro.
Say, why did you make the class "CheckedTextViewCompat" ?
To draw checkmark to the left of TextView as Lollipop's CheckedTextView.
from alertdialogpro.
I see. Maybe you should write about it in this class.
from alertdialogpro.
Fine.
from alertdialogpro.
Also, does the "marquee" really do anything in "select_dialog_multichoice_material.xml" ? I ask this since I see that there are no restrictions about the number of lines...
I also don't see the style have any restrictions of this .
Personally I prefer it to be multi-lines instead of being truncated (some languages use long text).
from alertdialogpro.
You are right. It seems do nothing...
Since the platform's "select_dialog_multichoice_material.xml" also contain this line, I prefer to keep it.
from alertdialogpro.
Maybe it's a leftover that whoever updated this code didn't notice it won't do anything, or was afraid to ruin something when changing it.
from alertdialogpro.
I've noticed another thing:
In the sample project, the "showCustomView" button is invisible, and it doesn't really show a custom view (it uses : "setView(null)" ).
from alertdialogpro.
@AndroidDeveloperLB, I haven't completed it. I found an issue when I tried to set a custom view which contains a single EditText. The EditText can't be clicked to get focus.
from alertdialogpro.
Does it work well for Android Lollipop, at least, as the library probably uses the official API if possible?
from alertdialogpro.
I have fixed it. Look at this issue #11 for details.
from alertdialogpro.
Thank you.
from alertdialogpro.
Thank you for your help.
I also strongly recommend you to open new issues instead of write them here when you find some other problems.
from alertdialogpro.
but they all relate to the fact it wasn't as it was supposed to look like.
So now, if I run a dialog on Lollipop and an AlertDialogPro, both look the same?
On Thu, Nov 13, 2014 at 11:32 AM, Feng Dai [email protected] wrote:
Thank you for your help.
I also strongly recommend you to open new issues instead of write them
here when you find some other problems.—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from alertdialogpro.
"it wasn't as it was supposed to look like" is not a specific description. This kind of description can contains multiple problems. So it becomes difficult to track a single problem. Write different reports for each problem is better.
from alertdialogpro.
I don't understand. What's wrong with the way I've presented it? I've shown description and images...
Now I've found another issue (on the emulator, at least). This time it's with the "Show single-choice list" feature that's shown on the sample.
It seems that when you use it, you need to tap the item in the list twice instead of once.
I've made a new post here:
#13
This time, since it's hard to show in images, I've put a video and full project code.
Also, I wish to ask :
What's the purpose of "list_divider_material_light.xml" and "list_divider_material_dark.xml" ? I've ran Lint and also searched for the usage of them, but they seem unused.
from alertdialogpro.
@AndroidDeveloperLB Thank you for your report. They are unused. I'll delete them.
About #13 , I'll check it out soon. I suppose it's caused by CheckedTextViewCompat.
from alertdialogpro.
Thank you.
Please run Lint (and configure it first to show you very interesting things) in order to find such things.
from alertdialogpro.
Related Issues (20)
- Compatibility with support v20 HOT 3
- Suggestion: publish on those websites HOT 3
- Possible to use AlertDialogPro with ListPreference widget?
- White buttons in Activity when using dark theme with AppCompat 22 HOT 2
- ProgressDialogPro exception HOT 12
- adpButtonBarPositiveButtonStyle with Holo theme HOT 5
- Add support for the new Support library 22.1 HOT 6
- Resource not found Exception for Api > 21 HOT 4
- Checkbox Buttons Offset on Xperia T HOT 1
- Error when tryin do compile 23 SDK version HOT 3
- Do it support accent color of edittext in the alert dialog pro? HOT 1
- NoClassDefFoundError AllCapsTransformationMethod HOT 2
- Caused by: java.lang.NoClassDefFoundError: android.support.v7.internal.widget.TintTypedArray HOT 1
- hope upgrade to compile 'com.android.support:appcompat-v7:23.1.1' HOT 2
- in support v7 23.1.1 android.support.v7.internal become private how to solve this problem? HOT 1
- Failed to resolve: com.github.fengdai:alertdialogpro-theme-material:0.2.6 HOT 2
- Changing texts' typeface HOT 3
- have error with compile 'com.android.support:appcompat-v7:23.2.1' HOT 2
- 示例代码报错? HOT 1
- Issue About Deprecated Then How Can Handle That Issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alertdialogpro.