动态bugfix
This commit is contained in:
@@ -304,8 +304,7 @@ public class PublishActivity extends BaseMvpActivity<IPublishView, PublishPresen
|
||||
}
|
||||
|
||||
private void updatePublishStatus() {
|
||||
tvPublish.setEnabled(!(uploadList.size() == 0 &&
|
||||
com.nnbc123.core.utils.TextUtils.isEmptyText(etContent.getText().toString())));
|
||||
tvPublish.setEnabled(uploadList.size() > 0);
|
||||
}
|
||||
|
||||
private void initOtherView() {
|
||||
|
@@ -128,7 +128,7 @@ public class SquareDynamicFragment extends BaseFragment {
|
||||
getDialogManager().showCommonPopupDialog(list, "取消");
|
||||
} else if (view.getId() == R.id.ll_share) {
|
||||
new ShareDynamicHelper(getActivity()).share(bean);
|
||||
} else if (view.getId() == R.id.iv_in_room) {
|
||||
} else if (view.getId() == R.id.fl_live) {
|
||||
if (bean.getInRoomUid() == null) {
|
||||
return;
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package com.nnbc123.app.community.square.adapter
|
||||
|
||||
import android.graphics.Color
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
@@ -10,6 +11,7 @@ import com.nnbc123.app.R
|
||||
import com.nnbc123.app.community.dynamic.view.DynamicDetailActivity
|
||||
import com.nnbc123.app.ui.utils.load
|
||||
import com.nnbc123.app.ui.utils.loadAvatar
|
||||
import com.nnbc123.app.ui.widget.LivingIconView
|
||||
import com.nnbc123.core.community.bean.WorldDynamicBean
|
||||
import com.nnbc123.core.community.dynamic.DynamicModel
|
||||
import com.nnbc123.core.utils.net.DontWarnObserver
|
||||
@@ -29,8 +31,15 @@ class NewSquareDynamicAdapter :
|
||||
helper.setText(R.id.tv_content, item.content)
|
||||
helper.getView<ImageView>(R.id.iv_cover)
|
||||
.load(item.dynamicResList?.getOrNull(0)?.resUrl, 12f)
|
||||
helper.setGone(R.id.tv_live, item.inRoomUid != null)
|
||||
helper.addOnClickListener(R.id.iv_in_room)
|
||||
helper.setGone(R.id.fl_live, item.inRoomUid != null)
|
||||
val liveView = helper.getView<LivingIconView>(R.id.liv_user)
|
||||
if (item.inRoomUid != null) {
|
||||
liveView.setColor(Color.parseColor("#73FFF6"))
|
||||
liveView.start()
|
||||
} else {
|
||||
liveView.stop()
|
||||
}
|
||||
helper.addOnClickListener(R.id.fl_live)
|
||||
//点赞
|
||||
setLikeCount(helper, item.likeCount, item.isLike)
|
||||
val llLike: LinearLayout = helper.getView(R.id.ll_like)
|
||||
|
@@ -58,37 +58,43 @@
|
||||
app:layout_constraintStart_toStartOf="@id/tv_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_live"
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_live"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="10dp"
|
||||
android:text="直播中"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:layout_marginStart="1dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_avatar"
|
||||
android:layout_marginEnd="1dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@drawable/shape_232323_bottom_40dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_avatar"
|
||||
android:background="@drawable/shape_232323_bottom_40dp"
|
||||
android:textColor="#73fff6"
|
||||
android:textSize="6sp"
|
||||
/>
|
||||
app:layout_constraintStart_toStartOf="@id/iv_avatar">
|
||||
|
||||
<com.nnbc123.app.ui.widget.LivingIconView
|
||||
android:id="@+id/liv_user"
|
||||
android:layout_width="7dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/transparent" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar"
|
||||
app:layout_constraintEnd_toStartOf="@id/ll_like"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
||||
tools:text="小半" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_like"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -118,5 +124,4 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Reference in New Issue
Block a user