111
This commit is contained in:
parent
8b9d10ca92
commit
1fc6a3adfe
@ -62,7 +62,7 @@ public class InstructorOperationDialog extends AbsDialogFragment {
|
||||
|
||||
@Override
|
||||
protected boolean canCancel() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -41,7 +41,7 @@ public class IMLoginManager extends BaseCacheManager {
|
||||
public boolean isNewUserGif(){
|
||||
return getBoolean(isNewUserGif,false);
|
||||
}
|
||||
//新用戶是否送了禮物
|
||||
//是否是新用戶還沒有送禮物
|
||||
public void setNewUserGif(boolean t){
|
||||
put(isNewUserGif,t);
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="13dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/exclusive_instructor1"
|
||||
android:textColor="#FF737373"
|
||||
|
@ -658,7 +658,7 @@
|
||||
<string name="exp">EXP</string>
|
||||
<string name="new_rewards">Complete newcomer tasks for more rewards</string>
|
||||
<string name="receive_awards">ReceiveAwards</string>
|
||||
|
||||
<string name="one_free">One free gift privilege!</string>
|
||||
|
||||
<string name="send">Send out</string>
|
||||
<string name="sorry">I am sorry</string>
|
||||
|
@ -633,6 +633,9 @@
|
||||
<string name="reg">立即註冊</string>
|
||||
<string name="no_medal">TA還沒有勛章</string>
|
||||
<string name="car">座駕</string>
|
||||
<string name="one_free">一次免費贈送禮物特權!</string>
|
||||
|
||||
|
||||
<string name="no_car">TA還沒有座騎</string>
|
||||
<string name="welcome_pdlive">歡迎來到PDLIVE</string>
|
||||
<string name="newcomer">恭喜你獲得了新人獎勵</string>
|
||||
|
@ -4,14 +4,14 @@ ext {
|
||||
buildToolsVersion: "28.0.3",
|
||||
minSdkVersion : 21,
|
||||
targetSdkVersion : 30,
|
||||
versionCode : 189,
|
||||
versionName : "6.3.5"
|
||||
versionCode : 200,
|
||||
versionName : "6.3.6"
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式
|
||||
// serverHost : "https://napi.yaoulive.com",
|
||||
serverHost : "https://napi.yaoulive.com",
|
||||
//測試
|
||||
serverHost : "https://ceshi.yaoulive.com",
|
||||
// serverHost : "https://ceshi.yaoulive.com",
|
||||
|
||||
//腾讯地图
|
||||
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||
|
@ -858,7 +858,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
* 打开聊天输入框
|
||||
*/
|
||||
public void openChatWindow() {
|
||||
if ("1".equals(Constants.isSend)) {
|
||||
// if ("1".equals(Constants.isSend)) {
|
||||
if (mKeyBoardHeightUtil == null) {
|
||||
mKeyBoardHeightUtil = new KeyBoardHeightUtil2(mContext, super.findViewById(android.R.id.content), this);
|
||||
mKeyBoardHeightUtil.start();
|
||||
@ -872,9 +872,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
bundle.putString(Constants.COIN_NAME, mCoinName);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveInputDialogFragment");
|
||||
} else {
|
||||
showTaskDialog();
|
||||
}
|
||||
// } else {
|
||||
// showTaskDialog();
|
||||
// }
|
||||
}
|
||||
|
||||
private void showTaskDialog() {
|
||||
|
@ -275,7 +275,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
if (bundle != null) {
|
||||
mLiveUid = bundle.getString(Constants.LIVE_UID);
|
||||
mStream = bundle.getString(Constants.LIVE_STREAM);
|
||||
ToastUtil.show("啊"+ bundle.getString(Constants.LIVE_WISH_GIFTID));
|
||||
mWishGiftId = bundle.getString(Constants.LIVE_WISH_GIFTID);
|
||||
by = bundle.getString("by");
|
||||
}
|
||||
@ -428,9 +427,8 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
|
||||
private void showGiftList(List<LiveGiftBean> list) {
|
||||
if (IMLoginManager.get(mContext).isNewUserGif() == true && type_name.equals("熱門")|| type_name.equals("Hot")) {
|
||||
|
||||
list.add(0, bean1);
|
||||
if(mWishGiftId==null) {
|
||||
|
||||
mWishGiftId = "" + bean1.getId();
|
||||
}
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ public class LivePromotionDialogFragment extends AbsDialogFragment {
|
||||
mRefreshView = mRootView.findViewById(R.id.refreshView);
|
||||
livePromotionAdapter = new LivePromotionAdapter(mContext, LiveActivity.mLiveUid,this );
|
||||
mRefreshView.setLayoutManager(new GridLayoutManager(mContext, 4));
|
||||
mRefreshView.setLoadMoreEnable(false);
|
||||
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<LivePromotionBean>() {
|
||||
@Override
|
||||
public RefreshAdapter<LivePromotionBean> getAdapter() {
|
||||
@ -89,7 +90,7 @@ public class LivePromotionDialogFragment extends AbsDialogFragment {
|
||||
|
||||
@Override
|
||||
public void onLoadMoreSuccess(List<LivePromotionBean> loadItemList, int loadItemCount) {
|
||||
livePromotionAdapter.insertList(loadItemList);
|
||||
// livePromotionAdapter.insertList(loadItemList);
|
||||
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
@ -111,6 +112,7 @@ public class NewUserDialog extends AbsDialogFragment {
|
||||
public void onClick(View view) {
|
||||
EventBus.getDefault().post("showBanner");
|
||||
EventBus.getDefault().post("svga_new_user_gif");
|
||||
IMLoginManager.get(mContext).setNewUserGif(true);
|
||||
countDownTimer.cancel();
|
||||
dismiss();
|
||||
}
|
||||
|
@ -299,7 +299,8 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
JSONObject old_obj = JSON.parseObject(info[0]);
|
||||
|
||||
JSONObject obj = old_obj.getJSONObject("task");
|
||||
JSONObject obj = old_obj.getJSONObject("task");
|
||||
if (obj != null) {
|
||||
JSONObject obj1 = old_obj.getJSONObject("gift");
|
||||
JSONObject reward_one = old_obj.getJSONObject("reward_one");
|
||||
|
||||
@ -313,8 +314,8 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
bean1.setName(obj1.getString("giftname"));
|
||||
bean1.setTag("1");
|
||||
|
||||
if( IMLoginManager.get(mContext).isisNewUserOne() == false) {
|
||||
if(obj.getString("sendgift").equals("0")) {
|
||||
if (IMLoginManager.get(mContext).isisNewUserOne() == false) {
|
||||
if (obj.getString("sendgift").equals("0")) {
|
||||
EventBus.getDefault().post("svga_new_user_gif");
|
||||
}
|
||||
}
|
||||
@ -324,7 +325,6 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
mBannerList3.add(banner3Bean);
|
||||
|
||||
|
||||
|
||||
BannerBean banner3Bean1 = new BannerBean();
|
||||
banner3Bean1.setImageUrl("https://qny.shayucm.com/live_Mission_box.png");
|
||||
banner3Bean1.setLink(obj.getString("attent"));
|
||||
@ -335,14 +335,15 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
banner3Bean2.setLink(obj.getString("illumine"));
|
||||
mBannerList3.add(banner3Bean2);
|
||||
|
||||
if(obj.getString("sendgift").equals("0")&& IMLoginManager.get(context).isisNewUserOne() == false) {
|
||||
if (obj.getString("sendgift").equals("0") && IMLoginManager.get(context).isisNewUserOne() == false) {
|
||||
showBanner3();
|
||||
}else if(obj.getString("attent").equals("0")&& IMLoginManager.get(context).isisNewUserOne() == false){
|
||||
} else if (obj.getString("attent").equals("0") && IMLoginManager.get(context).isisNewUserOne() == false) {
|
||||
showBanner3();
|
||||
}else if(obj.getString("illumine").equals("0")&& IMLoginManager.get(context).isisNewUserOne()== false){
|
||||
} else if (obj.getString("illumine").equals("0") && IMLoginManager.get(context).isisNewUserOne() == false) {
|
||||
showBanner3();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
47
live/src/main/java/com/yunbao/live/utils/CenterTextView.java
Normal file
47
live/src/main/java/com/yunbao/live/utils/CenterTextView.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.yunbao.live.utils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.text.Layout;
|
||||
import android.text.StaticLayout;
|
||||
import android.text.TextPaint;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
|
||||
@SuppressLint("AppCompatCustomView")
|
||||
public class CenterTextView extends TextView {
|
||||
private StaticLayout mStaticLayout;
|
||||
private TextPaint mTextPaint;
|
||||
|
||||
public CenterTextView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public CenterTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public CenterTextView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
super.onSizeChanged(w, h, oldw, oldh);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
|
||||
mTextPaint.setTextSize(getTextSize());
|
||||
mTextPaint.setColor(getCurrentTextColor());
|
||||
mStaticLayout = new StaticLayout(getText(), mTextPaint, getWidth(), Layout.Alignment.ALIGN_CENTER, 1.0f, 0.0f, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
mStaticLayout.draw(canvas);
|
||||
}
|
||||
}
|
@ -23,9 +23,10 @@
|
||||
android:text="Task 1"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="8sp"
|
||||
android:layout_marginBottom="3dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
<com.yunbao.live.utils.CenterTextView
|
||||
android:id="@+id/task_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -2,8 +2,8 @@
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="40dp"
|
||||
android:paddingRight="40dp">
|
||||
android:paddingLeft="53dp"
|
||||
android:paddingRight="53dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
@ -14,8 +14,8 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_marginTop="220dp"
|
||||
android:layout_width="133dp"
|
||||
android:layout_marginTop="210dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/welcome_pdlive"
|
||||
android:layout_gravity="center"
|
||||
@ -33,9 +33,8 @@
|
||||
android:layout_gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="10dp"
|
||||
/>
|
||||
android:textSize="20sp"
|
||||
android:layout_marginTop="5dp"/>
|
||||
|
||||
<RelativeLayout android:id="@+id/btn_rose"
|
||||
android:layout_width="match_parent"
|
||||
@ -47,10 +46,11 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="一次免費贈送禮物特權!"
|
||||
android:text="@string/one_free"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="13sp"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:paddingLeft="40dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
/>
|
||||
@ -93,6 +93,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#fffff69f"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
@ -130,6 +131,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#fffff69f"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
@ -145,7 +147,7 @@
|
||||
android:text="@string/new_rewards"
|
||||
android:textColor="#ffb3b3b3"
|
||||
android:textSize="10sp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="18dp"
|
||||
/>
|
||||
<TextView android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -75,9 +75,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
app:delay_time="5000"
|
||||
app:indicator_drawable_selected="@drawable/bg_home_indicator_selected"
|
||||
app:indicator_drawable_unselected="@drawable/bg_home_indicator_unselected"
|
||||
app:indicator_height="8dp"
|
||||
app:indicator_width="8dp" />
|
||||
|
||||
|
@ -529,12 +529,10 @@ public class EntryActivity extends AppCompatActivity {
|
||||
|
||||
private void updateUI() {
|
||||
boolean enableButtons = AccessToken.getCurrentAccessToken() != null;
|
||||
ToastUtil.show(enableButtons + "");
|
||||
Profile profile = Profile.getCurrentProfile();
|
||||
if (enableButtons && profile != null) {
|
||||
ToastUtil.show(profile.getId() + "");
|
||||
LoginData data = new LoginData();
|
||||
// data.setAvatar(profile.getProfilePictureUri(150, 150).toString());
|
||||
data.setAvatar(profile.getProfilePictureUri(150, 150).toString());
|
||||
data.setNickName(profile.getName());
|
||||
data.setOpenID(AccessToken.getCurrentAccessToken().getUserId());
|
||||
data.setType("facebook");
|
||||
@ -734,9 +732,10 @@ public class EntryActivity extends AppCompatActivity {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (info[0] != null) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
IMLoginManager.get(EntryActivity.this).setNewUserGif(true);
|
||||
IMLoginManager.get(EntryActivity.this).setisNewUserOne(true);
|
||||
MainActivity.forward(EntryActivity.this, false);
|
||||
gotoLive(obj.getString("anchor_id"));
|
||||
IMLoginManager.get(EntryActivity.this).setisNewUserOne(true);
|
||||
if (obj.containsKey("home_zdy_pop")) {
|
||||
NoviceInstructorManager.get(activity).setHomeZdyPop(obj.getString("home_zdy_pop"));
|
||||
}
|
||||
|
@ -999,11 +999,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onUpdateFieldEvent(UpdateTablePointMe updateTablePointMe) {
|
||||
numberMe = updateTablePointMe.getPoint();
|
||||
if (updateTablePointMe.getPoint() == 0) {
|
||||
v_table_redpoint_me.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
v_table_redpoint_me.setVisibility(View.GONE);
|
||||
}
|
||||
// if (updateTablePointMe.getPoint() == 0) {
|
||||
// v_table_redpoint_me.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
// v_table_redpoint_me.setVisibility(View.GONE);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,9 +38,11 @@ import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.NoviceInstructorManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
@ -470,16 +472,11 @@ public class RegisterActivity extends AbsActivity {
|
||||
IMLoginManager.get(activity).setupLoginUser(model);
|
||||
//融云连接服务器
|
||||
RongcloudIMManager.connectIM(activity);
|
||||
if (mFirstLogin) {
|
||||
if (mDialog != null) {
|
||||
mDialog.dismiss();
|
||||
}
|
||||
getBaseUserInfo();
|
||||
//绑定广告渠道用户
|
||||
AdjustEvent adjustEvent = new AdjustEvent("s1or0t");
|
||||
adjustEvent.addCallbackParameter("userid", CommonAppConfig.getInstance().getUid());
|
||||
Adjust.trackEvent(adjustEvent);
|
||||
netHandler.post(getRandJoinAnchor);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
@ -496,6 +493,23 @@ public class RegisterActivity extends AbsActivity {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
private void getBaseUserInfo() {
|
||||
MainHttpUtil.getBaseInfo(new CommonCallback<UserBean>() {
|
||||
@Override
|
||||
public void callback(UserBean bean) {
|
||||
if (mDialog != null) {
|
||||
mDialog.dismiss();
|
||||
}
|
||||
if (bean != null) {
|
||||
netHandler.post(getRandJoinAnchor);
|
||||
// EventBus.getDefault().post(new RegSuccessEvent());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 用户自动签到
|
||||
*/
|
||||
@ -512,6 +526,7 @@ public class RegisterActivity extends AbsActivity {
|
||||
if (info[0] != null) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
IMLoginManager.get(activity).setisNewUserOne(true);
|
||||
IMLoginManager.get(activity).setNewUserGif(true);
|
||||
gotoLive(obj.getString("anchor_id"));
|
||||
if (obj.containsKey("home_zdy_pop")) {
|
||||
NoviceInstructorManager.get(mContext).setHomeZdyPop(obj.getString("home_zdy_pop"));
|
||||
|
@ -30,6 +30,7 @@ import com.yunbao.live.bean.LiveBean;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.EntryActivity;
|
||||
import com.yunbao.main.activity.MainActivity;
|
||||
|
||||
import static com.yunbao.common.CommonAppContext.logger;
|
||||
@ -122,8 +123,9 @@ public class OneLoginDialog extends AbsDialogFragment {
|
||||
if (info[0] != null) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
MainActivity.forward(getContext(), false);
|
||||
gotoLive(obj.getString("anchor_id"));
|
||||
IMLoginManager.get(mContext).setNewUserGif(true);
|
||||
IMLoginManager.get(mContext).setisNewUserOne(true);
|
||||
gotoLive(obj.getString("anchor_id"));
|
||||
if (obj.containsKey("home_zdy_pop")) {
|
||||
NoviceInstructorManager.get(mContext).setHomeZdyPop(obj.getString("home_zdy_pop"));
|
||||
}
|
||||
|
@ -72,8 +72,7 @@
|
||||
android:gravity="left|center"
|
||||
android:hint="@string/edit_profile_name_empty"
|
||||
android:background="@null"
|
||||
android:maxLines="10"
|
||||
android:maxLength="20"
|
||||
android:maxLength="10"
|
||||
android:singleLine="true"
|
||||
android:textColor="#161616"
|
||||
android:textColorHint="#B6B6B6"
|
||||
|
Loading…
Reference in New Issue
Block a user