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
e3eaeea0
authored
Sep 09, 2016
by
Kunj Gupta
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
UOFLMA-71: Image API related issues are fixed.
parent
7fe592f1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
app/src/main/java/com/vsoft/uoflservicenow/adapters/CatalogueCategoryAdapter.java
app/src/main/java/com/vsoft/uoflservicenow/adapters/CatalogueCategoryItemAdapter.java
app/src/main/java/com/vsoft/uoflservicenow/api/managers/CatalogueApiManager.java
app/src/main/java/com/vsoft/uoflservicenow/db/models/Catalogue.java
app/src/main/java/com/vsoft/uoflservicenow/adapters/CatalogueCategoryAdapter.java
View file @
e3eaeea0
...
...
@@ -82,11 +82,14 @@ public class CatalogueCategoryAdapter extends BaseAdapter {
}
if
(
catalogue
.
getIcon
()
!=
null
&&
!
catalogue
.
getIcon
().
isEmpty
())
{
holder
.
image
.
setVisibility
(
View
.
VISIBLE
);
StringBuilder
builder
=
new
StringBuilder
();
builder
.
append
(
Constants
.
DOMAIN
);
builder
.
append
(
catalogue
.
getIcon
());
Picasso
.
with
(
mContext
).
load
(
builder
.
toString
()).
into
(
holder
.
image
);
}
else
{
holder
.
image
.
setVisibility
(
View
.
INVISIBLE
);
}
...
...
app/src/main/java/com/vsoft/uoflservicenow/adapters/CatalogueCategoryItemAdapter.java
View file @
e3eaeea0
...
...
@@ -82,11 +82,14 @@ public class CatalogueCategoryItemAdapter extends BaseAdapter {
}
if
(
catalogueItem
.
getIcon
()
!=
null
&&
!
catalogueItem
.
getIcon
().
isEmpty
())
{
holder
.
image
.
setVisibility
(
View
.
VISIBLE
);
StringBuilder
builder
=
new
StringBuilder
();
builder
.
append
(
Constants
.
DOMAIN
);
builder
.
append
(
catalogueItem
.
getIcon
());
Picasso
.
with
(
mContext
).
load
(
builder
.
toString
()).
into
(
holder
.
image
);
}
else
{
holder
.
image
.
setVisibility
(
View
.
INVISIBLE
);
}
return
convertView
;
...
...
app/src/main/java/com/vsoft/uoflservicenow/api/managers/CatalogueApiManager.java
View file @
e3eaeea0
...
...
@@ -43,7 +43,7 @@ public class CatalogueApiManager {
CatalogueLog
.
d
(
"CatalogueApiManager: getCatalogues: request parameter: "
+
stringBuilder
.
toString
());
final
Retrofit
retrofit
=
RestClient
.
getInitializedRestAdapter
(
Constants
.
API_AUTH_PARAM_USER_NAME
,
Constants
.
API_AUTH_PARAM_PASSWORD
);
Call
<
ResponseBody
>
call
=
retrofit
.
create
(
CatalogueCategoryApi
.
class
).
getCatalogue
(
stringBuilder
.
toString
(),
"sys_id,title,description,
icon
"
,
"true"
);
Call
<
ResponseBody
>
call
=
retrofit
.
create
(
CatalogueCategoryApi
.
class
).
getCatalogue
(
stringBuilder
.
toString
(),
"sys_id,title,description,
homepage_image
"
,
"true"
);
try
{
//Retrofit synchronous call
Response
<
ResponseBody
>
response
=
call
.
execute
();
...
...
app/src/main/java/com/vsoft/uoflservicenow/db/models/Catalogue.java
View file @
e3eaeea0
...
...
@@ -17,7 +17,7 @@ public class Catalogue {
@SerializedName
(
"sys_id"
)
@Expose
private
String
sysId
;
@SerializedName
(
"
icon
"
)
@SerializedName
(
"
homepage_image
"
)
@Expose
private
String
icon
;
...
...
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