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

Adding library messes up with the activity style & show Toolbar by default #45

Closed
RahulSDeshpande opened this issue Feb 17, 2022 · 10 comments

Comments

@RahulSDeshpande
Copy link

RahulSDeshpande commented Feb 17, 2022

I tried adding your library to my Android project:

implementation("com.hbb20:android-country-picker:0.0.6")

When I run the app, it overrides the activity style & show Toolbar by default!!
I am using style with this theme Theme.MaterialComponents.Light.NoActionBar.

This is the only reason I am not using this library 😞

@github-actions
Copy link

I will look into this as soon as I get some time. If it's critical, please contact harshbbhakta@gmail.com

@hbb20
Copy link
Owner

hbb20 commented Feb 17, 2022 via email

@RahulSDeshpande
Copy link
Author

RahulSDeshpande commented Feb 18, 2022

I am using Material theme:

<style name="SfAppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
    ..
</style>

I fixed it, I had to change the style name from AppTheme to some another name, for eg: SfAppTheme.
I found out that your lib AndroidCountryPicker was overriding my app's theme & showing Toolbar by default!! 😞

@hbb20
Copy link
Owner

hbb20 commented Feb 18, 2022 via email

@RahulSDeshpande
Copy link
Author

Exactly, my app's theme should override your lib's theme.
This is strange 😵‍💫

Yes I had applied that theme everywhere.

@hbb20
Copy link
Owner

hbb20 commented Feb 18, 2022 via email

@RahulSDeshpande
Copy link
Author

I was just exploring the library in one of my private projects.
Sorry it's not open source.

@hbb20
Copy link
Owner

hbb20 commented Feb 20, 2022

I created a sample project and kept the theme name "AppTheme" and project's theme overrode the library theme. So not sure why you had to change the theme name. But anyways, it will be a good idea for library to change theme name.

@hbb20
Copy link
Owner

hbb20 commented Feb 26, 2022

v0.0.7 should have this fixed if this was a problem by library in the first place.

@hbb20 hbb20 closed this as completed Feb 26, 2022
@RahulSDeshpande
Copy link
Author

RahulSDeshpande commented Feb 27, 2022

@hbb20 Cool thanks 🤟🏼
I would suggest you to change the lib theme name by adding some prefix to it, like ACPAppTheme.

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

2 participants