Skip to content
Snippets Groups Projects
Unverified Commit e26859c7 authored by Noah Prail's avatar Noah Prail
Browse files

Added date to activity tab.

parent c4cdce65
No related branches found
No related tags found
1 merge request!30Resolve "Display timestamp on activities tab"
Pipeline #
Loading
Loading
@@ -13,6 +13,8 @@ import com.commit451.gitlab.R
import com.commit451.gitlab.extension.formatAsHtml
import com.commit451.gitlab.model.rss.Entry
import com.commit451.gitlab.transformation.CircleTransformation
import com.commit451.gitlab.util.DateUtil
import java.util.*
 
/**
* Represents the view of an item in the RSS feed
Loading
Loading
@@ -31,6 +33,7 @@ class FeedEntryViewHolder(view: View) : RecyclerView.ViewHolder(view) {
@BindView(R.id.image) lateinit var image: ImageView
@BindView(R.id.title) lateinit var textTitle: TextView
@BindView(R.id.description) lateinit var textSummary: TextView
@BindView(R.id.updated) lateinit var textUpdated: TextView
 
init {
ButterKnife.bind(this, view)
Loading
Loading
@@ -44,5 +47,8 @@ class FeedEntryViewHolder(view: View) : RecyclerView.ViewHolder(view) {
 
textTitle.text = entry.title.formatAsHtml()
textSummary.text = entry.summary.formatAsHtml()
val updatedRelative = DateUtil.getRelativeTimeSpanString(itemView.context, entry.updated)
textUpdated.text = updatedRelative
}
}
Loading
Loading
@@ -47,6 +47,14 @@
android:textSize="14sp"
app:typeface="roboto_regular"
tools:text="I like this project because its called a project and it has a really long description that should cut off after a few lines" />
<com.devspark.robototextview.widget.RobotoTextView
android:id="@+id/updated"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textSize="14sp"
app:typeface="roboto_regular"
tools:text="2:00 AM 6/14/2017" />
 
</LinearLayout>
 
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