Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Krishna Vemulavada
/
vera_2.1_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
553d5ea1
authored
Sep 27, 2016
by
Kunj Gupta
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
UOFLMA-100: Fix - Multiple choice order is random in variable forms.
parent
b4d0612f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
app/src/main/java/com/vsoft/uoflservicenow/ui/CatalogueVariableScreen.java
app/src/main/java/com/vsoft/uoflservicenow/ui/CatalogueVariableScreen.java
View file @
553d5ea1
...
...
@@ -53,6 +53,7 @@ import com.vsoft.uoflservicenow.api.listeners.post.PostVariableFormApiListener;
import
com.vsoft.uoflservicenow.api.managers.CatalogueVariableApiManager
;
import
com.vsoft.uoflservicenow.api.managers.VariableChoiceApiManager
;
import
com.vsoft.uoflservicenow.db.models.Catalogue
;
import
com.vsoft.uoflservicenow.db.models.CatalogueOrder
;
import
com.vsoft.uoflservicenow.db.models.CatalogueVariable
;
import
com.vsoft.uoflservicenow.db.models.CatalogueVariableSet
;
import
com.vsoft.uoflservicenow.db.models.Reference
;
...
...
@@ -79,6 +80,8 @@ import java.io.IOException;
import
java.io.InputStream
;
import
java.net.URISyntaxException
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.List
;
import
butterknife.BindView
;
...
...
@@ -211,6 +214,13 @@ public class CatalogueVariableScreen extends AppCompatActivity {
@Override
public
void
onDoneApiCall
(
List
<
VariableChoice
>
variableChoiceList
)
{
CatalogueLog
.
e
(
"Data: variableChoiceList: "
+
variableChoiceList
);
/*Sort List of CatalogueOrder*/
Collections
.
sort
(
variableChoiceList
,
new
Comparator
<
VariableChoice
>()
{
@Override
public
int
compare
(
VariableChoice
lhs
,
VariableChoice
rhs
)
{
return
(
lhs
.
getOrder
()
-
rhs
.
getOrder
());
}
});
catalogueVariable
.
setVariableChoiceList
(
variableChoiceList
);
}
});
...
...
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