Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

Layout fixes #31

Merged
merged 3 commits into from
Oct 25, 2020
Merged

Layout fixes #31

merged 3 commits into from
Oct 25, 2020

Conversation

blackbox87
Copy link
Contributor

What is it?

  • Bug fix (user facing)
  • Feature (user facing)
  • Code base improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Fixes various layout issues on devices using Android 4.1
  • Correct the vector drawable used after #3271

Agreement

@blackbox87
Copy link
Contributor Author

@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
Copy link

MD77MD commented Aug 25, 2020

is this related to my problem #18 (comment)

Copy link
Member

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these changes necessary, because Android <= 4.4 does not know the ...Start and ...End layout params? 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.

So if this is the problem, this looks good to me. However @friendlyanon takes care of the legacy repository and should therefore merge / review this PR.

@blackbox87
Copy link
Contributor Author

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() and android:supportsRtl, which are only available in Android 4.2 or newer.

@blackbox87
Copy link
Contributor Author

@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.

@friendlyanon friendlyanon merged commit ede2479 into TeamNewPipe:dev Oct 25, 2020
juanpaulconte added a commit to juanpaulconte/NewPipe-legacy that referenced this pull request Nov 1, 2020
Applied the pull request: Polish strings #4655 (NewPipe)
Applied the pull request: Layout strings TeamNewPipe#31 (NewPipe-legacy)
@blackbox87 blackbox87 deleted the layoutfixes branch November 16, 2020 00:52
juanpaulconte added a commit to juanpaulconte/NewPipe-legacy that referenced this pull request Aug 9, 2021
Applied the pull request: Polish strings #4655 (NewPipe)
Applied the pull request: Layout strings TeamNewPipe#31 (NewPipe-legacy)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants