Browse Source

[이벤트][Common] 참여하기 공지사항 bullet 처리 함

Hasemi 6 years ago
parent
commit
9b32d3afed

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/event/entry/EventQuestionFragment.java

@@ -163,7 +163,7 @@ public class EventQuestionFragment extends FragmentBase<EventQuestionPresenter>
       .asBitmap()
 //      .apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.NONE))
       .apply(new RequestOptions().centerCrop())
-      .apply(new RequestOptions().placeholder(ResourceUtil.getDrawable(background.getContext(), R.drawable.image_loading_middle)))
+      .apply(new RequestOptions().placeholder(ResourceUtil.getDrawable(background.getContext(), R.drawable.image_loading_common)))
       .apply(new RequestOptions().skipMemoryCache(true))
       .load(detailBean.getImageUrl())
       .into(background);

+ 13 - 3
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/event/entry/EventQuestionNoticeView.java

@@ -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);
+    }
   }
 }
 

+ 6 - 10
app/src/main/res/layout/event_participation_item_notice.xml

@@ -34,23 +34,19 @@
       app:layout_constraintTop_toTopOf="parent"/>
 
 
-    <TextView
-      android:id="@+id/text_view_notice1"
-      android:layout_width="0dp"
+    <LinearLayout
+      android:id="@+id/layout_container"
+      android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:layout_marginStart="25dp"
       android:layout_marginTop="7dp"
       android:layout_marginEnd="25dp"
       android:layout_marginBottom="21dp"
-      android:lineSpacingExtra="4sp"
-      android:textColor="@color/C999999"
-      android:textSize="12sp"
-      app:layout_constrainedWidth="true"
-      app:layout_constraintBottom_toBottomOf="parent"
+      android:orientation="vertical"
       app:layout_constraintEnd_toEndOf="parent"
       app:layout_constraintStart_toStartOf="parent"
       app:layout_constraintTop_toBottomOf="@+id/text_view_notice_title"
-      tools:text="OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"
-      />
+      ></LinearLayout>
+
   </android.support.constraint.ConstraintLayout>
 </android.support.constraint.ConstraintLayout>