-
Notifications
You must be signed in to change notification settings - Fork 46
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
Refactor to AndroidX #172
Refactor to AndroidX #172
Conversation
I also would like to change version scheme. Preference library usually doesn't receive breaking updates and therefore there is no need to keep the version code in sync with upstream.
@Gericop Ready to merge. |
Going to test it thoroughly and hopefully release it tomorrow to bintray. |
Any updates? |
Working on it right now but my Android Studio is being an idiot. First it launched the app which crashed due to "missing MyApplication" class (wtf? it's there...) and now it just wouldn't recognize the project as an Android one anymore... |
At least the bintray repo is set up at https://bintray.com/takisoft/android. |
Awesome! You should try clean project + invalidate cache and restart. 🤣 |
I found one error so far: the |
Hmm yeah I didn't test API <19. 😅 |
Ok, so I started investigating the layout files and it's "funny", the guys (once again) missed the |
Well, found the other "easter egg": This is how the android:paddingStart="@dimen/preference_seekbar_padding_start"
android:paddingEnd="@dimen/preference_seekbar_padding_end" which just doesn't work, the paddings in the emulator are symmetrical instead of being 0dp on the left and 22dp on the right. How to fix it? Add the android:paddingStart="@dimen/preference_seekbar_padding_start"
android:paddingLeft="@dimen/preference_seekbar_padding_start"
android:paddingEnd="@dimen/preference_seekbar_padding_end"
android:paddingRight="@dimen/preference_seekbar_padding_end" Now the
I mean, c'mon Google, get your shit together... |
Reported it: https://issuetracker.google.com/issues/111405638 |
Also, committed a patch to the AOSP to fix this in AndroidX: |
Huh nice. I'm guessing that not even Google cares about Android 4.x any more. BTW how do you contribute to AOSP? |
Yeah, I get that Android 4.x is pretty old but if they officially support it by setting the minSdk to 14 then they should test everything at least once... Check out the Submitting Patches guide for details about how to contribute to AOSP. |
Thanks! Seems pretty complicated...
I think that's just a warning. You can suppress it using |
I just submitted all of the artifacts to bintray and now waiting for it to be included in jcenter. If you want to use it right away, you need to add the repo URL repositories {
maven {
url "https://dl.bintray.com/takisoft/android"
}
} |
Looks good! I'm already starting to use it in my own project. Kudos to you! |
Meanwhile they became available on jcenter, so you don't need to specify the repo URL separately. |
@Mygod Funny thing is, I reported the issue about the |
Oh wow. So found the single attribute that decides whether it produces the error or not: |
Deleted the dev-v28 branch and created a new one with the name androidx (so basically renamed it). |
We should add the bugfix for SeekBarPreference to README as well. |
No need in my opinion as the lib contains the fixed layout files, and as soon as the patch gets reviewed and merged (and released ofc), I'll remove them. |
Sounds good. |
@Gericop @Mygod Hi, thanks a lot for this lib, helped me a lot in my projects. However, after updating to androidx, all of my settings fragment got additional margin from the left (As seen in this screenshot: https://user-images.githubusercontent.com/5181621/42691091-fdd97c6c-86a6-11e8-891f-a2460035e182.png) |
That's because the new design reserves the icon space automatically so if you set an icon on one or more preferences, it wouldn't look awkward. That being said, you can turn it off by setting the |
@Gericop Thanks, will test it out. The next thing i noticed, is that onSharedPreferenceChanged is not getting called at all. Its inflated by replacing FrameLayout with fragment from parent activity. |
Btw, #132 still occures in alpha01 |
@feelfreelinux What do you mean |
@Gericop Oh, my fault. During AndroidX refactor, I accidentally removed |
@Gericop Hi there! |
It seems like the icon (and the space for it) is handled differently in the category layout than in a preference, and thus it does not work. I'll file a bug report with Google and provide a bug fix in this lib until it gets resolved officially. |
@adrcotfas @feelfreelinux Reopened the #132 issue. Also, published v1.0.0-alpha2 that contains the bug fix for this problem. |
Fix #146. TODO:
com.takisoft.preferencex
;Continuing discussion in #171, I think it's best to rename this repo with redirection and keep the old code in another branch. Also I'd like to change version scheme if you don't mind (see 2549217).