|
@@ -3,6 +3,7 @@ package com.cooleshow.teacher.widgets.dialog;
|
|
|
import android.app.Dialog;
|
|
|
import android.content.Context;
|
|
|
import android.os.Bundle;
|
|
|
+import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.ProgressBar;
|
|
@@ -31,7 +32,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
|
|
/**
|
|
|
* Author by pq, Date on 2022/8/24.
|
|
|
*/
|
|
|
-public class FansListDialog extends Dialog {
|
|
|
+public class FansListDialog extends Dialog implements View.OnClickListener {
|
|
|
|
|
|
private MineStyleFansGroupListAdapter mAdapter;
|
|
|
|
|
@@ -44,18 +45,22 @@ public class FansListDialog extends Dialog {
|
|
|
super.onCreate(savedInstanceState);
|
|
|
setContentView(R.layout.dialog_fans_list_layout);
|
|
|
RecyclerView recyclerView = findViewById(R.id.recyclerView);
|
|
|
- LinearLayoutManager layoutManager =new LinearLayoutManager(getContext());
|
|
|
+ LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
|
|
|
mAdapter = new MineStyleFansGroupListAdapter();
|
|
|
recyclerView.setLayoutManager(layoutManager);
|
|
|
recyclerView.setAdapter(mAdapter);
|
|
|
- StyleEmptyView fansEmptyView = StyleEmptyView.getInstance(getContext())
|
|
|
- .setEmptyIcon(R.mipmap.teacher_fans_empty_icon)
|
|
|
- .setEmptyText(getContext().getString(R.string.fans_empty_text))
|
|
|
- .setOpeBtn(getContext().getString(R.string.goto_create))
|
|
|
- .setOpeBtnClickListener(v -> {
|
|
|
- ARouter.getInstance().build(TCChatRouterPath.CHAT_CREATE_GROUP)
|
|
|
- .navigation();
|
|
|
- });
|
|
|
+ View fansEmptyView = LayoutInflater.from(getContext()).inflate(R.layout.view_fans_list_empty_layout,mAdapter.getEmptyLayout(),false);
|
|
|
+ fansEmptyView.findViewById(R.id.fl_go_create).setOnClickListener(this);
|
|
|
+
|
|
|
+// StyleEmptyView fansEmptyView = StyleEmptyView.getInstance(getContext())
|
|
|
+// .setEmptyIcon(R.mipmap.teacher_fans_empty_icon)
|
|
|
+// .setEmptyText(getContext().getString(R.string.fans_empty_text))
|
|
|
+// .setOpeBtn(getContext().getString(R.string.goto_create))
|
|
|
+// .setOpeBtnClickListener(v -> {
|
|
|
+// FansListDialog.this.dismiss();
|
|
|
+// ARouter.getInstance().build(TCChatRouterPath.CHAT_CREATE_GROUP)
|
|
|
+// .navigation();
|
|
|
+// });
|
|
|
mAdapter.setEmptyView(fansEmptyView);
|
|
|
|
|
|
initListener();
|
|
@@ -82,6 +87,17 @@ public class FansListDialog extends Dialog {
|
|
|
}
|
|
|
|
|
|
private void goChat(String groupId, String groupName) {
|
|
|
- ChatHelper.getInstance().goGroupChat(groupId,"");
|
|
|
+ ChatHelper.getInstance().goGroupChat(groupId, "");
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ int id = v.getId();
|
|
|
+ if (id == R.id.fl_go_create) {
|
|
|
+ FansListDialog.this.dismiss();
|
|
|
+ ARouter.getInstance().build(TCChatRouterPath.CHAT_CREATE_GROUP)
|
|
|
+ .navigation();
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|