|
|
@@ -1,7 +1,10 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.event.entry;
|
|
|
|
|
|
+import android.content.Context;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
+import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
+import android.widget.LinearLayout;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
@@ -20,16 +23,23 @@ import kr.co.zumo.app.lifeplus.bean.api.EventDetailBean;
|
|
|
class EventQuestionNoticeView extends RecyclerView.ViewHolder {
|
|
|
|
|
|
//private TextView textViewNoticeTitle;
|
|
|
- private TextView textViewNoticeContents;
|
|
|
+ private LinearLayout layoutContainer;
|
|
|
|
|
|
public EventQuestionNoticeView(View itemView) {
|
|
|
super(itemView);
|
|
|
//textViewNoticeTitle = itemView.findViewById(R.id.text_view_notice_title);
|
|
|
- textViewNoticeContents = itemView.findViewById(R.id.text_view_notice1);
|
|
|
+ layoutContainer = itemView.findViewById(R.id.layout_container);
|
|
|
}
|
|
|
|
|
|
public void draw(EventDetailBean bean) {
|
|
|
- textViewNoticeContents.setText(bean.getNotice());
|
|
|
+ String[] contentsArray = bean.getNotice().split("\n");
|
|
|
+ LayoutInflater inflater = (LayoutInflater) itemView.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
|
|
+
|
|
|
+ for (int i = 0; i < contentsArray.length; ++i) {
|
|
|
+ View contentsView = inflater.inflate(R.layout.event_notice_view, null);
|
|
|
+ ((TextView) contentsView.findViewById(R.id.tex_view_contents)).setText(contentsArray[i]);
|
|
|
+ layoutContainer.addView(contentsView);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|