Merge branch 'dev_6.6.6_开通守护'
This commit is contained in:
@@ -707,6 +707,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
@Override
|
||||
public void onKickedOffline() {
|
||||
super.onKickedOffline();
|
||||
Log.i("tx", "腾讯云服务器踢出登录");
|
||||
CommonAppConfig.getInstance().clearLoginInfo();
|
||||
LoginActivity.forward();
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ public class ZhuangBanActivity extends AbsActivity {
|
||||
Intent intent = new Intent(context, ZhuangBanActivity.class);
|
||||
Log.i("tag1212", url);
|
||||
intent.putExtra(Constants.URL, url + "&isZh=" + ((IMLoginManager.get(CommonAppContext.sInstance.getBaseContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
if (url.contains("Noble/index.html") || url.contains("Grade/index.html")) {
|
||||
if (url.contains("Noble/index.html") || url.contains("Grade/index.html")|| url.contains("Guard/index.html")) {
|
||||
intent.putExtra("title", "");
|
||||
}
|
||||
context.startActivity(intent);
|
||||
|
||||
@@ -3,7 +3,9 @@ package com.yunbao.main.views;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -32,7 +34,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView mCover, liveType, mLiveIco, mType, pkico, drPkIco, pkAvatar, viewBg;
|
||||
private ImageView bgs;
|
||||
private View views;
|
||||
private View redPacket;
|
||||
private View redPacket, dragon_money;
|
||||
private TextView mLiveState, mTitle, mName, mNum;
|
||||
|
||||
public MainHomeLiveItemViewHolder(@NonNull View itemView) {
|
||||
@@ -42,6 +44,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
itemView.findViewById(R.id.lt_week_list).setVisibility(View.GONE);
|
||||
mCover = itemView.findViewById(R.id.cover);
|
||||
redPacket = itemView.findViewById(R.id.red_packet);
|
||||
dragon_money = itemView.findViewById(R.id.dragon_money);
|
||||
bgs = itemView.findViewById(R.id.bgs);
|
||||
liveType = itemView.findViewById(R.id.live_type);
|
||||
views = itemView.findViewById(R.id.views);
|
||||
@@ -64,6 +67,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
* @param position 下标
|
||||
*/
|
||||
public void loadViewDate(LiveBean bean, int position, int height, OnItemClickListener listener) {
|
||||
dragon_money.setVisibility(View.GONE);
|
||||
Context mContext = itemView.getContext();
|
||||
itemView.setTag(position);
|
||||
liveType.setImageDrawable(null);
|
||||
@@ -149,10 +153,20 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
} else {
|
||||
viewBg.setVisibility(View.GONE);
|
||||
}
|
||||
RelativeLayout.LayoutParams dragon_moneyLayoutParams = (RelativeLayout.LayoutParams) dragon_money.getLayoutParams();
|
||||
if (bean.getRedPacketStatus() == 1) {
|
||||
dragon_moneyLayoutParams.topMargin = DpUtil.dp2px(55);
|
||||
redPacket.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
dragon_moneyLayoutParams.topMargin = DpUtil.dp2px(25);
|
||||
redPacket.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
if (bean.getSendMoneyLongStatus() == 1) {
|
||||
dragon_money.setLayoutParams(dragon_moneyLayoutParams);
|
||||
dragon_money.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
dragon_money.setVisibility(View.GONE);
|
||||
}
|
||||
RxView.clicks(itemView)
|
||||
.throttleFirst(2, TimeUnit.SECONDS) // 才发送 2s内第1次点击按钮的事件
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.yunbao.main.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
@@ -9,6 +10,8 @@ import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.event.FloatWarOrderEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.live.dialog.LiveBuyGuardDialog;
|
||||
import com.yunbao.live.dialog.LiveGuardDialog;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@@ -48,12 +51,13 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
|
||||
ImgLoader.display(mContext, "https://downs.yaoulive.com/gif_trophy.gif", img_trophy);
|
||||
|
||||
/* img_trophy.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View view) {
|
||||
return true;
|
||||
}
|
||||
});*/
|
||||
// img_trophy.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
// @Override
|
||||
// public boolean onLongClick(View view) {
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewOutlineProvider;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
@@ -106,7 +107,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
private TextView btnCopy;
|
||||
private SVGAImageView gift_svga;
|
||||
private View v_noble;
|
||||
private LinearLayout lt_noble;
|
||||
private FrameLayout lt_noble;
|
||||
// private LinearLayout btnUserNoble;
|
||||
private ImageView user_noble_ico, good_nub_ico, img_lv_pic;
|
||||
private TextView user_noble_text, user_noble_time, tv_setting;
|
||||
@@ -162,7 +163,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
user_noble_text = (TextView) findViewById(R.id.user_noble_text);
|
||||
img_setting = (ImageView) findViewById(R.id.img_setting);
|
||||
v_noble = (View) findViewById(R.id.v_noble);
|
||||
lt_noble = (LinearLayout) findViewById(R.id.lt_noble);
|
||||
lt_noble = (FrameLayout) findViewById(R.id.lt_noble);
|
||||
user_noble_time = (TextView) findViewById(R.id.user_noble_time);
|
||||
banner_me = (Banner) findViewById(R.id.banner_me);
|
||||
lt_advertisement = (LinearLayout) findViewById(R.id.lt_advertisement);
|
||||
@@ -177,6 +178,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
findViewById(R.id.lt_noble).setOnClickListener(this);
|
||||
findViewById(R.id.lt_name).setOnClickListener(this);
|
||||
findViewById(R.id.signature).setOnClickListener(this);
|
||||
findViewById(R.id.lt_guard).setOnClickListener(this);
|
||||
|
||||
btnCopy.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -308,8 +310,8 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
ImgLoader.displayAvatar(mContext, u.getAvatar(), mAvatar);
|
||||
mName.setText(u.getUserNiceName());
|
||||
if (!"0".endsWith(u.getNoble_id())) {
|
||||
user_noble_text.setText(mContext.getResources().getString(R.string.now_noble) + u.getNoble_name());
|
||||
user_noble_time.setText(mContext.getResources().getString(R.string.now_noble_time) + u.getNoble_end_time());
|
||||
user_noble_text.setText(u.getNoble_name());
|
||||
user_noble_time.setText(u.getNoble_end_time());
|
||||
} else {
|
||||
user_noble_text.setText(WordUtil.isNewZh() ? "貴族中心" : "VIP Center");
|
||||
user_noble_time.setText(mContext.getResources().getString(R.string.open_noble_text));
|
||||
@@ -353,7 +355,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
|
||||
if (u.getDress().getMedal() != null) {
|
||||
Log.e("tag", u.getDress().getMedal());
|
||||
ImgLoader.display(mContext, u.getDress().getMedal(), user_noble_ico);
|
||||
ImgLoader.displayWithError(mContext, u.getDress().getMedal(), user_noble_ico,R.mipmap.icon_vip_gold);
|
||||
} else {
|
||||
user_noble_ico.setImageResource(R.mipmap.icon_vip_gold);
|
||||
}
|
||||
@@ -545,6 +547,13 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
|
||||
ZhuangBanActivity.forward(mContext, url, false);
|
||||
} else if (i == R.id.lt_guard) {
|
||||
MobclickAgent.onEvent(mContext, "my_guard_btn", "我的-守护点击次数及人数");
|
||||
Constants.isTitle = true;
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
String url = CommonAppConfig.HOST + "/h5/Guard/index.html?token=" + CommonAppConfig.getInstance().getToken()
|
||||
+ "&uid=" + CommonAppConfig.getInstance().getUid() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
|
||||
ZhuangBanActivity.forward(mContext, url, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -286,6 +286,18 @@
|
||||
|
||||
</com.xj.marqueeview.MarqueeView>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dragon_money"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="55dp"
|
||||
android:visibility="gone"
|
||||
app:srcCompat="@mipmap/icon_live_dragon_money"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/red_packet"
|
||||
android:layout_width="30dp"
|
||||
|
||||
@@ -495,77 +495,151 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lt_noble"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="81dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/bg_me_data"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/user_noble_ico"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="21dp"
|
||||
android:src="@mipmap/icon_vip_gold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
<FrameLayout
|
||||
android:id="@+id/lt_noble"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="81dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_weight="1"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:gravity="center|left"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="18dp"
|
||||
android:paddingRight="6dp">
|
||||
android:background="@drawable/bg_me_data"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_noble_text"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_noble_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/open_noble_text"
|
||||
android:textColor="@color/gray1"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/user_noble_ico"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="45dp"
|
||||
android:src="@mipmap/icon_vip_gold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="18dp"
|
||||
android:paddingRight="6dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_noble_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text=""
|
||||
android:textColor="#000000"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_noble_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/open_noble_text"
|
||||
android:textColor="#000000"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_noble"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:background="@mipmap/icon_more_gray"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/v_noble"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:background="@mipmap/icon_more_gray"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false" />
|
||||
android:layout_height="1dp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/lt_guard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="81dp"
|
||||
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_me_data"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="45dp"
|
||||
android:src="@mipmap/icon_guard_me" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:clickable="false"
|
||||
android:focusable="false"
|
||||
android:focusableInTouchMode="false"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="18dp"
|
||||
android:paddingRight="6dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="@string/live_guard"
|
||||
android:textColor="#000000"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/guard_for_your_beloved_one"
|
||||
android:textColor="#000000"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 23 KiB |
Reference in New Issue
Block a user