greenaddress / abcore

ABCore - Android Bitcoin Core
http://abco.re
MIT License
164 stars 55 forks source link

Refactor Log activity #102

Closed caiofaustino closed 4 years ago

caiofaustino commented 5 years ago

Refactored the Log activity to be smoother.

caiofaustino commented 5 years ago

Just force pushed adding the scrollbar to the layout.

caiofaustino commented 5 years ago

There is still an issue with the auto scrolling I couldn't fix easily.

Basically when the log file is bigger than the max number of lines we read on the screen, 10k I guess, then the list update sort of auto scrolls any way. For example, I'm showing lines 4, 5 and 6, now the file updates and lines 4, 5 and 6 now became 6, 7 and 8 because there were 2 new lines added. The scroll still shows lines 4, 5 and 6, which now has the content of the previous lines 2, 3 and 4.

So even though the scroll position is still, the content keeps scrolling by. I can try to add some diff logic to make the list smarter and more optimized in a future PR maybe.