File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
java/com/omarea/krscript/ui Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -244,10 +244,14 @@ class DialogLogFragment : DialogFragment() {
244244
245245 override fun updateLog (msg : SpannableString ? ) {
246246 val logView = logViewRef.get() ? : return
247+ val scrollView = logView.parent as ? ScrollView ? : return
247248 msg?.let {
248249 logView.post {
250+ val isAtBottom = (logView.bottom - (scrollView.height + scrollView.scrollY)) <= 50
249251 logView.append(it)
250- (logView.parent as ? ScrollView )?.fullScroll(ScrollView .FOCUS_DOWN )
252+ if (isAtBottom) {
253+ scrollView.fullScroll(ScrollView .FOCUS_DOWN )
254+ }
251255 }
252256 }
253257 }
Original file line number Diff line number Diff line change 4545 android : layout_width =" match_parent"
4646 android : layout_height =" match_parent"
4747 android : overScrollMode =" never"
48+ android : paddingEnd =" 10dp"
4849 android : layout_above =" @id/bottom_actions"
4950 android : layout_below =" @+id/top_bar" >
5051
You can’t perform that action at this time.
0 commit comments