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

Appearance improvements #2359

Merged
merged 5 commits into from
Jul 23, 2024
Merged

Conversation

harshad1
Copy link
Collaborator

This PR adds some appearance improvements:

  • Widget icon colours
  • Dialog layout
  • Recyclerview performance

if (window != null) {
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE | WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
window.setLayout(WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This has to be done after show().

(IMO bad design by the Android devs)

_recyclerList.addItemDecoration(dividerItemDecoration);
// final LinearLayoutManager lam = (LinearLayoutManager) _recyclerList.getLayoutManager();
// final DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(activity, lam.getOrientation());
// _recyclerList.addItemDecoration(dividerItemDecoration);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Divider decoration not needed. The items do this themselves?

Copy link
Owner

Choose a reason for hiding this comment

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

Depends on how it's used. Generally the builtin Recyclerview decoration are better performant but in case there is a own one, of course bad to have multiple.


holder.image.postDelayed(() -> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@gsantner You added this postDelayed in 2022. Do you remember why?

The code works well without it...

Copy link
Owner

Choose a reason for hiding this comment

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

Very likely because it was crashing on some devices without it.

Copy link
Owner

@gsantner gsantner left a comment

Choose a reason for hiding this comment

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

Thank you, seems good. Merging.

@gsantner gsantner merged commit c4ba9e7 into gsantner:master Jul 23, 2024
1 check passed
final Window window = dialog.getWindow();
if (window != null) {
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE | WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
window.setLayout(WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT);
Copy link
Owner

Choose a reason for hiding this comment

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

Should be match_parent I guess for better usage? See latest issue

elyahw pushed a commit to writing-tools/marelias-notepad that referenced this pull request Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File browser: Wrong icons and secondary text while scrolling
2 participants