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

Fix the settings screen layout issue #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/src/main/res/values-sw360dp-v13/preference.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this in values-sw-360dp-v13? Couldn't it just be in values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried it putting it in values but it didn't work. You can refer to this thread, https://stackoverflow.com/questions/18509369/android-how-to-remove-margin-padding-in-preference-screen


<!--Created By Me to fix the appearance issue caused by migrating to AndroidX-->
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't need a comment for this -- the git history can add this context 🙂

Copy link
Contributor Author

@DKillWorld DKillWorld Jul 29, 2019

Choose a reason for hiding this comment

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

Nvm about that comment. i have changed so many files till now. I have put there everywhere in my local copy just incase if anything breaks, I know exactly where to look at. 😄

Edit:Screenshot Updated.

<resources xmlns:tools="http://schemas.android.com/tools">
<bool name="config_materialPreferenceIconSpaceReserved" tools:ignore="MissingDefaultResource,PrivateResource">false</bool>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like this should be overridden in the theme itself. Does it help to change preferenceTheme in styles.xml with a new style that contains this attribute?

<item name="iconSpaceReserved">false</item>

Copy link
Contributor Author

@DKillWorld DKillWorld Jul 29, 2019

Choose a reason for hiding this comment

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

This may work, I think. But this attribute doesn't work for PreferenceCategory (The title of the preference).

<dimen name="preference_category_padding_start" tools:ignore="MissingDefaultResource,PrivateResource">0dp</dimen>
</resources>