-
Notifications
You must be signed in to change notification settings - Fork 433
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
Change Holo dialogs to Material #270
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried this changes in API 19 and dialogs are not rendered properly.
Need to check with API >= 21 yet.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) | ||
return new LightAlertDialog(context, Theme_Material_Light_Dialog_Alert); | ||
else | ||
return new LightAlertDialog(context, Theme_Holo_Light_Dialog); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This two calls should be new LightAlertDialog.Builder(...)
@@ -17,9 +17,14 @@ | |||
|
|||
import android.app.AlertDialog; | |||
import android.content.Context; | |||
import android.os.Build; | |||
|
|||
import static android.R.style.Theme; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import is not needed
@jonan Are you working on this? if not I can make the necessary changes suggested by you and raise a PR. |
Sorry it's been a while, I just added the requested changes. |
This change allows Material dialogs to be used if available (running Lollipop or above), while maintaining support for API < 21.
THEME_HOLO_LIGHT
is also apparently deprecated, so it has been replaced.