Skip to content
Snippets Groups Projects
Commit 976f6997 authored by adi.bk's avatar adi.bk
Browse files

- Modify the layout of issue viewholder to include a confidential icon

- Show the icon in list of issues if issue is known to be confidential
parent d4a1d2d5
No related branches found
No related tags found
1 merge request!25Issue #239 - Show confidential status on issue overview and detail
Loading
Loading
@@ -33,6 +33,7 @@ class IssueViewHolder(view: View) : RecyclerView.ViewHolder(view) {
@BindView(R.id.issue_image) lateinit var image: ImageView
@BindView(R.id.issue_message) lateinit var textMessage: TextView
@BindView(R.id.issue_creator) lateinit var textCreator: TextView
@BindView(R.id.issue_confidential_image) lateinit var imageConfidential: ImageView
 
init {
ButterKnife.bind(this, view)
Loading
Loading
@@ -73,5 +74,10 @@ class IssueViewHolder(view: View) : RecyclerView.ViewHolder(view) {
id = "#" + issueId
 
textCreator.text = String.format(itemView.context.getString(R.string.opened_time), id, time, author)
if (issue.isConfidential) {
imageConfidential.visibility = View.VISIBLE
imageConfidential.setImageResource(R.drawable.ic_confidential_24dp)
}
}
}
Loading
Loading
@@ -9,15 +9,22 @@
android:baselineAligned="false">
<!--baselineAligned="false" is recommended for better performance by Android Studio-->
 
<LinearLayout
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="8dp"
android:layout_weight="1"
android:orientation="vertical">
android:layout_weight="1">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/issue_confidential_image"
android:visibility="gone"
android:layout_marginRight="8dp"
tools:src="@drawable/ic_confidential_24dp"/>
 
<TextView
android:id="@+id/issue_message"
Loading
Loading
@@ -26,6 +33,7 @@
android:ellipsize="end"
android:maxLines="2"
android:textSize="@dimen/text_size_small"
android:layout_toRightOf="@id/issue_confidential_image"
tools:text="I commited all the code at once cause I am cool. So sorry" />
 
<TextView
Loading
Loading
@@ -33,9 +41,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/text_size_tiny"
android:layout_below="@+id/issue_message"
tools:text="Created 45 days ago by Jawnnypoo" />
 
</LinearLayout>
</RelativeLayout>
 
<LinearLayout
android:orientation="vertical"
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