Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
QuasselDroid-ng
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janne Mareike Koschinski
QuasselDroid-ng
Commits
1263f74a
Verified
Commit
1263f74a
authored
5 years ago
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
Fixes scrolling in chat editor
parent
57beacaf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/main/java/de/kuschku/quasseldroid/util/ui/FixedNestingScrollView.kt
+42
-0
42 additions, 0 deletions
...de/kuschku/quasseldroid/util/ui/FixedNestingScrollView.kt
app/src/main/res/layout/layout_editor.xml
+9
-12
9 additions, 12 deletions
app/src/main/res/layout/layout_editor.xml
with
51 additions
and
12 deletions
app/src/main/java/de/kuschku/quasseldroid/util/ui/FixedNestingScrollView.kt
0 → 100644
+
42
−
0
View file @
1263f74a
/*
* Quasseldroid - Quassel client for Android
*
* Copyright (c) 2019 Janne Mareike Koschinski
* Copyright (c) 2019 The Quassel Project
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3 as published
* by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package
de.kuschku.quasseldroid.util.ui
import
android.content.Context
import
android.util.AttributeSet
import
android.view.MotionEvent
import
androidx.core.widget.NestedScrollView
class
FixedNestingScrollView
:
NestedScrollView
{
constructor
(
context
:
Context
)
:
super
(
context
)
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?)
:
super
(
context
,
attrs
)
constructor
(
context
:
Context
,
attrs
:
AttributeSet
?,
defStyleAttr
:
Int
)
:
super
(
context
,
attrs
,
defStyleAttr
)
override
fun
onInterceptTouchEvent
(
ev
:
MotionEvent
?):
Boolean
{
if
(!
canScrollVertically
(-
1
))
return
false
return
super
.
onInterceptTouchEvent
(
ev
)
}
}
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/layout_editor.xml
+
9
−
12
View file @
1263f74a
...
@@ -31,9 +31,10 @@
...
@@ -31,9 +31,10 @@
android:layout_weight=
"1"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<
androidx.constraintlayout.widget.Constraint
Layout
<
Linear
Layout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<androidx.appcompat.widget.AppCompatImageButton
<androidx.appcompat.widget.AppCompatImageButton
android:id=
"@+id/tab_complete"
android:id=
"@+id/tab_complete"
...
@@ -50,15 +51,11 @@
...
@@ -50,15 +51,11 @@
app:srcCompat=
"@drawable/ic_tab"
app:srcCompat=
"@drawable/ic_tab"
app:tint=
"?attr/colorTextSecondary"
/>
app:tint=
"?attr/colorTextSecondary"
/>
<ScrollView
<
de.kuschku.quasseldroid.util.ui.FixedNesting
ScrollView
android:id=
"@+id/chatline_scroller"
android:id=
"@+id/chatline_scroller"
android:layout_width=
"0dp"
android:layout_width=
"0dip"
android:layout_height=
"0dp"
android:layout_height=
"match_parent"
app:layout_constraintBottom_toBottomOf=
"parent"
android:layout_weight=
"1"
>
app:layout_constraintEnd_toStartOf=
"@+id/send"
app:layout_constraintHorizontal_bias=
"1.0"
app:layout_constraintStart_toEndOf=
"@+id/tab_complete"
app:layout_constraintTop_toTopOf=
"parent"
>
<de.kuschku.quasseldroid.ui.chat.input.RichEditText
<de.kuschku.quasseldroid.ui.chat.input.RichEditText
android:id=
"@+id/chatline"
android:id=
"@+id/chatline"
...
@@ -77,7 +74,7 @@
...
@@ -77,7 +74,7 @@
android:paddingBottom=
"8dp"
android:paddingBottom=
"8dp"
android:textColor=
"?attr/colorForeground"
android:textColor=
"?attr/colorForeground"
android:textSize=
"16sp"
/>
android:textSize=
"16sp"
/>
</ScrollView>
</
de.kuschku.quasseldroid.util.ui.FixedNesting
ScrollView>
<androidx.appcompat.widget.AppCompatImageButton
<androidx.appcompat.widget.AppCompatImageButton
android:id=
"@+id/send"
android:id=
"@+id/send"
...
@@ -95,7 +92,7 @@
...
@@ -95,7 +92,7 @@
app:srcCompat=
"@drawable/ic_send"
app:srcCompat=
"@drawable/ic_send"
app:tint=
"?attr/colorAccent"
app:tint=
"?attr/colorAccent"
tools:ignore=
"UnusedAttribute"
/>
tools:ignore=
"UnusedAttribute"
/>
</
androidx.constraintlayout.widget.Constraint
Layout>
</
Linear
Layout>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/autocomplete_list"
android:id=
"@+id/autocomplete_list"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment