mirror of
https://github.com/NiciDieNase/chaosflix
synced 2025-02-19 22:48:26 +00:00
Touch: use databinding for Conference- and Event-Lists
This commit is contained in:
parent
818db73d44
commit
537391a458
12 changed files with 182 additions and 159 deletions
|
@ -123,7 +123,10 @@ dependencies {
|
||||||
}
|
}
|
||||||
implementation 'com.google.android.exoplayer:exoplayer:r2.5.2'
|
implementation 'com.google.android.exoplayer:exoplayer:r2.5.2'
|
||||||
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0'
|
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0'
|
||||||
|
|
||||||
|
implementation 'com.github.bumptech.glide:glide:4.6.1'
|
||||||
implementation 'com.squareup.picasso:picasso:2.5.2'
|
implementation 'com.squareup.picasso:picasso:2.5.2'
|
||||||
|
|
||||||
implementation 'net.opacapp:multiline-collapsingtoolbar:27.1.1'
|
implementation 'net.opacapp:multiline-collapsingtoolbar:27.1.1'
|
||||||
implementation 'net.rdrei.android.dirchooser:library:3.2@aar'
|
implementation 'net.rdrei.android.dirchooser:library:3.2@aar'
|
||||||
// implementation 'com.gu:option:1.3'
|
// implementation 'com.gu:option:1.3'
|
||||||
|
|
|
@ -2,14 +2,14 @@ package de.nicidienase.chaosflix.touch
|
||||||
|
|
||||||
import android.databinding.BindingAdapter
|
import android.databinding.BindingAdapter
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import com.squareup.picasso.Picasso
|
import com.bumptech.glide.Glide
|
||||||
|
import com.bumptech.glide.request.RequestOptions
|
||||||
|
|
||||||
|
|
||||||
@BindingAdapter("bind:imageUrl")
|
@BindingAdapter("bind:imageUrl")
|
||||||
fun loadImage(imageView: ImageView, url: String){
|
fun loadImage(imageView: ImageView, url: String){
|
||||||
Picasso.with(imageView.context)
|
Glide.with(imageView.context)
|
||||||
.load(url)
|
.load(url)
|
||||||
.fit()
|
.apply(RequestOptions().fitCenter())
|
||||||
.centerInside()
|
|
||||||
.into(imageView)
|
.into(imageView)
|
||||||
}
|
}
|
|
@ -74,7 +74,7 @@ public class ConferenceGroupFragment extends BrowseFragment {
|
||||||
if(conferenceList.size() > 0){
|
if(conferenceList.size() > 0){
|
||||||
setLoadingOverlayVisibility(false);
|
setLoadingOverlayVisibility(false);
|
||||||
}
|
}
|
||||||
conferencesAdapter.setItems(conferenceList);
|
conferencesAdapter.setConferences(conferenceList);
|
||||||
Parcelable layoutState = getArguments().getParcelable(LAYOUTMANAGER_STATE);
|
Parcelable layoutState = getArguments().getParcelable(LAYOUTMANAGER_STATE);
|
||||||
if (layoutState != null) {
|
if (layoutState != null) {
|
||||||
layoutManager.onRestoreInstanceState(layoutState);
|
layoutManager.onRestoreInstanceState(layoutState);
|
||||||
|
|
|
@ -10,18 +10,18 @@ import de.nicidienase.chaosflix.touch.databinding.ItemConferenceCardviewBinding
|
||||||
class ConferenceRecyclerViewAdapter(private val mListener: ConferencesTabBrowseFragment.OnInteractionListener?) :
|
class ConferenceRecyclerViewAdapter(private val mListener: ConferencesTabBrowseFragment.OnInteractionListener?) :
|
||||||
RecyclerView.Adapter<ConferenceRecyclerViewAdapter.ViewHolder>() {
|
RecyclerView.Adapter<ConferenceRecyclerViewAdapter.ViewHolder>() {
|
||||||
|
|
||||||
var items: List<Conference> = ArrayList()
|
var conferences: List<Conference> = emptyList()
|
||||||
set(value) {
|
set(value) {
|
||||||
field = value
|
field = value
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount() = items.size
|
override fun getItemCount() = conferences.size
|
||||||
|
|
||||||
class ViewHolder(val binding: ItemConferenceCardviewBinding) : RecyclerView.ViewHolder(binding.root)
|
class ViewHolder(val binding: ItemConferenceCardviewBinding) : RecyclerView.ViewHolder(binding.root)
|
||||||
|
|
||||||
override fun getItemId(position: Int): Long {
|
override fun getItemId(position: Int): Long {
|
||||||
return items.get(position).id
|
return conferences.get(position).id
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
|
@ -30,10 +30,10 @@ class ConferenceRecyclerViewAdapter(private val mListener: ConferencesTabBrowseF
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
holder.binding.conference = items[position]
|
holder.binding.conference = conferences[position]
|
||||||
|
|
||||||
holder.binding.root.setOnClickListener { _ ->
|
holder.binding.root.setOnClickListener { _ ->
|
||||||
mListener?.onConferenceSelected((items[position]))
|
mListener?.onConferenceSelected((conferences[position]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
package de.nicidienase.chaosflix.touch.browse.adapters
|
package de.nicidienase.chaosflix.touch.browse.adapters
|
||||||
|
|
||||||
import android.support.v4.view.ViewCompat
|
import android.support.v4.view.ViewCompat
|
||||||
import android.view.View
|
import android.support.v7.widget.RecyclerView
|
||||||
import com.squareup.picasso.Picasso
|
import android.view.LayoutInflater
|
||||||
import de.nicidienase.chaosflix.touch.R
|
import android.view.ViewGroup
|
||||||
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.Event
|
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.Event
|
||||||
import de.nicidienase.chaosflix.touch.OnEventSelectedListener
|
import de.nicidienase.chaosflix.touch.OnEventSelectedListener
|
||||||
|
import de.nicidienase.chaosflix.touch.databinding.ItemEventCardviewBinding
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
open class EventRecyclerViewAdapter(val listener: OnEventSelectedListener) :
|
open class EventRecyclerViewAdapter(val listener: OnEventSelectedListener) :
|
||||||
ItemRecyclerViewAdapter<Event>() {
|
ItemRecyclerViewAdapter<Event, EventRecyclerViewAdapter.ViewHolder>() {
|
||||||
|
|
||||||
override fun getComparator(): Comparator<in Event>? {
|
override fun getComparator(): Comparator<in Event>? {
|
||||||
return Comparator { o1, o2 -> o1.title.compareTo(o2.title) }
|
return Comparator { o1, o2 -> o1.title.compareTo(o2.title) }
|
||||||
}
|
}
|
||||||
|
@ -27,40 +27,22 @@ open class EventRecyclerViewAdapter(val listener: OnEventSelectedListener) :
|
||||||
).filterNotNull()
|
).filterNotNull()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(p0: ViewGroup, pItemConferenceCardviewBinding1: Int): ViewHolder {
|
||||||
|
val binding = ItemEventCardviewBinding.inflate(LayoutInflater.from(p0.context), p0, false)
|
||||||
|
return ViewHolder(binding)
|
||||||
|
}
|
||||||
|
|
||||||
override val layout = R.layout.item_event_cardview
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
var showTags: Boolean = false
|
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: ItemRecyclerViewAdapter<Event>.ViewHolder, position: Int) {
|
|
||||||
val event = items[position]
|
val event = items[position]
|
||||||
|
holder.binding.event = event
|
||||||
|
holder.binding.root.setOnClickListener {
|
||||||
|
listener.onEventSelected(event)
|
||||||
|
}
|
||||||
|
|
||||||
holder.titleText.text = event.title
|
ViewCompat.setTransitionName(holder.binding.titleText, "title_${event.guid}")
|
||||||
holder.subtitle.text = event.subtitle
|
ViewCompat.setTransitionName(holder.binding.subtitleText, "subtitle_${event.guid}")
|
||||||
if (showTags) {
|
ViewCompat.setTransitionName(holder.binding.imageView, "thumb_${event.guid}")
|
||||||
val tagString = StringBuilder()
|
|
||||||
for (tag in event.tags!!) {
|
|
||||||
if (tagString.length > 0) {
|
|
||||||
tagString.append(", ")
|
|
||||||
}
|
}
|
||||||
tagString.append(tag)
|
|
||||||
}
|
|
||||||
holder.tag.text = tagString
|
|
||||||
}
|
|
||||||
Picasso.with(holder.icon.context)
|
|
||||||
.load(event.thumbUrl)
|
|
||||||
.noFade()
|
|
||||||
.fit()
|
|
||||||
.centerInside()
|
|
||||||
.into(holder.icon)
|
|
||||||
|
|
||||||
val resources = holder.titleText.context.getResources()
|
inner class ViewHolder(val binding: ItemEventCardviewBinding) : RecyclerView.ViewHolder(binding.root)
|
||||||
ViewCompat.setTransitionName(holder.titleText,
|
|
||||||
resources.getString(R.string.title) + event.id)
|
|
||||||
ViewCompat.setTransitionName(holder.subtitle,
|
|
||||||
resources.getString(R.string.subtitle) + event.id)
|
|
||||||
ViewCompat.setTransitionName(holder.icon,
|
|
||||||
resources.getString(R.string.thumbnail) + event.id)
|
|
||||||
|
|
||||||
holder.mView.setOnClickListener({ _: View -> listener.onEventSelected(items[position]) })
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,8 @@ import android.widget.TextView
|
||||||
import de.nicidienase.chaosflix.touch.R
|
import de.nicidienase.chaosflix.touch.R
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
abstract class ItemRecyclerViewAdapter<T>()
|
abstract class ItemRecyclerViewAdapter<T,VH : RecyclerView.ViewHolder?>()
|
||||||
: RecyclerView.Adapter<ItemRecyclerViewAdapter<T>.ViewHolder>(), Filterable {
|
: RecyclerView.Adapter<VH>(), Filterable {
|
||||||
|
|
||||||
internal abstract val layout: Int
|
|
||||||
|
|
||||||
abstract fun getComparator(): Comparator<in T>?
|
abstract fun getComparator(): Comparator<in T>?
|
||||||
|
|
||||||
|
@ -52,23 +50,10 @@ abstract class ItemRecyclerViewAdapter<T>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
|
||||||
val view = LayoutInflater.from(parent.context)
|
|
||||||
.inflate(layout, parent, false)
|
|
||||||
return ViewHolder(view)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun getItemCount(): Int {
|
override fun getItemCount(): Int {
|
||||||
return filteredItems.size
|
return filteredItems.size
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class ViewHolder(val mView: View) : RecyclerView.ViewHolder(mView) {
|
|
||||||
val icon: ImageView = mView.findViewById<View>(R.id.imageView) as ImageView
|
|
||||||
val titleText: TextView = mView.findViewById<View>(R.id.title_text) as TextView
|
|
||||||
val subtitle: TextView = mView.findViewById<View>(R.id.subtitle_text) as TextView
|
|
||||||
val tag: TextView = mView.findViewById<View>(R.id.tag_text) as TextView
|
|
||||||
}
|
|
||||||
|
|
||||||
inner class ItemFilter : Filter() {
|
inner class ItemFilter : Filter() {
|
||||||
override fun performFiltering(filterText: CharSequence?): FilterResults {
|
override fun performFiltering(filterText: CharSequence?): FilterResults {
|
||||||
val filterResults = FilterResults()
|
val filterResults = FilterResults()
|
||||||
|
|
|
@ -117,7 +117,7 @@ public class EventsListFragment extends BrowseFragment implements SearchView.OnQ
|
||||||
} else if (type == TYPE_EVENTS) {
|
} else if (type == TYPE_EVENTS) {
|
||||||
{
|
{
|
||||||
setupToolbar(binding.incToolbar.toolbar, conference.getTitle(), false);
|
setupToolbar(binding.incToolbar.toolbar, conference.getTitle(), false);
|
||||||
eventAdapter.setShowTags(conference.getTagsUsefull());
|
// eventAdapter.setShowTags(conference.getTagsUsefull());
|
||||||
getViewModel().getEventsforConference(conference).observe(this, events -> {
|
getViewModel().getEventsforConference(conference).observe(this, events -> {
|
||||||
if(events != null){
|
if(events != null){
|
||||||
setEvents(events);
|
setEvents(events);
|
||||||
|
|
|
@ -31,7 +31,6 @@ import de.nicidienase.chaosflix.common.viewmodel.DetailsViewModel
|
||||||
import de.nicidienase.chaosflix.touch.databinding.FragmentEventDetailsBinding
|
import de.nicidienase.chaosflix.touch.databinding.FragmentEventDetailsBinding
|
||||||
import de.nicidienase.chaosflix.touch.OnEventSelectedListener
|
import de.nicidienase.chaosflix.touch.OnEventSelectedListener
|
||||||
import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory
|
import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory
|
||||||
import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter
|
|
||||||
|
|
||||||
class EventDetailsFragment : Fragment() {
|
class EventDetailsFragment : Fragment() {
|
||||||
|
|
||||||
|
@ -44,7 +43,7 @@ class EventDetailsFragment : Fragment() {
|
||||||
private var selectDialog: AlertDialog? = null
|
private var selectDialog: AlertDialog? = null
|
||||||
|
|
||||||
private lateinit var viewModel: DetailsViewModel
|
private lateinit var viewModel: DetailsViewModel
|
||||||
private lateinit var relatedEventsAdapter: EventRecyclerViewAdapter
|
private lateinit var relatedEventsAdapter: RelatedEventsRecyclerViewAdapter
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -120,7 +119,9 @@ class EventDetailsFragment : Fragment() {
|
||||||
|
|
||||||
})
|
})
|
||||||
viewModel.getRelatedEvents(event).observe(this, Observer {
|
viewModel.getRelatedEvents(event).observe(this, Observer {
|
||||||
relatedEventsAdapter.items = ArrayList(it)
|
if(it != null){
|
||||||
|
relatedEventsAdapter.events = it
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
viewModel.state.observe(this, Observer { liveEvent ->
|
viewModel.state.observe(this, Observer { liveEvent ->
|
||||||
|
|
|
@ -1,9 +1,34 @@
|
||||||
package de.nicidienase.chaosflix.touch.eventdetails
|
package de.nicidienase.chaosflix.touch.eventdetails
|
||||||
|
|
||||||
import de.nicidienase.chaosflix.touch.R
|
import android.support.v7.widget.RecyclerView
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.Event
|
||||||
import de.nicidienase.chaosflix.touch.OnEventSelectedListener
|
import de.nicidienase.chaosflix.touch.OnEventSelectedListener
|
||||||
import de.nicidienase.chaosflix.touch.browse.adapters.EventRecyclerViewAdapter
|
import de.nicidienase.chaosflix.touch.databinding.RelatedEventCardviewLayoutBinding
|
||||||
|
|
||||||
class RelatedEventsRecyclerViewAdapter(listener: OnEventSelectedListener) : EventRecyclerViewAdapter(listener) {
|
class RelatedEventsRecyclerViewAdapter(listener: OnEventSelectedListener) : RecyclerView.Adapter<RelatedEventsRecyclerViewAdapter.ViewHolder>() {
|
||||||
override val layout = R.layout.related_event_cardview_layout
|
|
||||||
|
init {
|
||||||
|
setHasStableIds(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
var events: List<Event> = emptyList()
|
||||||
|
set(value) {
|
||||||
|
field = value
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemCount() = events.size
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(p0: ViewGroup, pItemConferenceCardviewBinding1: Int): ViewHolder {
|
||||||
|
val binding = RelatedEventCardviewLayoutBinding.inflate(LayoutInflater.from(p0.context), p0, false)
|
||||||
|
return ViewHolder(binding)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onBindViewHolder(viewHolder: ViewHolder, position: Int) {
|
||||||
|
viewHolder.binding.event = events[position]
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class ViewHolder(val binding: RelatedEventCardviewLayoutBinding) : RecyclerView.ViewHolder(binding.root)
|
||||||
}
|
}
|
|
@ -5,7 +5,9 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
<variable
|
||||||
|
name="event"
|
||||||
|
type="de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.Event"/>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -52,7 +54,7 @@
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:text=""
|
android:text="@{event.title}"
|
||||||
tools:text="Title"
|
tools:text="Title"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/subtitle_text"
|
app:layout_constraintEnd_toEndOf="@+id/subtitle_text"
|
||||||
|
@ -69,7 +71,7 @@
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:text=""
|
android:text="@{event.subtitle}"
|
||||||
tools:text="subtitle"
|
tools:text="subtitle"
|
||||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/tag_text"
|
app:layout_constraintBottom_toTopOf="@+id/tag_text"
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
<variable
|
||||||
|
name="event"
|
||||||
|
type="de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.Event"/>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -24,12 +26,25 @@
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/imageView"
|
||||||
|
imageUrl="@{event.thumbUrl}"
|
||||||
android:layout_width="@dimen/thumbnail_width"
|
android:layout_width="@dimen/thumbnail_width"
|
||||||
android:layout_height="@dimen/thumbnail_height"
|
android:layout_height="@dimen/thumbnail_height"
|
||||||
android:scaleType="fitCenter"/>
|
android:scaleType="fitCenter"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/duration"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
<!--android:text="@{event.length}"-->
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -46,7 +61,7 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text=""
|
android:text="@{event.title}"
|
||||||
tools:text="Title"
|
tools:text="Title"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"/>
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"/>
|
||||||
|
|
||||||
|
@ -55,7 +70,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text=""
|
android:text="@{event.subtitle}"
|
||||||
tools:text="Subtitle"
|
tools:text="Subtitle"
|
||||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"/>
|
android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"/>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,16 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:card_view="http://schemas.android.com/tools"
|
xmlns:card_view="http://schemas.android.com/tools"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
<variable
|
||||||
|
name="event"
|
||||||
|
type="de.nicidienase.chaosflix.common.mediadata.entities.recording.persistence.Event"/>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
@ -28,6 +36,7 @@
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="14dp"
|
android:layout_marginTop="14dp"
|
||||||
|
imageUrl="@{event.thumbUrl}"
|
||||||
android:contentDescription="@string/titleimage"
|
android:contentDescription="@string/titleimage"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/title_text"
|
app:layout_constraintBottom_toTopOf="@+id/title_text"
|
||||||
|
@ -43,7 +52,7 @@
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:text=""
|
android:text="@{event.title}"
|
||||||
tools:text="Title"
|
tools:text="Title"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/subtitle_text"
|
app:layout_constraintEnd_toEndOf="@+id/subtitle_text"
|
||||||
|
@ -60,7 +69,7 @@
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:text=""
|
android:text="@{event.subtitle}"
|
||||||
tools:text="subtitle"
|
tools:text="subtitle"
|
||||||
android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/Base.TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/tag_text"
|
app:layout_constraintBottom_toTopOf="@+id/tag_text"
|
||||||
|
@ -85,4 +94,5 @@
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</layout>
|
Loading…
Add table
Reference in a new issue