Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
0cdd58ee
Commit
0cdd58ee
authored
Jun 29, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Brings the toolbar icons visible again.
parent
327aabf7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
ChatRoomsFragment.kt
...ava/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
+9
-10
chatrooms.xml
app/src/main/res/menu/chatrooms.xml
+3
-3
No files found.
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
View file @
0cdd58ee
...
...
@@ -148,7 +148,8 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
inflater
.
inflate
(
R
.
menu
.
chatrooms
,
menu
)
val
searchItem
=
menu
.
findItem
(
R
.
id
.
action_search
)
searchView
=
searchItem
?.
actionView
as
SearchView
?
searchView
=
searchItem
?.
actionView
as
?
SearchView
searchView
?.
setIconifiedByDefault
(
false
)
searchView
?.
maxWidth
=
Integer
.
MAX_VALUE
searchView
?.
setOnQueryTextListener
(
object
:
SearchView
.
OnQueryTextListener
{
override
fun
onQueryTextSubmit
(
query
:
String
?):
Boolean
{
...
...
@@ -176,7 +177,7 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
0
->
R
.
id
.
radio_sort_alphabetical
else
->
R
.
id
.
radio_sort_activity
})
radioGroup
.
setOnCheckedChangeListener
(
{
_
,
checkedId
->
radioGroup
.
setOnCheckedChangeListener
{
_
,
checkedId
->
run
{
SharedPreferenceHelper
.
putInt
(
Constants
.
CHATROOM_SORT_TYPE_KEY
,
when
(
checkedId
)
{
R
.
id
.
radio_sort_alphabetical
->
0
...
...
@@ -184,23 +185,21 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
else
->
1
})
}
}
)
}
groupByTypeCheckBox
.
isChecked
=
groupByType
groupByTypeCheckBox
.
setOnCheckedChangeListener
(
{
_
,
isChecked
->
groupByTypeCheckBox
.
setOnCheckedChangeListener
{
_
,
isChecked
->
SharedPreferenceHelper
.
putBoolean
(
Constants
.
CHATROOM_GROUP_BY_TYPE_KEY
,
isChecked
)
}
)
}
val
dialogSort
=
AlertDialog
.
Builder
(
context
)
AlertDialog
.
Builder
(
context
)
.
setTitle
(
R
.
string
.
dialog_sort_title
)
.
setView
(
dialogLayout
)
.
setPositiveButton
(
"Done"
,
{
dialog
,
_
->
.
setPositiveButton
(
"Done"
)
{
dialog
,
_
->
invalidateQueryOnSearch
()
updateSort
()
dialog
.
dismiss
()
})
dialogSort
.
show
()
}.
show
()
}
}
return
super
.
onOptionsItemSelected
(
item
)
...
...
app/src/main/res/menu/chatrooms.xml
View file @
0cdd58ee
...
...
@@ -6,13 +6,13 @@
android:id=
"@+id/action_search"
android:icon=
"@drawable/ic_search_white_24px"
android:title=
"@string/action_search"
a
ndroid
:actionViewClass=
"androidx.appcompat.widget.SearchView"
a
ndroid
:showAsAction=
"ifRoom|collapseActionView"
/>
a
pp
:actionViewClass=
"androidx.appcompat.widget.SearchView"
a
pp
:showAsAction=
"ifRoom|collapseActionView"
/>
<item
android:id=
"@+id/action_sort"
android:icon=
"@drawable/ic_sort"
android:title=
"@string/menu_chatroom_sort"
a
ndroid:showAsAction=
"always
"
/>
a
pp:showAsAction=
"ifRoom
"
/>
</menu>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment