This commit is contained in:
18401019693 2022-07-27 10:52:14 +08:00
parent 8216efaba6
commit 9f30e724e9
10 changed files with 89 additions and 23 deletions

View File

@ -1,14 +1,20 @@
package com.yunbao.common.dialog; package com.yunbao.common.dialog;
import android.os.Bundle;
import android.view.Gravity; import android.view.Gravity;
import android.view.View;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment; import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction; import androidx.fragment.app.FragmentTransaction;
import com.yunbao.common.R; import com.yunbao.common.R;
import com.yunbao.common.event.InstructorOperationEvent;
import org.greenrobot.eventbus.EventBus;
import java.lang.reflect.Field; import java.lang.reflect.Field;
@ -18,6 +24,7 @@ public class InstructorOperationDialog extends AbsDialogFragment {
protected int getLayoutId() { protected int getLayoutId() {
return R.layout.view_instructor_operation; return R.layout.view_instructor_operation;
} }
/** /**
* 主要时这个方法上面两个方法只是获取布局用的可以不要 * 主要时这个方法上面两个方法只是获取布局用的可以不要
* *
@ -46,6 +53,7 @@ public class InstructorOperationDialog extends AbsDialogFragment {
ft.add(this, tag); ft.add(this, tag);
ft.commitAllowingStateLoss(); ft.commitAllowingStateLoss();
} }
@Override @Override
protected int getDialogStyle() { protected int getDialogStyle() {
return R.style.dialog2; return R.style.dialog2;
@ -65,4 +73,16 @@ public class InstructorOperationDialog extends AbsDialogFragment {
params.gravity = Gravity.CENTER; params.gravity = Gravity.CENTER;
window.setAttributes(params); window.setAttributes(params);
} }
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mRootView.findViewById(R.id.hurry_contact).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
EventBus.getDefault().post(new InstructorOperationEvent());
dismiss();
}
});
}
} }

View File

@ -0,0 +1,9 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
/**
* 新人面向指导员的跳转弹窗
*/
public class InstructorOperationEvent extends BaseModel {
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="8dip" />
<solid android:color="#FFF7F7F7" />
</shape>

View File

@ -18,7 +18,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="70dp" android:layout_marginTop="85dp"
android:text="@string/welcome_pd" android:text="@string/welcome_pd"
android:textColor="#FF1A1A1A" android:textColor="#FF1A1A1A"
android:textSize="21sp" android:textSize="21sp"
@ -32,10 +32,22 @@
android:textColor="#FFF19DA0" android:textColor="#FFF19DA0"
android:textSize="12sp" /> android:textSize="12sp" />
<TextView
<LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="14dp" android:layout_marginTop="14dp"
android:background="@drawable/instructor_operation_bg"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingStart="5dp"
android:paddingTop="9dp"
android:paddingEnd="5dp"
android:paddingBottom="9dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableLeft="@mipmap/icon_love_message" android:drawableLeft="@mipmap/icon_love_message"
android:drawablePadding="3dp" android:drawablePadding="3dp"
android:text="@string/do_you_like_find" android:text="@string/do_you_like_find"
@ -51,6 +63,8 @@
android:text="@string/exclusive_instructor" android:text="@string/exclusive_instructor"
android:textColor="#FF737373" android:textColor="#FF737373"
android:textSize="10sp" /> android:textSize="10sp" />
</LinearLayout>
<View <View
android:layout_width="1dp" android:layout_width="1dp"
@ -58,13 +72,16 @@
android:layout_weight="1" /> android:layout_weight="1" />
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/hurry_contact"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="35dp" android:layout_height="35dp"
android:layout_margin="30dp" android:layout_marginEnd="30dp"
android:layout_marginStart="30dp"
android:layout_marginBottom="30dp"
android:orientation="vertical" android:orientation="vertical"
app:cardBackgroundColor="#FFFFBE41" app:cardBackgroundColor="#FFFFBE41"
app:cardCornerRadius="20dp" app:cardCornerRadius="20dp"
app:cardElevation="16dp"> app:cardElevation="0dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -843,6 +843,6 @@
<string name="welcome_pd">歡迎來到PD LIVE</string> <string name="welcome_pd">歡迎來到PD LIVE</string>
<string name="welcome_pd_tip">這有各類好看有趣的主播\n還有各種豐富的活動玩法</string> <string name="welcome_pd_tip">這有各類好看有趣的主播\n還有各種豐富的活動玩法</string>
<string name="do_you_like_find">在找您喜歡的主播嗎?</string> <string name="do_you_like_find">在找您喜歡的主播嗎?</string>
<string name="exclusive_instructor">聯系您的專屬指導員,\n給您匹配更多風格的主播唷!</string> <string name="exclusive_instructor">聯系您的專屬指導員,\br\br給您匹配更多風格的主播唷!</string>
<string name="hurry_contact">趕快聯系他/她吧!</string> <string name="hurry_contact">趕快聯系他/她吧!</string>
</resources> </resources>

View File

@ -90,7 +90,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_centerInParent="true"
app:srcCompat="@drawable/rc_unread_count_bg_normal" /> app:srcCompat="@mipmap/rc_unread_count_bg_normal" />
<TextView <TextView
android:id="@+id/rc_conversation_unread_count" android:id="@+id/rc_conversation_unread_count"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -50,6 +50,7 @@ import com.yunbao.common.bean.NoviceInstructorModel;
import com.yunbao.common.bean.UpdataListBean; import com.yunbao.common.bean.UpdataListBean;
import com.yunbao.common.custom.TabButtonGroup; import com.yunbao.common.custom.TabButtonGroup;
import com.yunbao.common.dialog.InstructorOperationDialog; import com.yunbao.common.dialog.InstructorOperationDialog;
import com.yunbao.common.event.InstructorOperationEvent;
import com.yunbao.common.event.MessageIMEvent; import com.yunbao.common.event.MessageIMEvent;
import com.yunbao.common.event.NoviceInstructorEvent; import com.yunbao.common.event.NoviceInstructorEvent;
import com.yunbao.common.event.RongIMConnectionStatusEvent; import com.yunbao.common.event.RongIMConnectionStatusEvent;
@ -1015,7 +1016,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
} }
/** /**
* 用户被踢下线 * 跳转会话页面
* *
* @param model * @param model
*/ */
@ -1025,7 +1026,21 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
} }
/** /**
* 用户被踢下线 * 跳转消息列表
*
* @param event
*/
@Subscribe(threadMode = ThreadMode.MAIN)
public void onInstructorOperationEvent(InstructorOperationEvent event) {
//跳转消息列表
Bundle bundle = new Bundle();
bundle.putInt(PDLiveConversationListActivity.MESSAGENUMBER, messageNumber);
bundle.putInt(PDLiveConversationListActivity.NUMBERME, numberMe);
ConversationIMListManager.get(mContext).jumpConversationList(bundle);
}
/**
* 新人面向指导员的引导
* *
* @param event * @param event
*/ */

View File

@ -60,7 +60,7 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:background="@drawable/rc_unread_count_bg_normal" android:background="@mipmap/rc_unread_count_bg_normal"
android:gravity="center" android:gravity="center"
android:includeFontPadding="false" android:includeFontPadding="false"
android:minWidth="14dp" android:minWidth="14dp"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB