Skip to content
Snippets Groups Projects
Commit 6e0e6052 authored by John's avatar John
Browse files

Merge branch 'develop' into 'develop'

Added "open/closed message" to issue list item (#162)



See merge request !15
parents cf98c0cd 61f7b9b0
No related branches found
No related tags found
1 merge request!15Added "open/closed message" to issue list item (#162)
Pipeline #
Loading
Loading
@@ -28,6 +28,7 @@ public class IssueViewHolder extends RecyclerView.ViewHolder {
return new IssueViewHolder(view);
}
 
@BindView(R.id.issue_state) TextView mStateView;
@BindView(R.id.issue_image) ImageView mImageView;
@BindView(R.id.issue_message) TextView mMessageView;
@BindView(R.id.issue_creator) TextView mCreatorView;
Loading
Loading
@@ -39,6 +40,18 @@ public class IssueViewHolder extends RecyclerView.ViewHolder {
 
public void bind(Issue issue) {
 
switch (issue.getState()){
case Issue.STATE_OPENED:
mStateView.setText(itemView.getResources().getString(R.string.issue_open));
break;
case Issue.STATE_CLOSED:
mStateView.setText(itemView.getResources().getString(R.string.issue_closed));
break;
default:
mStateView.setVisibility(View.GONE);
break;
}
if (issue.getAssignee() != null) {
App.instance().getPicasso()
.load(ImageUtil.getAvatarUrl(issue.getAssignee(), itemView.getResources().getDimensionPixelSize(R.dimen.image_size)))
Loading
Loading
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/root"
android:layout_width="match_parent"
Loading
Loading
@@ -9,7 +9,8 @@
<com.commit451.gitlab.view.LabCoatSwipeRefreshLayout
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="0dp"
android:layout_weight="1">
 
<android.support.v7.widget.RecyclerView
android:id="@+id/list"
Loading
Loading
@@ -26,4 +27,4 @@
 
<include layout="@layout/progress_fullscreen" />
 
</FrameLayout>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
Loading
Loading
@@ -5,7 +5,9 @@
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal">
android:orientation="horizontal"
android:baselineAligned="false">
<!--baselineAligned="false" is recommended for better performance by Android Studio-->
 
<LinearLayout
android:layout_width="0dp"
Loading
Loading
@@ -35,14 +37,32 @@
 
</LinearLayout>
 
<ImageView
android:id="@+id/issue_image"
android:layout_width="@dimen/image_size"
android:layout_height="@dimen/image_size"
android:layout_gravity="center_vertical"
<FrameLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:contentDescription="@null"
tools:src="@drawable/ic_assign_24dp" />
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp">
<ImageView
android:id="@+id/issue_image"
android:layout_width="@dimen/image_size"
android:layout_height="@dimen/image_size"
android:contentDescription="@null"
tools:src="@drawable/ic_assign_24dp"
android:layout_gravity="top|right" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/issue_open"
android:textAllCaps="true"
android:id="@+id/issue_state"
android:layout_gravity="bottom|right" />
</FrameLayout>
 
</LinearLayout>
\ No newline at end of file
Loading
Loading
@@ -198,6 +198,7 @@
<string name="error_changing_issue">There was an error changing the issue</string>
<string name="no_issues">No issues</string>
<string name="issue_opened">Opened</string>
<string name="issue_open">Open</string>
<string name="issue_closed">Closed</string>
<string name="issue_all">All</string>
<string name="issue_state_value_default">opened</string>
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment