老用户回归
This commit is contained in:
parent
f2a3f55e52
commit
9b1e182fbd
@ -1,6 +1,7 @@
|
|||||||
package com.yunbao.common.bean;
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -9,7 +10,7 @@ import java.util.List;
|
|||||||
* Created by cxf on 2017/8/5.
|
* Created by cxf on 2017/8/5.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ConfigBean {
|
public class ConfigBean extends BaseModel {
|
||||||
private String version;//Android apk安装包 版本号
|
private String version;//Android apk安装包 版本号
|
||||||
private String downloadApkUrl;//Android apk安装包 下载地址
|
private String downloadApkUrl;//Android apk安装包 下载地址
|
||||||
private String updateDes;//版本更新描述
|
private String updateDes;//版本更新描述
|
||||||
@ -58,10 +59,63 @@ public class ConfigBean {
|
|||||||
private String txPlayUgcLicenceUrl;//腾讯短视频鉴权
|
private String txPlayUgcLicenceUrl;//腾讯短视频鉴权
|
||||||
private String txVideoUgcKey;
|
private String txVideoUgcKey;
|
||||||
private String google_isup;
|
private String google_isup;
|
||||||
|
@SerializedName("is_return_user")//是否需要弹窗(0否,1是)
|
||||||
|
private String isReturnUser;
|
||||||
|
@SerializedName("popup_img_url")//弹窗图片地址
|
||||||
|
private String popupImgUrl;
|
||||||
|
@SerializedName("popup_img_en_url")//弹窗图片地址
|
||||||
|
private String popupImgEnUrl;
|
||||||
|
@SerializedName("jump_h5_url")//点击跳转H5页面地址
|
||||||
|
private String jumpH5Url;
|
||||||
|
|
||||||
|
@JSONField(name = "is_return_user")
|
||||||
|
public String getIsReturnUser() {
|
||||||
|
return isReturnUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JSONField(name = "is_return_user")
|
||||||
|
public ConfigBean setIsReturnUser(String isReturnUser) {
|
||||||
|
this.isReturnUser = isReturnUser;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
@JSONField(name = "popup_img_url")
|
||||||
|
public String getPopupImgUrl() {
|
||||||
|
return popupImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JSONField(name = "popup_img_url")
|
||||||
|
public ConfigBean setPopupImgUrl(String popupImgUrl) {
|
||||||
|
this.popupImgUrl = popupImgUrl;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JSONField(name = "popup_img_en_url")
|
||||||
|
public String getPopupImgEnUrl() {
|
||||||
|
return popupImgEnUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JSONField(name = "popup_img_en_url")
|
||||||
|
public ConfigBean setPopupImgEnUrl(String popupImgEnUrl) {
|
||||||
|
this.popupImgEnUrl = popupImgEnUrl;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JSONField(name = "jump_h5_url")
|
||||||
|
public String getJumpH5Url() {
|
||||||
|
return jumpH5Url;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JSONField(name = "jump_h5_url")
|
||||||
|
public ConfigBean setJumpH5Url(String jumpH5Url) {
|
||||||
|
this.jumpH5Url = jumpH5Url;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@JSONField(name = "google_isup")
|
@JSONField(name = "google_isup")
|
||||||
public String getGoogle_isup() {
|
public String getGoogle_isup() {
|
||||||
return google_isup;
|
return google_isup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "google_isup")
|
@JSONField(name = "google_isup")
|
||||||
public void setGoogle_isup(String google_isup) {
|
public void setGoogle_isup(String google_isup) {
|
||||||
this.google_isup = google_isup;
|
this.google_isup = google_isup;
|
||||||
@ -71,6 +125,7 @@ public class ConfigBean {
|
|||||||
public String getTxPlayUgcLicenceUrl() {
|
public String getTxPlayUgcLicenceUrl() {
|
||||||
return txPlayUgcLicenceUrl;
|
return txPlayUgcLicenceUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "tx_play_ugc_licence_url")
|
@JSONField(name = "tx_play_ugc_licence_url")
|
||||||
public void setTxPlayUgcLicenceUrl(String txPlayUgcLicenceUrl) {
|
public void setTxPlayUgcLicenceUrl(String txPlayUgcLicenceUrl) {
|
||||||
this.txPlayUgcLicenceUrl = txPlayUgcLicenceUrl;
|
this.txPlayUgcLicenceUrl = txPlayUgcLicenceUrl;
|
||||||
@ -347,6 +402,7 @@ public class ConfigBean {
|
|||||||
public void setBeautyFace(int beautyFace) {
|
public void setBeautyFace(int beautyFace) {
|
||||||
this.beautyFace = beautyFace;
|
this.beautyFace = beautyFace;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "sprout_face_narrowing")
|
@JSONField(name = "sprout_face_narrowing")
|
||||||
public int getBeautyFaceNarrowing() {
|
public int getBeautyFaceNarrowing() {
|
||||||
return faceNarrowing;
|
return faceNarrowing;
|
||||||
@ -465,22 +521,27 @@ public class ConfigBean {
|
|||||||
public String getAdInfo() {
|
public String getAdInfo() {
|
||||||
return mAdInfo;
|
return mAdInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "guide")
|
@JSONField(name = "guide")
|
||||||
public void setAdInfo(String adInfo) {
|
public void setAdInfo(String adInfo) {
|
||||||
mAdInfo = adInfo;
|
mAdInfo = adInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "letter_switch")
|
@JSONField(name = "letter_switch")
|
||||||
public int getPriMsgSwitch() {
|
public int getPriMsgSwitch() {
|
||||||
return priMsgSwitch;
|
return priMsgSwitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "letter_switch")
|
@JSONField(name = "letter_switch")
|
||||||
public void setPriMsgSwitch(int priMsgSwitch) {
|
public void setPriMsgSwitch(int priMsgSwitch) {
|
||||||
this.priMsgSwitch = priMsgSwitch;
|
this.priMsgSwitch = priMsgSwitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "isup")
|
@JSONField(name = "isup")
|
||||||
public int getForceUpdate() {
|
public int getForceUpdate() {
|
||||||
return forceUpdate;
|
return forceUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "isup")
|
@JSONField(name = "isup")
|
||||||
public void setForceUpdate(int forceUpdate) {
|
public void setForceUpdate(int forceUpdate) {
|
||||||
this.forceUpdate = forceUpdate;
|
this.forceUpdate = forceUpdate;
|
||||||
@ -490,6 +551,7 @@ public class ConfigBean {
|
|||||||
public String getSproutType() {
|
public String getSproutType() {
|
||||||
return sproutType;
|
return sproutType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "sprout_type")
|
@JSONField(name = "sprout_type")
|
||||||
public void setSproutType(String sprout_type) {
|
public void setSproutType(String sprout_type) {
|
||||||
this.sproutType = sprout_type;
|
this.sproutType = sprout_type;
|
||||||
@ -499,6 +561,7 @@ public class ConfigBean {
|
|||||||
public String getTurntableEnable() {
|
public String getTurntableEnable() {
|
||||||
return turntableEnable;
|
return turntableEnable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "turntable_enable")
|
@JSONField(name = "turntable_enable")
|
||||||
public void setTurntableEnable(String turntable) {
|
public void setTurntableEnable(String turntable) {
|
||||||
this.turntableEnable = turntable;
|
this.turntableEnable = turntable;
|
||||||
@ -529,6 +592,7 @@ public class ConfigBean {
|
|||||||
public String getPaster360Url() {
|
public String getPaster360Url() {
|
||||||
return paster360Url;
|
return paster360Url;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "360_paster_url")
|
@JSONField(name = "360_paster_url")
|
||||||
public void setPaster360Url(String paster360Url) {
|
public void setPaster360Url(String paster360Url) {
|
||||||
this.paster360Url = paster360Url;
|
this.paster360Url = paster360Url;
|
||||||
@ -538,6 +602,7 @@ public class ConfigBean {
|
|||||||
public String getPkTime() {
|
public String getPkTime() {
|
||||||
return pkTime;
|
return pkTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "live_pk_time")
|
@JSONField(name = "live_pk_time")
|
||||||
public void setPkTime(String time) {
|
public void setPkTime(String time) {
|
||||||
this.pkTime = time;
|
this.pkTime = time;
|
||||||
@ -548,6 +613,7 @@ public class ConfigBean {
|
|||||||
public String getCustomerServerUrl() {
|
public String getCustomerServerUrl() {
|
||||||
return serverUrl;
|
return serverUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSONField(name = "service_url")
|
@JSONField(name = "service_url")
|
||||||
public void setCustomerServerUrl(String serverUrl) {
|
public void setCustomerServerUrl(String serverUrl) {
|
||||||
this.serverUrl = serverUrl;
|
this.serverUrl = serverUrl;
|
||||||
|
@ -14,29 +14,29 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_marginTop="210dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/welcome_pdlive"
|
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="210dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:text="@string/welcome_pdlive"
|
||||||
android:textColor="#fff7b55a"
|
android:textColor="#fff7b55a"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@string/newcomer"
|
android:text="@string/newcomer"
|
||||||
android:textColor="#ff1a1a1a"
|
android:textColor="#ff1a1a1a"
|
||||||
android:layout_gravity="center"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:layout_marginTop="5dp"/>
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<RelativeLayout android:id="@+id/btn_rose"
|
<RelativeLayout
|
||||||
|
android:id="@+id/btn_rose"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="70dp"
|
android:layout_height="70dp"
|
||||||
android:layout_marginLeft="22dp"
|
android:layout_marginLeft="22dp"
|
||||||
@ -46,14 +46,13 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:paddingLeft="40dp"
|
||||||
android:text="@string/one_free"
|
android:text="@string/one_free"
|
||||||
android:textColor="#ffffffff"
|
android:textColor="#ffffffff"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
android:paddingLeft="40dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
@ -63,12 +62,13 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RelativeLayout android:id="@+id/aa"
|
<RelativeLayout
|
||||||
|
android:id="@+id/aa"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginLeft="22dp"
|
android:layout_marginLeft="22dp"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:background="@mipmap/jindou_box">
|
android:background="@mipmap/jindou_box">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -78,35 +78,35 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/golden_bean"
|
android:layout_centerHorizontal="true"
|
||||||
android:textColor="#ffffffff"
|
android:layout_centerVertical="true"
|
||||||
android:textSize="13sp"
|
android:text="@string/golden_bean"
|
||||||
android:textStyle="bold"
|
android:textColor="#ffffffff"
|
||||||
android:layout_centerVertical="true"
|
android:textSize="13sp"
|
||||||
android:layout_centerHorizontal="true"
|
android:textStyle="bold" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView android:id="@+id/gold"
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/gold"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:text="0"
|
android:layout_height="wrap_content"
|
||||||
android:textStyle="bold"
|
android:text="0"
|
||||||
android:textColor="#fffff69f"
|
android:textColor="#fffff69f"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
/>
|
android:textStyle="bold" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout android:id="@+id/aa1"
|
<RelativeLayout
|
||||||
|
android:id="@+id/aa1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
android:layout_marginRight="22dp"
|
android:layout_marginRight="22dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:background="@mipmap/exp_box">
|
android:background="@mipmap/exp_box">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -119,22 +119,21 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:text="@string/exp"
|
android:text="@string/exp"
|
||||||
android:textColor="#ffffffff"
|
android:textColor="#ffffffff"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView android:id="@+id/exp"
|
<TextView
|
||||||
|
android:id="@+id/exp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="0"
|
android:text="0"
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="#fffff69f"
|
android:textColor="#fffff69f"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
/>
|
android:textStyle="bold" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@ -144,23 +143,24 @@
|
|||||||
<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="18dp"
|
||||||
android:text="@string/new_rewards"
|
android:text="@string/new_rewards"
|
||||||
android:textColor="#ffb3b3b3"
|
android:textColor="#ffb3b3b3"
|
||||||
android:textSize="10sp"
|
android:textSize="10sp" />
|
||||||
android:layout_marginTop="18dp"
|
|
||||||
/>
|
<TextView
|
||||||
<TextView android:id="@+id/btn_confirm"
|
android:id="@+id/btn_confirm"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginRight="30dp"
|
|
||||||
android:layout_marginLeft="30dp"
|
android:layout_marginLeft="30dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginRight="30dp"
|
||||||
|
android:layout_marginBottom="30dp"
|
||||||
|
android:background="@drawable/border_fdbe40"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@string/receive_awards"
|
android:text="@string/receive_awards"
|
||||||
android:textColor="#ffffffff"
|
android:textColor="#ffffffff"
|
||||||
android:textSize="13sp"
|
android:textSize="13sp" />
|
||||||
android:gravity="center"
|
|
||||||
android:layout_marginBottom="30dp"
|
|
||||||
android:background="@drawable/border_fdbe40"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import android.content.Intent;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Display;
|
import android.view.Display;
|
||||||
@ -91,6 +92,7 @@ import com.yunbao.live.utils.LiveStorge;
|
|||||||
import com.yunbao.live.views.ChatListViewHolder;
|
import com.yunbao.live.views.ChatListViewHolder;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
import com.yunbao.main.dialog.MainStartDialogFragment;
|
import com.yunbao.main.dialog.MainStartDialogFragment;
|
||||||
|
import com.yunbao.main.dialog.ReturnUserDialog;
|
||||||
import com.yunbao.main.dialog.SigninDialog;
|
import com.yunbao.main.dialog.SigninDialog;
|
||||||
import com.yunbao.main.event.MainHomeCommunityToChatEvent;
|
import com.yunbao.main.event.MainHomeCommunityToChatEvent;
|
||||||
import com.yunbao.main.event.PDLiveConversationListEvent;
|
import com.yunbao.main.event.PDLiveConversationListEvent;
|
||||||
@ -136,7 +138,7 @@ import kotlin.Unit;
|
|||||||
@Route(path = RouteUtil.PATH_MAIN)
|
@Route(path = RouteUtil.PATH_MAIN)
|
||||||
public class MainActivity extends AbsActivity implements MainAppBarLayoutListener {
|
public class MainActivity extends AbsActivity implements MainAppBarLayoutListener {
|
||||||
|
|
||||||
public RelativeLayout rt_main_tab;
|
public RelativeLayout rt_main_tab;
|
||||||
private ViewGroup mRootView;
|
private ViewGroup mRootView;
|
||||||
private TabButtonGroup mTabButtonGroup;
|
private TabButtonGroup mTabButtonGroup;
|
||||||
private ViewPager mViewPager;
|
private ViewPager mViewPager;
|
||||||
@ -184,7 +186,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
ConversationIMListManager.get(this);
|
ConversationIMListManager.get(this);
|
||||||
@ -193,7 +194,21 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
CommonHttpUtil.getConfig(mContext, new CommonCallback<ConfigBean>() {
|
CommonHttpUtil.getConfig(mContext, new CommonCallback<ConfigBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void callback(ConfigBean bean) {
|
public void callback(ConfigBean bean) {
|
||||||
|
//是否需要老用户回归弹窗
|
||||||
|
if (TextUtils.equals(bean.getIsReturnUser(), "1")) {
|
||||||
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
ReturnUserDialog fragment1 = new ReturnUserDialog();
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("popupImgUrl", bean.getPopupImgUrl());
|
||||||
|
bundle.putString("popupImgEnUrl", bean.getPopupImgEnUrl());
|
||||||
|
bundle.putString("jumpH5Url", bean.getJumpH5Url());
|
||||||
|
fragment1.setArguments(bundle);
|
||||||
|
fragment1.show(getSupportFragmentManager(), "ReturnUserDialog");
|
||||||
|
}
|
||||||
|
}, 1500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
rt_main_tab = (RelativeLayout) findViewById(R.id.rt_main_tab);
|
rt_main_tab = (RelativeLayout) findViewById(R.id.rt_main_tab);
|
||||||
@ -534,7 +549,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(int code, String desc) {
|
public void onError(int code, String desc) {
|
||||||
Log.i("tx", "登录失败: code = "+code+" desc = "+desc);
|
Log.i("tx", "登录失败: code = " + code + " desc = " + desc);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -565,7 +580,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(int code, String desc) {
|
public void onError(int code, String desc) {
|
||||||
Log.i("tx", "登录失败: code = "+code+" desc = "+desc);
|
Log.i("tx", "登录失败: code = " + code + " desc = " + desc);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,86 @@
|
|||||||
|
package com.yunbao.main.dialog;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.yunbao.common.CommonAppConfig;
|
||||||
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||||
|
import com.yunbao.main.R;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 老用户回归
|
||||||
|
*/
|
||||||
|
public class ReturnUserDialog extends AbsDialogFragment {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.popwindow_return_user;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getDialogStyle() {
|
||||||
|
return R.style.dialog2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canCancel() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setWindowAttributes(Window window) {
|
||||||
|
window.setWindowAnimations(com.yunbao.live.R.style.bottomToTopAnim);
|
||||||
|
WindowManager.LayoutParams params = window.getAttributes();
|
||||||
|
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||||
|
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||||
|
params.gravity = Gravity.CENTER;
|
||||||
|
window.setAttributes(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
String popupImgUrl = getArguments().getString("popupImgUrl");
|
||||||
|
String popupImgEnUrl = getArguments().getString("popupImgEnUrl");
|
||||||
|
String jumpH5Url = getArguments().getString("jumpH5Url");
|
||||||
|
ImageView image = (ImageView) findViewById(R.id.image);
|
||||||
|
Locale locale = mContext.getResources().getConfiguration().locale;
|
||||||
|
String language = locale.getLanguage();
|
||||||
|
if (TextUtils.equals(language, "zh")) {
|
||||||
|
ImgLoader.display(mContext, popupImgUrl, image);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(mContext, popupImgEnUrl, image);
|
||||||
|
}
|
||||||
|
image.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
dismiss();
|
||||||
|
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||||
|
StringBuffer htmlUrl = new StringBuffer();
|
||||||
|
htmlUrl.append(CommonAppConfig.HOST)
|
||||||
|
.append("/")
|
||||||
|
.append(jumpH5Url)
|
||||||
|
.append("&uid=")
|
||||||
|
.append(userInfo.getId())
|
||||||
|
.append("&token=")
|
||||||
|
.append(userInfo.getToken());
|
||||||
|
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
14
main/src/main/res/layout/popwindow_return_user.xml
Normal file
14
main/src/main/res/layout/popwindow_return_user.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:ignore="MissingDefaultResource">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/image"
|
||||||
|
android:layout_width="332.5dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_height="359.5dp" />
|
||||||
|
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user