mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
@@ -206,7 +206,7 @@ public class HabitCardListAdapter
|
|||||||
int viewType)
|
int viewType)
|
||||||
{
|
{
|
||||||
if (listView == null) return null;
|
if (listView == null) return null;
|
||||||
View view = listView.createHabitCardView();
|
HabitCardView view = listView.createHabitCardView();
|
||||||
return new HabitCardViewHolder(view);
|
return new HabitCardViewHolder(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class HabitCardListView(
|
|||||||
super.setAdapter(adapter)
|
super.setAdapter(adapter)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun createHabitCardView(): View {
|
fun createHabitCardView(): HabitCardView {
|
||||||
return cardViewFactory.create()
|
return cardViewFactory.create()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,6 +91,7 @@ class HabitCardListView(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun attachCardView(holder: HabitCardViewHolder) {
|
fun attachCardView(holder: HabitCardViewHolder) {
|
||||||
|
(holder.itemView as HabitCardView).dataOffset = dataOffset
|
||||||
attachedHolders.add(holder)
|
attachedHolders.add(holder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,6 @@
|
|||||||
|
|
||||||
package org.isoron.uhabits.activities.habits.list.views
|
package org.isoron.uhabits.activities.habits.list.views
|
||||||
|
|
||||||
import androidx.appcompat.widget.*
|
|
||||||
import android.view.*
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
|
||||||
class HabitCardViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
|
class HabitCardViewHolder(itemView: HabitCardView) : RecyclerView.ViewHolder(itemView)
|
||||||
|
|||||||
Reference in New Issue
Block a user