-
Notifications
You must be signed in to change notification settings - Fork 303
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
Add support for wide Org Tables #74
Comments
Same here! |
I would approach this as follows: |
I'm not sure what will be the best way to do this. Using Spans is another option. Perhaps we should check how some other apps do it. There are libraries too - for example, I have Markwon in my notes as something to check. |
Sure, having looked into the code a bit more, I think spans might be a better idea. |
Sure, sounds good. What would clicking of the link do? Are you thinking something like a popup window, entering edit mode for entire content, just that cell, or something else? BTW, horizontal scrolling of the content is also needed (it's actually what the main issue here is - one could use monospaced font even now as a workaround for aligning, but still have the same problem with wrapping). |
I was thinking of a new combined view/edit screen. The table's content could be truncated or collapsed somehow on the main note view (like a drawer) to avoid needing horizontal scrolling there. You'd need to go to the new screen to view the table. |
These days, the sorta-standard way to display wide tables and images on phone screens is to have the individual tables or images be scrollable horizontally on their own, without the rest of the content being affected. Works pretty well on websites: e.g. see any larger table on Wikipedia. |
I don't mind the horizontal scroll, though being able to collapse/hide the table sounds useful for larger tables. |
@nevenz I've been experimenting with horizontal scrolling of the note content (view only so far) here https://github.com/artbristol/orgzly-android/tree/poc/horizontalscroll It sort-of works (lots still to fix up, of course). It adds a RecyclerView to show the note content as a list of alternating table and non-table sections. I'm not entirely happy with the nested RecyclerView, but to have a single RecyclerView would entail changing the main Recycler view to have e.g.
etc. instead of the current
which seems arduous. I'm wondering what you think of the approach? |
@artbristol, why even use a |
Forgive my ignorance of Android, but I thought a LinearLayout only worked when you knew in advance which views would be contained. Don't we need a ListView or RecyclerView since there could be an arbitrary number of table/text sections in the note content? |
But it's not arbitrary, it's known after So Unless I'm missing something I don't think there's a benefit of using |
Thanks for the feedback. On the branch I've tried to implement your suggestion by removing the recycler view and creating the child views in the list programmatically (using |
Sure, I think it's simpler and can be used until there's a good reason to use BTW, |
OK I've inflated the layouts using the LayoutInflater. |
Sounds good to me. Thanks! |
Created a draft PR #799 |
If an Org Table is too wide, it will wrap making it difficult to read.
Would it be possible to disable wrapping and allow horizontal scrolling for Org Tables only?
The text was updated successfully, but these errors were encountered: