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

Change Holo dialogs to Material #270

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NBonaparte
Copy link
Contributor

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.

@jonan jonan added this to Doing in General Mar 29, 2017
Copy link
Owner

@jonan jonan left a 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);
Copy link
Owner

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;
Copy link
Owner

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 jonan added this to Doing in Material Design Apr 8, 2017
@jonan jonan removed this from Doing in General Apr 8, 2017
@saran2020
Copy link
Contributor

saran2020 commented Aug 21, 2017

@jonan Are you working on this? if not I can make the necessary changes suggested by you and raise a PR.

@NBonaparte
Copy link
Contributor Author

Sorry it's been a while, I just added the requested changes.

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

Successfully merging this pull request may close these issues.

None yet

3 participants