|
|
@@ -24,6 +24,7 @@ class EventQuestionNoticeView extends RecyclerView.ViewHolder {
|
|
|
|
|
|
//private TextView textViewNoticeTitle;
|
|
|
private LinearLayout layoutContainer;
|
|
|
+ private TextView textViewContents;
|
|
|
|
|
|
public EventQuestionNoticeView(View itemView) {
|
|
|
super(itemView);
|
|
|
@@ -34,14 +35,14 @@ class EventQuestionNoticeView extends RecyclerView.ViewHolder {
|
|
|
public void draw(String notice) {
|
|
|
String[] contentsArray = notice.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]);
|
|
|
+ textViewContents = contentsView.findViewById(R.id.text_view_contents);
|
|
|
+ textViewContents.setText(contentsArray[i]);
|
|
|
layoutContainer.addView(contentsView);
|
|
|
|
|
|
if (i == contentsArray.length - 1) {
|
|
|
- ((TextView) contentsView.findViewById(R.id.tex_view_contents)).setPadding(0, 0, 0, ResourceUtil.dpToPx(21));
|
|
|
+ textViewContents.setPadding(textViewContents.getPaddingLeft(), textViewContents.getPaddingTop(), textViewContents.getPaddingRight(), ResourceUtil.dpToPx(21));
|
|
|
}
|
|
|
}
|
|
|
}
|