|
|
@ -2,6 +2,7 @@ package com.community.pocket.ui.main.ui.forum.data; |
|
|
|
|
|
|
|
|
|
|
|
import android.app.Activity; |
|
|
|
import android.app.Activity; |
|
|
|
import android.content.Intent; |
|
|
|
import android.content.Intent; |
|
|
|
|
|
|
|
import android.graphics.Bitmap; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.os.Handler; |
|
|
|
import android.os.Handler; |
|
|
|
import android.os.Looper; |
|
|
|
import android.os.Looper; |
|
|
@ -11,6 +12,7 @@ import android.view.View; |
|
|
|
import android.view.ViewGroup; |
|
|
|
import android.view.ViewGroup; |
|
|
|
import android.widget.Button; |
|
|
|
import android.widget.Button; |
|
|
|
import android.widget.EditText; |
|
|
|
import android.widget.EditText; |
|
|
|
|
|
|
|
import android.widget.ImageView; |
|
|
|
import android.widget.LinearLayout; |
|
|
|
import android.widget.LinearLayout; |
|
|
|
import android.widget.TextView; |
|
|
|
import android.widget.TextView; |
|
|
|
import android.widget.Toast; |
|
|
|
import android.widget.Toast; |
|
|
@ -19,9 +21,11 @@ import androidx.annotation.NonNull; |
|
|
|
import androidx.appcompat.app.AlertDialog; |
|
|
|
import androidx.appcompat.app.AlertDialog; |
|
|
|
import androidx.constraintlayout.widget.ConstraintLayout; |
|
|
|
import androidx.constraintlayout.widget.ConstraintLayout; |
|
|
|
import androidx.core.widget.NestedScrollView; |
|
|
|
import androidx.core.widget.NestedScrollView; |
|
|
|
|
|
|
|
import androidx.lifecycle.MutableLiveData; |
|
|
|
import androidx.lifecycle.ViewModelProvider; |
|
|
|
import androidx.lifecycle.ViewModelProvider; |
|
|
|
|
|
|
|
|
|
|
|
import com.community.pocket.R; |
|
|
|
import com.community.pocket.R; |
|
|
|
|
|
|
|
import com.community.pocket.data.main.info.InfoRequest; |
|
|
|
import com.community.pocket.data.model.Active; |
|
|
|
import com.community.pocket.data.model.Active; |
|
|
|
import com.community.pocket.data.model.Complain; |
|
|
|
import com.community.pocket.data.model.Complain; |
|
|
|
import com.community.pocket.data.model.Forum; |
|
|
|
import com.community.pocket.data.model.Forum; |
|
|
@ -262,5 +266,10 @@ public class ForumDataActivity extends BaseActivity { |
|
|
|
tower.setText(getString(R.string.tower, forumContent.getTower())); |
|
|
|
tower.setText(getString(R.string.tower, forumContent.getTower())); |
|
|
|
TextView content = view.findViewById(R.id.content); |
|
|
|
TextView content = view.findViewById(R.id.content); |
|
|
|
content.setText(forumContent.getContent()); |
|
|
|
content.setText(forumContent.getContent()); |
|
|
|
|
|
|
|
ImageView headimg = view.findViewById(R.id.headimg); |
|
|
|
|
|
|
|
MutableLiveData<Bitmap> liveData = new MutableLiveData<>(); |
|
|
|
|
|
|
|
InfoRequest.getInstance().getImg(liveData, forumContent.getInfo().getHeadImg()); |
|
|
|
|
|
|
|
liveData.observe(this, headimg::setImageBitmap); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|