Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
e2cedc42
Commit
e2cedc42
authored
Feb 02, 2019
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove profile pic from complaint adapter
parent
b743c356
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
15 deletions
+3
-15
app/src/main/java/app/insti/adapter/ComplaintsAdapter.java
app/src/main/java/app/insti/adapter/ComplaintsAdapter.java
+2
-6
app/src/main/res/layout/complaint_card.xml
app/src/main/res/layout/complaint_card.xml
+1
-9
No files found.
app/src/main/java/app/insti/adapter/ComplaintsAdapter.java
View file @
e2cedc42
...
...
@@ -61,7 +61,6 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
public
class
ComplaintsViewHolder
extends
RecyclerView
.
ViewHolder
{
private
CardView
cardView
;
private
CircleImageView
circleImageView
;
private
ImageButton
buttonComments
;
private
ImageButton
buttonVotes
;
private
ImageButton
notificationson
;
...
...
@@ -88,7 +87,6 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
notificationson
=
currentView
.
findViewById
(
R
.
id
.
buttonnotificationson
);
textViewComments
=
currentView
.
findViewById
(
R
.
id
.
text_comments
);
textViewVotes
=
currentView
.
findViewById
(
R
.
id
.
text_votes
);
circleImageView
=
currentView
.
findViewById
(
R
.
id
.
circleImageViewUserImage
);
}
private
void
bindHolder
(
final
int
position
)
{
...
...
@@ -102,7 +100,7 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
});
try
{
populateViews
(
pos
,
circleImageView
,
notificationson
,
notificationsoff
,
textViewVotes
,
textViewComments
);
populateViews
(
pos
,
notificationson
,
notificationsoff
,
textViewVotes
,
textViewComments
);
buttonComments
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
...
...
@@ -174,10 +172,8 @@ public class ComplaintsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
}
}
private
void
populateViews
(
int
pos
,
CircleImageView
circleImageView
,
ImageButton
notificationson
,
ImageButton
notificationsoff
,
TextView
textViewVotes
,
TextView
textViewComments
)
{
private
void
populateViews
(
int
pos
,
ImageButton
notificationson
,
ImageButton
notificationsoff
,
TextView
textViewVotes
,
TextView
textViewComments
)
{
try
{
String
profileUrl
=
complaintList
.
get
(
pos
).
getComplaintCreatedBy
().
getUserProfilePictureUrl
();
Picasso
.
get
().
load
(
profileUrl
).
placeholder
(
R
.
drawable
.
user_placeholder
).
into
(
circleImageView
);
textViewLocation
.
setText
(
complaintList
.
get
(
pos
).
getLocationDescription
());
textViewUserName
.
setText
(
complaintList
.
get
(
pos
).
getComplaintCreatedBy
().
getUserName
());
textViewStatus
.
setText
(
complaintList
.
get
(
pos
).
getStatus
().
toUpperCase
());
...
...
app/src/main/res/layout/complaint_card.xml
View file @
e2cedc42
...
...
@@ -25,20 +25,12 @@
android:padding=
"5dp"
android:orientation=
"horizontal"
>
<de.hdodenhof.circleimageview.CircleImageView
android:id=
"@+id/circleImageViewUserImage"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_gravity=
"top"
android:scaleType=
"centerCrop"
/>
<LinearLayout
android:id=
"@+id/linearLayoutUser"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_marginLeft=
"12dp"
android:layout_marginRight=
"12dp"
android:layout_marginRight=
"5dp"
android:layout_weight=
"3"
android:orientation=
"vertical"
>
...
...
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