-
Notifications
You must be signed in to change notification settings - Fork 373
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
Appearance improvements #2359
Conversation
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); | ||
} |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserDialog.java
Show resolved
Hide resolved
|
||
holder.image.postDelayed(() -> { |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
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); |
There was a problem hiding this comment.
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
(cherry picked from commit c4ba9e7)
This PR adds some appearance improvements: