|
|
@@ -4,6 +4,7 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.contents.series;
|
|
|
|
|
|
import android.content.Context;
|
|
|
+import android.graphics.Rect;
|
|
|
import android.support.annotation.NonNull;
|
|
|
import android.support.annotation.Nullable;
|
|
|
import android.support.constraint.ConstraintLayout;
|
|
|
@@ -11,6 +12,7 @@ import android.support.v7.widget.LinearLayoutManager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.util.AttributeSet;
|
|
|
import android.view.LayoutInflater;
|
|
|
+import android.view.View;
|
|
|
import android.widget.FrameLayout;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.TextView;
|
|
|
@@ -97,12 +99,20 @@ public class ContentsSeriesView extends FrameLayout {
|
|
|
|
|
|
public void draw(List<SeriesItemBean> list, String contentsNo, IEventListener listener) {
|
|
|
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
|
|
-
|
|
|
+ //14dp
|
|
|
adapter = new ContentsSeriesAdapter(inflater, contentsNo, list, seriesTitle, event -> {
|
|
|
listener.onEvent(event);
|
|
|
});
|
|
|
|
|
|
recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
|
|
+ recyclerView.addItemDecoration(new RecyclerView.ItemDecoration() {
|
|
|
+ @Override
|
|
|
+ public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
|
|
+ if (parent.getChildAdapterPosition(view) == 0) {
|
|
|
+ outRect.top = ResourceUtil.dpToPx(15);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
recyclerView.setAdapter(adapter);
|
|
|
}
|
|
|
|