TeamNewPipe / NewPipe-legacy

NewPipe with support for older devices
GNU General Public License v3.0
131 stars 36 forks source link

Layout fixes #31

Closed blackbox87 closed 3 years ago

blackbox87 commented 4 years ago

What is it?

Description of the changes in your PR

Agreement

blackbox87 commented 4 years ago

@friendlyanon @TobiGr Is there a reason this pull request didn't get merged into v0.19.8?

Currently you're using stuff like layout_marginStart, but because that attribute doesn't exist in API 16 you don't get the expected look. Android Studio would normally warn you about this and fail to compile the app, but for some reason NewPipe Legacy is setup to ignore these warnings.

MD77MD commented 4 years ago

is this related to my problem https://github.com/TeamNewPipe/NewPipe-legacy/issues/18#issuecomment-679415946

blackbox87 commented 4 years ago

Are these changes necessary, because Android <= 4.4 does not know the ...Start and ...End layout params?

Yes. Here's a quick example of what NewPipe Legacy looks like before and after applying the changes. newpipe_compare

If this is the case, I'd like to draw your attention to TeamNewPipe/NewPipe#3488 which removes the hard-coded left and right layout params for better RTL support.

That pull request will be a problem for NewPipe Legacy because they've replaced the left/right attributes with start/end and they've also used [getLayoutDirection()](https://developer.android.com/reference/android/content/res/Configuration#getLayoutDirection()) and android:supportsRtl, which are only available in Android 4.2 or newer.

blackbox87 commented 4 years ago

@TobiGr By the way, one of the fixes in this pull request should also be copied to NewPipe.

Issues like this keep slipping through because of how NewPipe is configured to ignore most warnings. In this case the drawable doesn't exist, which isn't a critical issue, but it is when you're trying to use methods that don't exist on your minimum API level.