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

Refactor to AndroidX support library v1.0.0-alpha1 #146

Open
gregkorossy opened this issue Mar 7, 2018 · 33 comments
Open

Refactor to AndroidX support library v1.0.0-alpha1 #146

gregkorossy opened this issue Mar 7, 2018 · 33 comments
Assignees

Comments

@gregkorossy
Copy link
Owner

No description provided.

@gregkorossy gregkorossy self-assigned this Mar 7, 2018
@gregkorossy gregkorossy changed the title Upgrade to support library v28.0.0-alpha1 Refactor to AndroidX support library v1.0.0-alpha1 May 9, 2018
@gregkorossy
Copy link
Owner Author

According to the AndroidX refactoring page the new version number will be 1.0.0(-alpha1 for now). This will result in a new artifact (preference instead of preference-v7) for the library too in order to use consistent versioning and naming.

@tcqq
Copy link

tcqq commented May 15, 2018

@Gericop I have now upgraded my project to Android X, but the code has got an error
import androidx.preference.Preference;

Can now use compile 'com.takisoft.fix:preference-v7:27.1.1.1-alpha1' version?

@gregkorossy
Copy link
Owner Author

It's gonna be com.takisoft.fix:preference:1.0.0.0-alpha1 but it's not refactored yet so you cannot use it right now.

@tcqq
Copy link

tcqq commented May 15, 2018

Now that PreferenceFragmentCompatDividers extends not androidx, caused multiple errors in my BaseFragment code.

When can I use com.takisoft.fix:preference:1.0.0.0-alpha1?

@gregkorossy
Copy link
Owner Author

In the next few days probably.

@tcqq
Copy link

tcqq commented May 16, 2018

Ok.

@gregkorossy
Copy link
Owner Author

Sorry, I had a lot to do recently. It's gonna be out only next Tuesday (May 22).

@tcqq
Copy link

tcqq commented May 20, 2018

Ok.

@b95505017
Copy link

Any update?

@gregkorossy
Copy link
Owner Author

It's work in progress. This week has been a bit busy unfortunately.

@gregkorossy
Copy link
Owner Author

So, I've finally started working on the refactor (first the DateTimePicker and ColorPicker sublibs). Updates coming soon in a new repo.

@Mygod
Copy link
Contributor

Mygod commented Jun 11, 2018

Meanwhile what about 28.0.0-alpha3?

@gregkorossy
Copy link
Owner Author

Work in progress now.

@Mygod Mygod mentioned this issue Jul 11, 2018
2 tasks
@gregkorossy
Copy link
Owner Author

The AndroidX version is available now. Check out https://bintray.com/takisoft/android for the available modules.

Note that it has some breaking changes, like the missing PreferenceFragmentCompatDividers class (just use PreferenceFragmentCompat from com.takisoft.preferencex). Also the license is Apache v2 from now on.

@Mygod
Copy link
Contributor

Mygod commented Jul 21, 2018

I think we can close this for now.

@gregkorossy
Copy link
Owner Author

I'll leave this open until the lib's AndroidX version is released to the master branch and the repo is transferred to its new place. Just a few more days (probably Monday).

@divadsn
Copy link

divadsn commented Sep 17, 2018

any update on that? AndroidX has now a rc version.

@gregkorossy
Copy link
Owner Author

@divadsn Not much. You can use the AndroidX version, however, from the link mentioned above (https://bintray.com/takisoft/android) by adding these to your gradle file:

implementation 'androidx.preference:preference:1.0.0-rc02'
implementation 'com.takisoft.preferencex:preferencex:1.0.0-alpha2'

@RocketRider
Copy link

The AndroidX 1.0.0 and the 28.0.0 are now stable. Looking forward to upgrade my app ;)

@gregkorossy
Copy link
Owner Author

Yeah, probably will publish the final version of the support lib (28.0.0.0) on Monday and AndroidX 1.0.0 the same or the next day.

@gregkorossy
Copy link
Owner Author

@RocketRider v28.0.0.0 is out. AndroidX has to wait til tomorrow.

@gregkorossy
Copy link
Owner Author

The AndroidX version is basically ready to roll, however, I need to wait until the two external packages (ColorPicker and DateTimePicker) are available on jcenter.

@gregkorossy
Copy link
Owner Author

1.0.0 is available on jcenter. Thanks for the patience, and everyone who contributed, especially @Mygod.

Use this to add it to your project:

implementation 'androidx.preference:preference:1.0.0'
implementation 'com.takisoft.preferencex:preferencex:1.0.0'

P.S.: This repo will be "moved" in the coming days to a new one where the AndroidX version will reside while this one becomes dormant.

@andreluizreis
Copy link

andreluizreis commented Oct 1, 2018

@Gericop I updated the library as you recommended previously. However, Android Studio is not finding the @style/PreferenceFixTheme on my style.xml file. Do you know about this problem?
@style/PreferenceFixTheme.Light.DarkActionBar not found.

@gregkorossy
Copy link
Owner Author

@andreluizreis That theme is no longer needed, thus it was removed. Just use a regular AppCompat or MaterialComponents theme.

@andreluizreis
Copy link

andreluizreis commented Oct 2, 2018

@Gericop , I changed the theme to Theme.AppCompat.Light.DarkActionBar. I am using the two imports as you commented above:
implementation 'androidx.preference:preference:1.0.0' implementation 'com.takisoft.preferencex:preferencex:1.0.0'

I continue to use the onCreatePreferencesFix method from PreferenceFragmentCompat class from your library. I am receiving the error:
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getPaddingStart()' on a null object reference.

Could you please give an explanation with the differences between the new library and the current rep. documentation?

@gregkorossy
Copy link
Owner Author

@andreluizreis Could you open a separate issue with the stack trace and some details, like the version of Android? I cannot reproduce the issue.

@andreluizreis
Copy link

Yes. I will do tomorrow. Thanks for helping me.

@andreluizreis
Copy link

andreluizreis commented Oct 5, 2018

@Gericop My app is not giving that error anymore. I can run it now without crash but I don't see any difference with your fix and without it. The items are showing with the wrong indentation.

Title
------> Link Title
------> Subtitle

Title
------> Link Title
------> Subtitle

Or in my other page

Title Big

Title
------> Switch
------> Switch
------> Switch
---------------------------`

Before the update to androidx, I didn't have problems with these tabs at the front of the items.
I don't know if some else is getting this same issue.
Do you think it is better to open a new issue here in the GitHub?

@gregkorossy
Copy link
Owner Author

@andreluizreis Are you talking about the icon space before the preferences (marked with red rectangle in the picture below)?
kep

@andreluizreis
Copy link

andreluizreis commented Oct 5, 2018

@Gericop, I am adding an image now. There is a new line below the first title that didn't have before. And the space before the switch.

screenshot_2018-10-05-13-23-54

@gregkorossy
Copy link
Owner Author

@andreluizreis Open a new issue and post your XML file as well as this image. Your category elements seem weird.

@andreluizreis
Copy link

andreluizreis commented Oct 5, 2018

@Gericop Ok. I posted now.

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

No branches or pull requests

7 participants