Compare commits
4 Commits
07afb20438
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
292e0b8964 | ||
|
|
cc66d8a355 | ||
|
|
43e289e2a9 | ||
|
|
fc40082e5a |
@@ -379,7 +379,7 @@ android {
|
|||||||
implementation 'com.flyco.roundview:FlycoRoundView_Lib:1.1.4@aar'
|
implementation 'com.flyco.roundview:FlycoRoundView_Lib:1.1.4@aar'
|
||||||
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.6'
|
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.6'
|
||||||
implementation 'com.github.eralpyucel:CircleProgressView:v1.1'
|
implementation 'com.github.eralpyucel:CircleProgressView:v1.1'
|
||||||
//implementation 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer:v8.1.0'
|
// implementation 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer:v8.1.0'
|
||||||
implementation 'com.shuyu:GSYVideoPlayer:8.1.0'
|
implementation 'com.shuyu:GSYVideoPlayer:8.1.0'
|
||||||
|
|
||||||
implementation 'com.googlecode.mp4parser:isoparser:1.1.21'
|
implementation 'com.googlecode.mp4parser:isoparser:1.1.21'
|
||||||
@@ -401,7 +401,9 @@ android {
|
|||||||
implementation 'com.github.Dimezis:BlurView:version-3.1.0'
|
implementation 'com.github.Dimezis:BlurView:version-3.1.0'
|
||||||
|
|
||||||
implementation "com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-x"
|
implementation "com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-x"
|
||||||
implementation "com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.6" //3.0.2更换了很多API
|
// implementation "com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.6" //3.0.2更换了很多API
|
||||||
|
|
||||||
|
// implementation 'io.github.carguo:gsyvideoplayer:12.1.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -281,6 +281,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".view.dynamics.activity.DynamicPostActivity"
|
android:name=".view.dynamics.activity.DynamicPostActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".view.dynamics.activity.DynamicPublishActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".view.main.MainPageActivity"
|
android:name=".view.main.MainPageActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
@@ -930,6 +933,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".view.dynamics.activity.PageVideoPlayActivity"
|
android:name=".view.dynamics.activity.PageVideoPlayActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".view.dynamics.activity.PageVideoPlay2Activity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
<activity android:name=".view.settings.GoddessPrivilegeActivity" />
|
<activity android:name=".view.settings.GoddessPrivilegeActivity" />
|
||||||
<activity android:name=".view.settings.CancellationActivity" />
|
<activity android:name=".view.settings.CancellationActivity" />
|
||||||
<activity android:name=".view.settings.BindBankActivity" />
|
<activity android:name=".view.settings.BindBankActivity" />
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ public class DynamicsAdapter1 extends BaseAdapter {
|
|||||||
//TODO 显示浏览次数
|
//TODO 显示浏览次数
|
||||||
holder.tv_see_count.setText("已有"+bean.getLike_count()+"次浏览");
|
holder.tv_see_count.setText("已有"+bean.getLike_count()+"次浏览");
|
||||||
|
|
||||||
|
holder.tv_dynamic_level.setText("LV." + bean.getLevel());
|
||||||
|
|
||||||
holder.info.setText(bean.getContent(), bean.getExpand(), new ExpandLayout.OnExpandListener() {
|
holder.info.setText(bean.getContent(), bean.getExpand(), new ExpandLayout.OnExpandListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -549,6 +549,7 @@ public class DynamicsAdapter1 extends BaseAdapter {
|
|||||||
holder.realPeopleImageView = v.findViewById(R.id.realPeopleImageView);
|
holder.realPeopleImageView = v.findViewById(R.id.realPeopleImageView);
|
||||||
holder.newPeopleImageView = v.findViewById(R.id.newPeopleImageView);
|
holder.newPeopleImageView = v.findViewById(R.id.newPeopleImageView);
|
||||||
holder.rl_dynamic_item = v.findViewById(R.id.rl_dynamic_item);
|
holder.rl_dynamic_item = v.findViewById(R.id.rl_dynamic_item);
|
||||||
|
holder.tv_dynamic_level = v.findViewById(R.id.tv_dynamic_level);
|
||||||
|
|
||||||
return holder;
|
return holder;
|
||||||
}
|
}
|
||||||
@@ -579,6 +580,7 @@ public class DynamicsAdapter1 extends BaseAdapter {
|
|||||||
ImageView realPeopleImageView;
|
ImageView realPeopleImageView;
|
||||||
ImageView newPeopleImageView;
|
ImageView newPeopleImageView;
|
||||||
RelativeLayout rl_dynamic_item;
|
RelativeLayout rl_dynamic_item;
|
||||||
|
TextView tv_dynamic_level;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ public class MainLookMeAdapter extends BaseQuickAdapter<SocialBean, BaseViewHold
|
|||||||
TextView tv_visit_number = baseViewHolder.getView(R.id.tv_visit_number);
|
TextView tv_visit_number = baseViewHolder.getView(R.id.tv_visit_number);
|
||||||
TextView tv_chat = baseViewHolder.getView(R.id.tv_chat);
|
TextView tv_chat = baseViewHolder.getView(R.id.tv_chat);
|
||||||
RelativeLayout rl_item = baseViewHolder.getView(R.id.rl_item);
|
RelativeLayout rl_item = baseViewHolder.getView(R.id.rl_item);
|
||||||
|
RelativeLayout rl_level = baseViewHolder.getView(R.id.rl_level);
|
||||||
|
ImageView iv_level = baseViewHolder.getView(R.id.iv_level);
|
||||||
|
TextView tv_level = baseViewHolder.getView(R.id.tv_level);
|
||||||
|
|
||||||
if (mType == 0) {
|
if (mType == 0) {
|
||||||
ll_visit_time.setVisibility(View.VISIBLE);
|
ll_visit_time.setVisibility(View.VISIBLE);
|
||||||
@@ -78,16 +81,67 @@ public class MainLookMeAdapter extends BaseQuickAdapter<SocialBean, BaseViewHold
|
|||||||
// redPoint.setVisibility(View.VISIBLE);
|
// redPoint.setVisibility(View.VISIBLE);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (0 == bean.getVip()) {
|
// if (0 == bean.getVip()) {
|
||||||
|
// ivMemberSign.setVisibility(View.VISIBLE);
|
||||||
|
// ivMemberSign.setImageResource(R.drawable.ic_pvip);
|
||||||
|
// } else if (1 == bean.getVip()) {
|
||||||
|
// ivMemberSign.setVisibility(View.VISIBLE);
|
||||||
|
// ivMemberSign.setImageResource(R.drawable.ic_gvip);
|
||||||
|
// } else {
|
||||||
|
// ivMemberSign.setVisibility(View.GONE);
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (bean.getVip() == 0 || bean.getVip() == 1) {
|
||||||
ivMemberSign.setVisibility(View.VISIBLE);
|
ivMemberSign.setVisibility(View.VISIBLE);
|
||||||
ivMemberSign.setImageResource(R.drawable.ic_pvip);
|
}else {
|
||||||
} else if (1 == bean.getVip()) {
|
|
||||||
ivMemberSign.setVisibility(View.VISIBLE);
|
|
||||||
ivMemberSign.setImageResource(R.drawable.ic_gvip);
|
|
||||||
} else {
|
|
||||||
ivMemberSign.setVisibility(View.GONE);
|
ivMemberSign.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int level = bean.getLevel();
|
||||||
|
tv_level.setText(level + "");
|
||||||
|
if (bean.getGender() == 1) {
|
||||||
|
if (level > 0 && level <= 15) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg1);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_1);
|
||||||
|
} else if (level > 15 && level <= 30) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg2);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_2);
|
||||||
|
} else if (level > 30 && level <= 45) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg3);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_3);
|
||||||
|
} else if (level > 45 && level <= 60) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg4);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_4);
|
||||||
|
} else if (level > 60 && level <= 75) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg5);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_5);
|
||||||
|
} else {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg6);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_6);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (level > 0 && level <= 15) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg1);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_1);
|
||||||
|
} else if (level > 15 && level <= 30) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg2);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_2);
|
||||||
|
} else if (level > 30 && level <= 45) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg3);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_3);
|
||||||
|
} else if (level > 45 && level <= 60) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg4);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_4);
|
||||||
|
} else if (level > 60 && level <= 75) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg5);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_5);
|
||||||
|
} else {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg6);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (TextUtils.isEmpty(bean.getSignature())) {
|
if (TextUtils.isEmpty(bean.getSignature())) {
|
||||||
tv_sign.setVisibility(View.INVISIBLE);
|
tv_sign.setVisibility(View.INVISIBLE);
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.xuebiping.bolizhuzi.controller.main.adapter;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
@@ -29,6 +31,8 @@ public class MainPageCommentAdapter extends BaseQuickAdapter<MainPageCommentInfo
|
|||||||
protected void convert(@NotNull BaseViewHolder baseViewHolder, MainPageCommentInfoBean bean) {
|
protected void convert(@NotNull BaseViewHolder baseViewHolder, MainPageCommentInfoBean bean) {
|
||||||
SimpleDraweeView list_photo = baseViewHolder.getView(R.id.list_photo);
|
SimpleDraweeView list_photo = baseViewHolder.getView(R.id.list_photo);
|
||||||
TextView tv_name = baseViewHolder.getView(R.id.tv_name);
|
TextView tv_name = baseViewHolder.getView(R.id.tv_name);
|
||||||
|
RelativeLayout rl_level = baseViewHolder.getView(R.id.rl_level);
|
||||||
|
ImageView iv_level = baseViewHolder.getView(R.id.iv_level);
|
||||||
TextView tv_level = baseViewHolder.getView(R.id.tv_level);
|
TextView tv_level = baseViewHolder.getView(R.id.tv_level);
|
||||||
TextView tv_comment1 = baseViewHolder.getView(R.id.tv_comment1);
|
TextView tv_comment1 = baseViewHolder.getView(R.id.tv_comment1);
|
||||||
TextView tv_comment2 = baseViewHolder.getView(R.id.tv_comment2);
|
TextView tv_comment2 = baseViewHolder.getView(R.id.tv_comment2);
|
||||||
@@ -36,19 +40,49 @@ public class MainPageCommentAdapter extends BaseQuickAdapter<MainPageCommentInfo
|
|||||||
|
|
||||||
list_photo.setImageURI(StrU.getResourcePath(bean.getAvatar(), mContext));
|
list_photo.setImageURI(StrU.getResourcePath(bean.getAvatar(), mContext));
|
||||||
tv_name.setText(bean.getNickname());
|
tv_name.setText(bean.getNickname());
|
||||||
tv_level.setText("LV." + bean.getLevel());
|
|
||||||
|
|
||||||
int level = bean.getLevel();
|
int level = bean.getLevel();
|
||||||
if (level > 0 && level <= 20) {
|
tv_level.setText(level + "");
|
||||||
tv_level.setBackgroundResource(R.drawable.shape_level_1_20_bg);
|
if (bean.getGender() == 1) {
|
||||||
} else if (level > 20 && level <= 40) {
|
if (level > 0 && level <= 15) {
|
||||||
tv_level.setBackgroundResource(R.drawable.shape_level_21_40_bg);
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg1);
|
||||||
} else if (level > 40 && level <= 60) {
|
iv_level.setImageResource(R.mipmap.ic_modle_1);
|
||||||
tv_level.setBackgroundResource(R.drawable.shape_level_41_60_bg);
|
} else if (level > 15 && level <= 30) {
|
||||||
} else if (level > 60 && level <= 80) {
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg2);
|
||||||
tv_level.setBackgroundResource(R.drawable.shape_level_61_80_bg);
|
iv_level.setImageResource(R.mipmap.ic_modle_2);
|
||||||
} else if (level > 80) {
|
} else if (level > 30 && level <= 45) {
|
||||||
tv_level.setBackgroundResource(R.drawable.shape_level_81_100_bg);
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg3);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_3);
|
||||||
|
} else if (level > 45 && level <= 60) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg4);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_4);
|
||||||
|
} else if (level > 60 && level <= 75) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg5);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_5);
|
||||||
|
} else {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg6);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_6);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (level > 0 && level <= 15) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg1);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_1);
|
||||||
|
} else if (level > 15 && level <= 30) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg2);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_2);
|
||||||
|
} else if (level > 30 && level <= 45) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg3);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_3);
|
||||||
|
} else if (level > 45 && level <= 60) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg4);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_4);
|
||||||
|
} else if (level > 60 && level <= 75) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg5);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_5);
|
||||||
|
} else {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg6);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_6);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> labels = bean.getLabels();
|
List<String> labels = bean.getLabels();
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.RelativeLayout;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.cardview.widget.CardView;
|
import androidx.cardview.widget.CardView;
|
||||||
@@ -17,13 +16,9 @@ import com.chad.library.adapter.base.viewholder.BaseViewHolder;
|
|||||||
import com.facebook.drawee.view.SimpleDraweeView;
|
import com.facebook.drawee.view.SimpleDraweeView;
|
||||||
import com.xuebiping.bolizhuzi.R;
|
import com.xuebiping.bolizhuzi.R;
|
||||||
import com.xuebiping.bolizhuzi.model.main.AnchorBean;
|
import com.xuebiping.bolizhuzi.model.main.AnchorBean;
|
||||||
import com.xuebiping.bolizhuzi.model.main.LookMeBean;
|
|
||||||
import com.xuebiping.bolizhuzi.utils.SPUtils;
|
import com.xuebiping.bolizhuzi.utils.SPUtils;
|
||||||
import com.xuebiping.bolizhuzi.utils.StrU;
|
import com.xuebiping.bolizhuzi.utils.StrU;
|
||||||
import com.xuebiping.bolizhuzi.view.main.MainPageActivity;
|
import com.xuebiping.bolizhuzi.view.main.MainPageActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.main.utils.UiUtils;
|
|
||||||
|
|
||||||
import net.lucode.hackware.magicindicator.buildins.UIUtil;
|
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.xuebiping.bolizhuzi.controller.main.adapter;
|
package com.xuebiping.bolizhuzi.controller.main.adapter;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.BaseAdapter;
|
import android.widget.BaseAdapter;
|
||||||
@@ -53,19 +54,23 @@ public class SearchAdapter extends BaseAdapter {
|
|||||||
holder = (Holder) view.getTag();
|
holder = (Holder) view.getTag();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 == bean.getVip()) {
|
// if (0 == bean.getVip()) {
|
||||||
holder.ivMemberSign.setVisibility(View.VISIBLE);
|
// holder.ivMemberSign.setVisibility(View.VISIBLE);
|
||||||
holder.ivMemberSign.setImageResource(R.drawable.ic_pvip);
|
// holder.ivMemberSign.setImageResource(R.drawable.ic_pvip);
|
||||||
} else if (1 == bean.getVip()) {
|
// } else if (1 == bean.getVip()) {
|
||||||
holder.ivMemberSign.setVisibility(View.VISIBLE);
|
// holder.ivMemberSign.setVisibility(View.VISIBLE);
|
||||||
holder.ivMemberSign.setImageResource(R.drawable.ic_gvip);
|
// holder.ivMemberSign.setImageResource(R.drawable.ic_gvip);
|
||||||
} else {
|
// } else {
|
||||||
holder.ivMemberSign.setVisibility(View.GONE);
|
// holder.ivMemberSign.setVisibility(View.GONE);
|
||||||
}
|
// }
|
||||||
|
|
||||||
holder.mPhoto.setImageURI(StrU.getResourcePath(bean.getAvatar(), mContext));
|
holder.mPhoto.setImageURI(StrU.getResourcePath(bean.getAvatar(), mContext));
|
||||||
holder.mName.setText(bean.getNickname());
|
holder.mName.setText(bean.getNickname());
|
||||||
holder.mInfo.setText(bean.getCity() + " | " + bean.getAge() + "岁");
|
// holder.mInfo.setText(bean.getCity() + " | " + bean.getAge() + "岁");
|
||||||
|
if (!TextUtils.isEmpty(bean.getSignature())) {
|
||||||
|
holder.mInfo.setText(bean.getSignature());
|
||||||
|
}
|
||||||
|
|
||||||
holder.mTime.setText(bean.getDateline());
|
holder.mTime.setText(bean.getDateline());
|
||||||
view.setTag(holder);
|
view.setTag(holder);
|
||||||
return view;
|
return view;
|
||||||
|
|||||||
@@ -1081,7 +1081,7 @@ public class MainManager {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
task.start();
|
task.start(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void evaluateVideo(BaseActivity activity,
|
public static void evaluateVideo(BaseActivity activity,
|
||||||
|
|||||||
@@ -79,13 +79,19 @@ public class ContactListAdapter extends BaseQuickAdapter<SocialBean, BaseViewHol
|
|||||||
// redPoint.setVisibility(View.VISIBLE);
|
// redPoint.setVisibility(View.VISIBLE);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (0 == bean.getVip()) {
|
// if (0 == bean.getVip()) {
|
||||||
|
// ivMemberSign.setVisibility(View.VISIBLE);
|
||||||
|
// ivMemberSign.setImageResource(R.drawable.ic_pvip);
|
||||||
|
// } else if (1 == bean.getVip()) {
|
||||||
|
// ivMemberSign.setVisibility(View.VISIBLE);
|
||||||
|
// ivMemberSign.setImageResource(R.drawable.ic_gvip);
|
||||||
|
// } else {
|
||||||
|
// ivMemberSign.setVisibility(View.GONE);
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (bean.getVip() == 0 || bean.getVip() == 1) {
|
||||||
ivMemberSign.setVisibility(View.VISIBLE);
|
ivMemberSign.setVisibility(View.VISIBLE);
|
||||||
ivMemberSign.setImageResource(R.drawable.ic_pvip);
|
}else {
|
||||||
} else if (1 == bean.getVip()) {
|
|
||||||
ivMemberSign.setVisibility(View.VISIBLE);
|
|
||||||
ivMemberSign.setImageResource(R.drawable.ic_gvip);
|
|
||||||
} else {
|
|
||||||
ivMemberSign.setVisibility(View.GONE);
|
ivMemberSign.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.xuebiping.bolizhuzi.controller.settings.adapter;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@@ -31,11 +33,70 @@ public class IntimacyAdapter extends BaseQuickAdapter<IntimacyBean, BaseViewHold
|
|||||||
SimpleDraweeView user_head = baseViewHolder.getView(R.id.user_head);
|
SimpleDraweeView user_head = baseViewHolder.getView(R.id.user_head);
|
||||||
TextView tv_nick_name = baseViewHolder.getView(R.id.tv_nick_name);
|
TextView tv_nick_name = baseViewHolder.getView(R.id.tv_nick_name);
|
||||||
TextView tv_intimacy = baseViewHolder.getView(R.id.tv_intimacy);
|
TextView tv_intimacy = baseViewHolder.getView(R.id.tv_intimacy);
|
||||||
|
RelativeLayout rl_level = baseViewHolder.getView(R.id.rl_level);
|
||||||
|
ImageView iv_level = baseViewHolder.getView(R.id.iv_level);
|
||||||
|
TextView tv_level = baseViewHolder.getView(R.id.tv_level);
|
||||||
|
LinearLayout ll_unlock = baseViewHolder.getView(R.id.ll_unlock);
|
||||||
|
TextView tv_unlock_desc = baseViewHolder.getView(R.id.tv_unlock_desc);
|
||||||
|
TextView tv_lock = baseViewHolder.getView(R.id.tv_lock);
|
||||||
|
|
||||||
user_head.setImageURI(StrU.getResourcePath(bean.getAvatar(), mContext));
|
user_head.setImageURI(StrU.getResourcePath(bean.getAvatar(), mContext));
|
||||||
tv_nick_name.setText(bean.getNickname());
|
tv_nick_name.setText(bean.getNickname());
|
||||||
tv_intimacy.setText(bean.getTotal_consume_coin() + "");
|
tv_intimacy.setText(bean.getTotal_consume_coin() + "");
|
||||||
|
|
||||||
|
int unlock_status = bean.getUnlock_status();
|
||||||
|
if (unlock_status == 1) {
|
||||||
|
ll_unlock.setVisibility(View.GONE);
|
||||||
|
tv_lock.setVisibility(View.VISIBLE);
|
||||||
|
}else {
|
||||||
|
ll_unlock.setVisibility(View.VISIBLE);
|
||||||
|
tv_unlock_desc.setText(bean.getUnlock_desc());
|
||||||
|
}
|
||||||
|
|
||||||
|
int level = bean.getLevel();
|
||||||
|
tv_level.setText(level + "");
|
||||||
|
if (bean.getGender() == 1) {
|
||||||
|
if (level > 0 && level <= 15) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg1);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_1);
|
||||||
|
} else if (level > 15 && level <= 30) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg2);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_2);
|
||||||
|
} else if (level > 30 && level <= 45) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg3);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_3);
|
||||||
|
} else if (level > 45 && level <= 60) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg4);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_4);
|
||||||
|
} else if (level > 60 && level <= 75) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg5);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_5);
|
||||||
|
} else {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg6);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_6);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (level > 0 && level <= 15) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg1);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_1);
|
||||||
|
} else if (level > 15 && level <= 30) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg2);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_2);
|
||||||
|
} else if (level > 30 && level <= 45) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg3);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_3);
|
||||||
|
} else if (level > 45 && level <= 60) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg4);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_4);
|
||||||
|
} else if (level > 60 && level <= 75) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg5);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_5);
|
||||||
|
} else {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg6);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rl_item.setOnClickListener(new View.OnClickListener() {
|
rl_item.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
|||||||
@@ -22,6 +22,15 @@ public class DynamicsItemBean implements Serializable {
|
|||||||
private List<CommentBean> list;
|
private List<CommentBean> list;
|
||||||
private List<CommentBean> likes;
|
private List<CommentBean> likes;
|
||||||
private boolean expand;
|
private boolean expand;
|
||||||
|
private int level;
|
||||||
|
|
||||||
|
public int getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(int level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
public int getMark() {
|
public int getMark() {
|
||||||
return mark;
|
return mark;
|
||||||
|
|||||||
@@ -10,6 +10,15 @@ public class MainPageCommentInfoBean {
|
|||||||
private int level;
|
private int level;
|
||||||
private int attitude;
|
private int attitude;
|
||||||
private List<String> labels;
|
private List<String> labels;
|
||||||
|
private int gender;
|
||||||
|
|
||||||
|
public int getGender() {
|
||||||
|
return gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGender(int gender) {
|
||||||
|
this.gender = gender;
|
||||||
|
}
|
||||||
|
|
||||||
public int getFrom_uid() {
|
public int getFrom_uid() {
|
||||||
return from_uid;
|
return from_uid;
|
||||||
|
|||||||
@@ -27,6 +27,15 @@ public class MainPageInfoBean {
|
|||||||
private int real_name_mark;
|
private int real_name_mark;
|
||||||
private int real_person_mark;
|
private int real_person_mark;
|
||||||
private int has_wechat;
|
private int has_wechat;
|
||||||
|
private int level;
|
||||||
|
|
||||||
|
public int getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(int level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
public int getHas_wechat() {
|
public int getHas_wechat() {
|
||||||
return has_wechat;
|
return has_wechat;
|
||||||
|
|||||||
@@ -10,6 +10,15 @@ public class SearchBean {
|
|||||||
private String city;
|
private String city;
|
||||||
private String dateline;
|
private String dateline;
|
||||||
private int vip = 2;
|
private int vip = 2;
|
||||||
|
private String signature;
|
||||||
|
|
||||||
|
public String getSignature() {
|
||||||
|
return signature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSignature(String signature) {
|
||||||
|
this.signature = signature;
|
||||||
|
}
|
||||||
|
|
||||||
public int getUserid() {
|
public int getUserid() {
|
||||||
return userid;
|
return userid;
|
||||||
|
|||||||
@@ -6,6 +6,42 @@ public class IntimacyBean {
|
|||||||
private int total_consume_coin;
|
private int total_consume_coin;
|
||||||
private String nickname;
|
private String nickname;
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
private int gender;
|
||||||
|
private int level;
|
||||||
|
private int unlock_status;
|
||||||
|
private String unlock_desc;
|
||||||
|
|
||||||
|
public String getUnlock_desc() {
|
||||||
|
return unlock_desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnlock_desc(String unlock_desc) {
|
||||||
|
this.unlock_desc = unlock_desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getUnlock_status() {
|
||||||
|
return unlock_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnlock_status(int unlock_status) {
|
||||||
|
this.unlock_status = unlock_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(int level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getGender() {
|
||||||
|
return gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGender(int gender) {
|
||||||
|
this.gender = gender;
|
||||||
|
}
|
||||||
|
|
||||||
public int getUser_id() {
|
public int getUser_id() {
|
||||||
return user_id;
|
return user_id;
|
||||||
|
|||||||
@@ -17,6 +17,15 @@ public class SocialBean {
|
|||||||
private String signature;
|
private String signature;
|
||||||
private int online_status; //0 不在线 1在线 2活跃
|
private int online_status; //0 不在线 1在线 2活跃
|
||||||
private int visit_times;
|
private int visit_times;
|
||||||
|
private int level;
|
||||||
|
|
||||||
|
public int getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(int level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
public int getUserid() {
|
public int getUserid() {
|
||||||
return userid;
|
return userid;
|
||||||
|
|||||||
@@ -44,6 +44,33 @@ public class UserInfoBean {
|
|||||||
private int user_type;
|
private int user_type;
|
||||||
private int online_status;
|
private int online_status;
|
||||||
private int do_not_disturb;
|
private int do_not_disturb;
|
||||||
|
private int level;
|
||||||
|
private int next_level_diff_wealth_value;
|
||||||
|
private int level_percent;
|
||||||
|
|
||||||
|
public int getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(int level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNext_level_diff_wealth_value() {
|
||||||
|
return next_level_diff_wealth_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNext_level_diff_wealth_value(int next_level_diff_wealth_value) {
|
||||||
|
this.next_level_diff_wealth_value = next_level_diff_wealth_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLevel_percent() {
|
||||||
|
return level_percent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel_percent(int level_percent) {
|
||||||
|
this.level_percent = level_percent;
|
||||||
|
}
|
||||||
|
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
return height;
|
return height;
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
package com.xuebiping.bolizhuzi.view.dynamics.activity;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.Typeface;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
|
import com.xuebiping.bolizhuzi.R;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.main.adapter.MainViewPagerAdapter;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.main.adapter.ScaleTransitionPagerTitleView;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.dynamics.fragment.DynamicImageTextFragment;
|
||||||
|
import com.xuebiping.bolizhuzi.view.dynamics.fragment.DynamicVideoTextFragment;
|
||||||
|
|
||||||
|
import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||||
|
import net.lucode.hackware.magicindicator.ViewPagerHelper;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.UIUtil;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
|
||||||
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.SimplePagerTitleView;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DynamicPublishActivity extends BaseActivity implements View.OnClickListener {
|
||||||
|
|
||||||
|
private MagicIndicator mMagicIndicator;
|
||||||
|
private ViewPager mMainViewPager;
|
||||||
|
|
||||||
|
private MainViewPagerAdapter mViewPagerAdapter;
|
||||||
|
private List<Fragment> mChannelFragments = new ArrayList<>();
|
||||||
|
private DynamicImageTextFragment mDynamicImageTextFragment;
|
||||||
|
private DynamicVideoTextFragment mDynamicVideoTextFragment;
|
||||||
|
private List<String> mDataList = new ArrayList<>();
|
||||||
|
private int mIndex = 0;
|
||||||
|
private RelativeLayout mLl_back;
|
||||||
|
private TextView mTv_zhunze;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_dynamic_publish);
|
||||||
|
hideTitleBar();
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
mMagicIndicator = findViewById(R.id.magic_indicator);
|
||||||
|
mMainViewPager = findViewById(R.id.main_view_pager);
|
||||||
|
mLl_back = findViewById(R.id.ll_back);
|
||||||
|
mTv_zhunze = findViewById(R.id.tv_zhunze);
|
||||||
|
|
||||||
|
mLl_back.setOnClickListener(this);
|
||||||
|
mTv_zhunze.setOnClickListener(this);
|
||||||
|
|
||||||
|
mDynamicImageTextFragment = new DynamicImageTextFragment();
|
||||||
|
mDynamicVideoTextFragment = new DynamicVideoTextFragment();
|
||||||
|
|
||||||
|
mChannelFragments.add(mDynamicImageTextFragment);
|
||||||
|
mChannelFragments.add(mDynamicVideoTextFragment);
|
||||||
|
|
||||||
|
|
||||||
|
mViewPagerAdapter = new MainViewPagerAdapter(getSupportFragmentManager(),
|
||||||
|
mChannelFragments);
|
||||||
|
mMainViewPager.setAdapter(mViewPagerAdapter);
|
||||||
|
|
||||||
|
initMagicIndicator();
|
||||||
|
|
||||||
|
mViewPagerAdapter.notifyDataSetChanged();
|
||||||
|
mMainViewPager.setCurrentItem(mIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initMagicIndicator() {
|
||||||
|
mDataList.clear();
|
||||||
|
mDataList.add("图文动态");
|
||||||
|
mDataList.add("视频动态");
|
||||||
|
|
||||||
|
CommonNavigator commonNavigator = new CommonNavigator(this);
|
||||||
|
commonNavigator.setAdapter(new CommonNavigatorAdapter() {
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return mDataList == null ? 0 : mDataList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPagerTitleView getTitleView(Context context, final int index) {
|
||||||
|
SimplePagerTitleView simplePagerTitleView = new ScaleTransitionPagerTitleView(context);
|
||||||
|
simplePagerTitleView.setText(mDataList.get(index));
|
||||||
|
simplePagerTitleView.setTextSize(20);
|
||||||
|
simplePagerTitleView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));//加粗
|
||||||
|
simplePagerTitleView.setNormalColor(Color.parseColor("#33000000"));
|
||||||
|
simplePagerTitleView.setSelectedColor(Color.parseColor("#000000"));
|
||||||
|
simplePagerTitleView.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
mMainViewPager.setCurrentItem(index);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return simplePagerTitleView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPagerIndicator getIndicator(Context context) {
|
||||||
|
LinePagerIndicator indicator = new LinePagerIndicator(context);
|
||||||
|
indicator.setColors(getResources().getColor(R.color.yellow_ffd33e));
|
||||||
|
indicator.setLineHeight(UIUtil.dip2px(context, 10));
|
||||||
|
indicator.setMode(LinePagerIndicator.MODE_WRAP_CONTENT);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mMagicIndicator.setNavigator(commonNavigator);
|
||||||
|
ViewPagerHelper.bind(mMagicIndicator, mMainViewPager);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if (view == mLl_back) {
|
||||||
|
finish();
|
||||||
|
} else if (view == mTv_zhunze) {
|
||||||
|
MaleToast.showMessage(this, "开发中");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, intent);
|
||||||
|
if (null != mDynamicImageTextFragment) {
|
||||||
|
mDynamicImageTextFragment.onActivityResult(requestCode & 0xffff, resultCode, intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null != mDynamicVideoTextFragment) {
|
||||||
|
mDynamicVideoTextFragment.onActivityResult(requestCode & 0xffff, resultCode, intent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.xuebiping.bolizhuzi.view.dynamics.activity
|
||||||
|
|
||||||
|
import android.animation.ValueAnimator
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.shuyu.gsyvideoplayer.utils.GSYVideoType
|
||||||
|
import com.xuebiping.bolizhuzi.databinding.ActivityPageVideoPlay2Binding
|
||||||
|
import com.xuebiping.bolizhuzi.im.uikit.common.Constans
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity
|
||||||
|
|
||||||
|
class PageVideoPlay2Activity : BaseActivity() {
|
||||||
|
lateinit var binding: ActivityPageVideoPlay2Binding
|
||||||
|
|
||||||
|
private var videoUrl: String? = ""
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
binding = ActivityPageVideoPlay2Binding.inflate(layoutInflater)
|
||||||
|
setContentView(binding.root)
|
||||||
|
hideTitleBar()
|
||||||
|
videoUrl = intent.getStringExtra("videoUrl")
|
||||||
|
binding.ivBack.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_FULL)
|
||||||
|
// GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_DEFAULT)
|
||||||
|
|
||||||
|
binding.videoView.setUp(
|
||||||
|
Constans.IMAGE_URL + videoUrl, true, ""
|
||||||
|
)
|
||||||
|
binding.videoView.isLooping = true
|
||||||
|
binding.videoView.startPlayLogic()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPause() {
|
||||||
|
super.onPause()
|
||||||
|
binding.videoView.onVideoPause()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onRestart() {
|
||||||
|
super.onRestart()
|
||||||
|
binding.videoView.onVideoResume()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
binding.videoView.setVideoAllCallBack(null)
|
||||||
|
binding.videoView.release()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,554 @@
|
|||||||
|
package com.xuebiping.bolizhuzi.view.dynamics.fragment;
|
||||||
|
|
||||||
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.media.ThumbnailUtils;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.provider.MediaStore;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import com.fengliyan.http.httprequest.UploadFile;
|
||||||
|
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
||||||
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
|
import com.xuebiping.bolizhuzi.R;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.constant.Constant;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.dynamics.manager.DynamicsManager;
|
||||||
|
import com.xuebiping.bolizhuzi.im.uikit.business.session.helper.VideoMessageHelper;
|
||||||
|
import com.xuebiping.bolizhuzi.model.dynamics.DynamicPostBean;
|
||||||
|
import com.xuebiping.bolizhuzi.model.dynamics.ImageUploadBean;
|
||||||
|
import com.xuebiping.bolizhuzi.model.dynamics.UploadImageBean;
|
||||||
|
import com.xuebiping.bolizhuzi.utils.camera2.BitmapUtils;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.utils.ImageUtils;
|
||||||
|
import com.xuebiping.bolizhuzi.view.dynamics.dialog.TopicListDialog;
|
||||||
|
import com.xuebiping.bolizhuzi.view.dynamics.utils.ImageLayout;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import kotlin.Unit;
|
||||||
|
import kotlin.jvm.functions.Function1;
|
||||||
|
import kotlin.jvm.functions.Function2;
|
||||||
|
|
||||||
|
public class DynamicImageTextFragment extends Fragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
public static final int MULTI_SELECTOR_REQUEST = 200;
|
||||||
|
public static final int SINGLE_SELECTOR_REQUEST = 201;
|
||||||
|
public static final int MAX_IMAGE_COUNT = 9;
|
||||||
|
private View v;
|
||||||
|
private LinearLayout mPhotoLine1;
|
||||||
|
private LinearLayout mPhotoLine2;
|
||||||
|
private LinearLayout mPhotoLine3;
|
||||||
|
private EditText mEditText;
|
||||||
|
private TextView mComplaintInputText;
|
||||||
|
private int mSingleIndex;
|
||||||
|
private ArrayList<String> mSelectPath = new ArrayList<>();
|
||||||
|
private MultiImageSelector mSelector;
|
||||||
|
private StringBuilder mImages;
|
||||||
|
private ProgressDialog progressDialog;
|
||||||
|
private boolean isVideo = false;
|
||||||
|
private VideoMessageHelper helper;
|
||||||
|
private File videoFile;
|
||||||
|
private TextWatcher mWatcher = new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
String length = mEditText.getText().length() + "/300字";
|
||||||
|
mComplaintInputText.setText(length);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable editable) {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
private RelativeLayout rl_add_topic;
|
||||||
|
private TextView tv_topic_content;
|
||||||
|
private TopicListDialog topicListDialog;
|
||||||
|
private Button mBt_publish;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@org.jetbrains.annotations.Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull @NotNull LayoutInflater inflater, @Nullable @org.jetbrains.annotations.Nullable ViewGroup container, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
|
||||||
|
v = inflater.inflate(R.layout.fragment_dynamic_image_text, container, false);
|
||||||
|
helper = new VideoMessageHelper(getActivity(), new VideoMessageHelper.VideoMessageHelperListener() {
|
||||||
|
@Override
|
||||||
|
public void onVideoPicked(File file, String md5) {
|
||||||
|
videoFile = file;
|
||||||
|
Bitmap bitmap = ThumbnailUtils.createVideoThumbnail(file.getAbsolutePath(), MediaStore.Video.Thumbnails.FULL_SCREEN_KIND);
|
||||||
|
BitmapUtils.savePicNoRotate(BitmapUtils.toByteArray(bitmap), "video_cover",
|
||||||
|
new Function2<String, String, Unit>() {
|
||||||
|
@Override
|
||||||
|
public Unit invoke(String s, String s2) {
|
||||||
|
bitmap.recycle();
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
List<String> paths = new ArrayList<>();
|
||||||
|
paths.add(s);
|
||||||
|
notifyDataSetChanged(paths);
|
||||||
|
mSelectPath.add(s);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}, new Function1<String, Unit>() {
|
||||||
|
@Override
|
||||||
|
public Unit invoke(String s) {
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
MaleToast.showMessage(getActivity(), "获取视频缩略图失败");
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
initView(v);
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView(View v) {
|
||||||
|
mPhotoLine1 = v.findViewById(R.id.dynamics_post_line_1);
|
||||||
|
mPhotoLine2 = v.findViewById(R.id.dynamics_post_line_2);
|
||||||
|
mPhotoLine3 = v.findViewById(R.id.dynamics_post_line_3);
|
||||||
|
mEditText = v.findViewById(R.id.edit_post);
|
||||||
|
rl_add_topic = v.findViewById(R.id.rl_add_topic);
|
||||||
|
tv_topic_content = v.findViewById(R.id.tv_topic_content);
|
||||||
|
mComplaintInputText = v.findViewById(R.id.edit_char_count);
|
||||||
|
mBt_publish = v.findViewById(R.id.bt_publish);
|
||||||
|
|
||||||
|
mSelector = MultiImageSelector.create().multi().count(MAX_IMAGE_COUNT);
|
||||||
|
mImages = new StringBuilder();
|
||||||
|
addPhotos(mSelectPath);
|
||||||
|
mEditText.addTextChangedListener(mWatcher);
|
||||||
|
|
||||||
|
rl_add_topic.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
//TODO 添加话题,打开话题弹窗
|
||||||
|
topicListDialog = new TopicListDialog(getActivity());
|
||||||
|
topicListDialog.show();
|
||||||
|
topicListDialog.setRightOnClickListener(new TopicListDialog.OnDialogRightClickListener() {
|
||||||
|
@Override
|
||||||
|
public void rightClick(String str) {
|
||||||
|
tv_topic_content.setText(str);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mBt_publish.setOnClickListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void notifyDataSetChanged(List<String> imagePath) {
|
||||||
|
removePhotos();
|
||||||
|
addPhotos(imagePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void removePhotos() {
|
||||||
|
mPhotoLine1.removeAllViews();
|
||||||
|
mPhotoLine2.removeAllViews();
|
||||||
|
mPhotoLine3.removeAllViews();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addPhotos(List<String> imagePath) {
|
||||||
|
Iterator<String> i = imagePath.iterator();
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
while (i.hasNext()) {
|
||||||
|
String path = i.next();
|
||||||
|
final ImageLayout image = new ImageLayout(getActivity());
|
||||||
|
setImage(path, image);
|
||||||
|
image.setPadding(6, 0, 0, 0);
|
||||||
|
image.setOnImageHandlingListener(new ImageLayout.OnImageHandlingListener() {
|
||||||
|
@Override
|
||||||
|
public void onImageClicked() {
|
||||||
|
singleReplace(image.getImageUrl());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReadyLogoClicked() {
|
||||||
|
startImageSelector();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRemoveLogoClicked() {
|
||||||
|
removeImage(image.getImageUrl());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (count < 3) {
|
||||||
|
mPhotoLine1.addView(image);
|
||||||
|
} else if (count < 6) {
|
||||||
|
mPhotoLine2.addView(image);
|
||||||
|
} else if (count < 9) {
|
||||||
|
mPhotoLine3.addView(image);
|
||||||
|
}
|
||||||
|
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isVideo) {
|
||||||
|
if (imagePath.size() == 0) {
|
||||||
|
addTail(count);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
addTail(count);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void addTail(int count) {
|
||||||
|
if (count != 9) {
|
||||||
|
ImageLayout image = new ImageLayout(getActivity());
|
||||||
|
image.setPadding(6, 0, 0, 0);
|
||||||
|
image.setOnImageHandlingListener(new ImageLayout.OnImageHandlingListener() {
|
||||||
|
@Override
|
||||||
|
public void onImageClicked() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReadyLogoClicked() {
|
||||||
|
startImageSelector();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRemoveLogoClicked() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// if (count == 0) {
|
||||||
|
// image.empty();
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (count < 3) {
|
||||||
|
mPhotoLine1.addView(image);
|
||||||
|
} else if (count < 6) {
|
||||||
|
mPhotoLine2.addView(image);
|
||||||
|
} else if (count < 9) {
|
||||||
|
mPhotoLine3.addView(image);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
if (isVideo) {
|
||||||
|
helper.onGetLocalVideoResult(data);
|
||||||
|
}
|
||||||
|
if (requestCode == MULTI_SELECTOR_REQUEST && resultCode == getActivity().RESULT_OK) {
|
||||||
|
mSelectPath.addAll(data.getStringArrayListExtra(MultiImageSelector.EXTRA_RESULT));
|
||||||
|
notifyDataSetChanged(mSelectPath);
|
||||||
|
} else if (requestCode == SINGLE_SELECTOR_REQUEST && resultCode == getActivity().RESULT_OK) {
|
||||||
|
mSelectPath.remove(mSingleIndex);
|
||||||
|
mSelectPath.add(mSingleIndex, data.
|
||||||
|
getStringArrayListExtra(MultiImageSelector.EXTRA_RESULT).get(0));
|
||||||
|
|
||||||
|
notifyDataSetChanged(mSelectPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeImage(String path) {
|
||||||
|
path = path.replace("file:", "");
|
||||||
|
mSelectPath.remove(path);
|
||||||
|
notifyDataSetChanged(mSelectPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startImageSelector() {
|
||||||
|
if (isVideo) {
|
||||||
|
helper.chooseVideoFromLocal();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mSelector.multi();
|
||||||
|
mSelector.count(9 - mSelectPath.size());
|
||||||
|
mSelector.start(this, MULTI_SELECTOR_REQUEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void singleReplace(String path) {
|
||||||
|
if (isVideo) {
|
||||||
|
helper.chooseVideoFromLocal();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
path = path.replace("file:", "");
|
||||||
|
mSingleIndex = mSelectPath.indexOf(path);
|
||||||
|
mSelector.single();
|
||||||
|
mSelector.start(this, SINGLE_SELECTOR_REQUEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setImage(String path, ImageLayout image) {
|
||||||
|
if (path != null) {
|
||||||
|
File file = new File(path);
|
||||||
|
if (null != file) {
|
||||||
|
URI uri = file.toURI();
|
||||||
|
image.imageLoad(uri.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void compressAndUpload() {
|
||||||
|
Iterator<String> i = mSelectPath.iterator();
|
||||||
|
final UploadFile[] uploadFiles = new UploadFile[mSelectPath.size()];
|
||||||
|
int count = 0;
|
||||||
|
while (i.hasNext()) {
|
||||||
|
String path = i.next();
|
||||||
|
path = ImageUtils.compressImage(getActivity(), path, Constant.IMAGE_MEMORY_SIZE, false);
|
||||||
|
File file = new File(path);
|
||||||
|
UploadFile uploadFile = new UploadFile("file[" + count + "]", file);
|
||||||
|
uploadFiles[count] = uploadFile;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null != uploadFiles) {
|
||||||
|
if (uploadFiles.length != 0) {
|
||||||
|
if (uploadFiles[0].getFile().exists()) {
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
uploadImage(uploadFiles, mEditText.getText().toString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void uploadVideo(String content, String coverUrl) {
|
||||||
|
UploadFile uploadFile = new UploadFile(System.currentTimeMillis() + ".mp4", videoFile);
|
||||||
|
UploadFile[] files = new UploadFile[]{uploadFile};
|
||||||
|
DynamicsManager.uploadImage((BaseActivity) getActivity(), files, "dynamic",
|
||||||
|
new HttpUiCallBack<List<UploadImageBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||||
|
if (result.size() > 0) {
|
||||||
|
String videoUrl = result.get(0).getUrl();
|
||||||
|
postDynamics(content, coverUrl, videoUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, "视频上传失败");
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void uploadImage(UploadFile[] uploadFiles, final String content) {
|
||||||
|
DynamicsManager.uploadImage((BaseActivity) getActivity(), uploadFiles, "dynamic",
|
||||||
|
new HttpUiCallBack<List<UploadImageBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||||
|
mImages = new StringBuilder();
|
||||||
|
Iterator<UploadImageBean> iterator = result.iterator();
|
||||||
|
int count = 0;
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
UploadImageBean bean = iterator.next();
|
||||||
|
if (0 != count) {
|
||||||
|
mImages.append(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
mImages.append(bean.getUrl());
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
if (isVideo) {
|
||||||
|
uploadVideo(content, mImages.toString());
|
||||||
|
} else {
|
||||||
|
postDynamics(content, mImages.toString(), null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, "图片上传失败");
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setImageUrl(String dynamicId, String imageUrl, String videoUrl) {
|
||||||
|
DynamicsManager.setImageUrl((BaseActivity) getActivity(), dynamicId, imageUrl, videoUrl, new HttpUiCallBack<ImageUploadBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, ImageUploadBean result, String message) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, "动态上传成功");
|
||||||
|
getActivity().setResult(getActivity().RESULT_OK);
|
||||||
|
getActivity().finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
// MaleToast.showMessage(activity, "图片上传失败");
|
||||||
|
progressDialog.dismiss();
|
||||||
|
getActivity().setResult(getActivity().RESULT_OK);
|
||||||
|
getActivity().finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void postDynamics(String content, final String images, final String videoUrl) {
|
||||||
|
DynamicsManager.postDynamics((BaseActivity) getActivity(), content, new HttpUiCallBack<DynamicPostBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, DynamicPostBean result, String message) {
|
||||||
|
if (null != images) {
|
||||||
|
setImageUrl(result.getDynamic_id(), images, videoUrl);
|
||||||
|
} else {
|
||||||
|
if (progressDialog != null) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
}
|
||||||
|
MaleToast.showMessage(activity, "动态上传成功");
|
||||||
|
getActivity().setResult(getActivity().RESULT_OK);
|
||||||
|
getActivity().finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
if (progressDialog != null) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
}
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
if (progressDialog != null) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
}
|
||||||
|
MaleToast.showMessage(activity, "动态上传失败");
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private final int MIN_DELAY_TIME = 8000; // 两次点击间隔不能少于10000ms
|
||||||
|
private long lastClickTime;
|
||||||
|
|
||||||
|
public boolean isFastClick() {
|
||||||
|
boolean flag = true;
|
||||||
|
long currentClickTime = System.currentTimeMillis();
|
||||||
|
if ((currentClickTime - lastClickTime) >= MIN_DELAY_TIME) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
lastClickTime = currentClickTime;
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if (view == mBt_publish) {
|
||||||
|
String content = mEditText.getText().toString();
|
||||||
|
if (TextUtils.isEmpty(content)) {
|
||||||
|
MaleToast.showFailureMsg(getActivity(), "请输入文字内容");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (isVideo) {
|
||||||
|
// if (videoFile == null) {
|
||||||
|
// MaleToast.showFailureMsg(DynamicPostActivity.this, "请选择视频");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
if (videoFile != null) {
|
||||||
|
mBt_publish.setEnabled(false);
|
||||||
|
progressDialog = ProgressDialog.show(getActivity(), "正在发布", "请稍后...");
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
compressAndUpload();
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if (mSelectPath.isEmpty()) {
|
||||||
|
// MaleToast.showFailureMsg(DynamicPostActivity.this, "请选择图片");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
String word = null;
|
||||||
|
if (!TextUtils.isEmpty(content)) {
|
||||||
|
word = mEditText.getText().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mSelectPath.isEmpty()) {
|
||||||
|
if (!isFastClick()) {
|
||||||
|
progressDialog = ProgressDialog.show(getActivity(), "正在发布", "请稍后...");
|
||||||
|
mBt_publish.setEnabled(false);
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
compressAndUpload();
|
||||||
|
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (null != word || TextUtils.isEmpty(word)) {
|
||||||
|
postDynamics(content, null, null);
|
||||||
|
// MaleToast.showMessage(DynamicPostActivity.this, "请选择图片");
|
||||||
|
} else {
|
||||||
|
MaleToast.showMessage(getActivity(), "请输入内容");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,554 @@
|
|||||||
|
package com.xuebiping.bolizhuzi.view.dynamics.fragment;
|
||||||
|
|
||||||
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.media.ThumbnailUtils;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.provider.MediaStore;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import com.fengliyan.http.httprequest.UploadFile;
|
||||||
|
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
||||||
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
|
import com.xuebiping.bolizhuzi.R;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.constant.Constant;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.dynamics.manager.DynamicsManager;
|
||||||
|
import com.xuebiping.bolizhuzi.im.uikit.business.session.helper.VideoMessageHelper;
|
||||||
|
import com.xuebiping.bolizhuzi.model.dynamics.DynamicPostBean;
|
||||||
|
import com.xuebiping.bolizhuzi.model.dynamics.ImageUploadBean;
|
||||||
|
import com.xuebiping.bolizhuzi.model.dynamics.UploadImageBean;
|
||||||
|
import com.xuebiping.bolizhuzi.utils.camera2.BitmapUtils;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.utils.ImageUtils;
|
||||||
|
import com.xuebiping.bolizhuzi.view.dynamics.dialog.TopicListDialog;
|
||||||
|
import com.xuebiping.bolizhuzi.view.dynamics.utils.ImageLayout;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import kotlin.Unit;
|
||||||
|
import kotlin.jvm.functions.Function1;
|
||||||
|
import kotlin.jvm.functions.Function2;
|
||||||
|
|
||||||
|
public class DynamicVideoTextFragment extends Fragment implements View.OnClickListener{
|
||||||
|
|
||||||
|
public static final int MULTI_SELECTOR_REQUEST = 200;
|
||||||
|
public static final int SINGLE_SELECTOR_REQUEST = 201;
|
||||||
|
public static final int MAX_IMAGE_COUNT = 9;
|
||||||
|
private View v;
|
||||||
|
private LinearLayout mPhotoLine1;
|
||||||
|
private LinearLayout mPhotoLine2;
|
||||||
|
private LinearLayout mPhotoLine3;
|
||||||
|
private EditText mEditText;
|
||||||
|
private TextView mComplaintInputText;
|
||||||
|
private int mSingleIndex;
|
||||||
|
private ArrayList<String> mSelectPath = new ArrayList<>();
|
||||||
|
private MultiImageSelector mSelector;
|
||||||
|
private StringBuilder mImages;
|
||||||
|
private ProgressDialog progressDialog;
|
||||||
|
private boolean isVideo = true;
|
||||||
|
private VideoMessageHelper helper;
|
||||||
|
private File videoFile;
|
||||||
|
private TextWatcher mWatcher = new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
String length = mEditText.getText().length() + "/300字";
|
||||||
|
mComplaintInputText.setText(length);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable editable) {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
private RelativeLayout rl_add_topic;
|
||||||
|
private TextView tv_topic_content;
|
||||||
|
private TopicListDialog topicListDialog;
|
||||||
|
private Button mBt_publish;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@org.jetbrains.annotations.Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(@NonNull @NotNull LayoutInflater inflater, @Nullable @org.jetbrains.annotations.Nullable ViewGroup container, @Nullable @org.jetbrains.annotations.Nullable Bundle savedInstanceState) {
|
||||||
|
v = inflater.inflate(R.layout.fragment_dynamic_video_text, container, false);
|
||||||
|
helper = new VideoMessageHelper(getActivity(), new VideoMessageHelper.VideoMessageHelperListener() {
|
||||||
|
@Override
|
||||||
|
public void onVideoPicked(File file, String md5) {
|
||||||
|
videoFile = file;
|
||||||
|
Bitmap bitmap = ThumbnailUtils.createVideoThumbnail(file.getAbsolutePath(), MediaStore.Video.Thumbnails.FULL_SCREEN_KIND);
|
||||||
|
BitmapUtils.savePicNoRotate(BitmapUtils.toByteArray(bitmap), "video_cover",
|
||||||
|
new Function2<String, String, Unit>() {
|
||||||
|
@Override
|
||||||
|
public Unit invoke(String s, String s2) {
|
||||||
|
bitmap.recycle();
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
List<String> paths = new ArrayList<>();
|
||||||
|
paths.add(s);
|
||||||
|
notifyDataSetChanged(paths);
|
||||||
|
mSelectPath.add(s);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}, new Function1<String, Unit>() {
|
||||||
|
@Override
|
||||||
|
public Unit invoke(String s) {
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
MaleToast.showMessage(getActivity(), "获取视频缩略图失败");
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
initView(v);
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView(View v) {
|
||||||
|
mPhotoLine1 = v.findViewById(R.id.dynamics_post_line_1);
|
||||||
|
mPhotoLine2 = v.findViewById(R.id.dynamics_post_line_2);
|
||||||
|
mPhotoLine3 = v.findViewById(R.id.dynamics_post_line_3);
|
||||||
|
mEditText = v.findViewById(R.id.edit_post);
|
||||||
|
rl_add_topic = v.findViewById(R.id.rl_add_topic);
|
||||||
|
tv_topic_content = v.findViewById(R.id.tv_topic_content);
|
||||||
|
mComplaintInputText = v.findViewById(R.id.edit_char_count);
|
||||||
|
mBt_publish = v.findViewById(R.id.bt_publish);
|
||||||
|
|
||||||
|
mSelector = MultiImageSelector.create().multi().count(MAX_IMAGE_COUNT);
|
||||||
|
mImages = new StringBuilder();
|
||||||
|
addPhotos(mSelectPath);
|
||||||
|
mEditText.addTextChangedListener(mWatcher);
|
||||||
|
|
||||||
|
rl_add_topic.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
//TODO 添加话题,打开话题弹窗
|
||||||
|
topicListDialog = new TopicListDialog(getActivity());
|
||||||
|
topicListDialog.show();
|
||||||
|
topicListDialog.setRightOnClickListener(new TopicListDialog.OnDialogRightClickListener() {
|
||||||
|
@Override
|
||||||
|
public void rightClick(String str) {
|
||||||
|
tv_topic_content.setText(str);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mBt_publish.setOnClickListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void notifyDataSetChanged(List<String> imagePath) {
|
||||||
|
removePhotos();
|
||||||
|
addPhotos(imagePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void removePhotos() {
|
||||||
|
mPhotoLine1.removeAllViews();
|
||||||
|
mPhotoLine2.removeAllViews();
|
||||||
|
mPhotoLine3.removeAllViews();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addPhotos(List<String> imagePath) {
|
||||||
|
Iterator<String> i = imagePath.iterator();
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
while (i.hasNext()) {
|
||||||
|
String path = i.next();
|
||||||
|
final ImageLayout image = new ImageLayout(getActivity());
|
||||||
|
setImage(path, image);
|
||||||
|
image.setPadding(6, 0, 0, 0);
|
||||||
|
image.setOnImageHandlingListener(new ImageLayout.OnImageHandlingListener() {
|
||||||
|
@Override
|
||||||
|
public void onImageClicked() {
|
||||||
|
singleReplace(image.getImageUrl());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReadyLogoClicked() {
|
||||||
|
startImageSelector();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRemoveLogoClicked() {
|
||||||
|
removeImage(image.getImageUrl());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (count < 3) {
|
||||||
|
mPhotoLine1.addView(image);
|
||||||
|
} else if (count < 6) {
|
||||||
|
mPhotoLine2.addView(image);
|
||||||
|
} else if (count < 9) {
|
||||||
|
mPhotoLine3.addView(image);
|
||||||
|
}
|
||||||
|
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isVideo) {
|
||||||
|
if (imagePath.size() == 0) {
|
||||||
|
addTail(count);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
addTail(count);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void addTail(int count) {
|
||||||
|
if (count != 9) {
|
||||||
|
ImageLayout image = new ImageLayout(getActivity());
|
||||||
|
image.setPadding(6, 0, 0, 0);
|
||||||
|
image.setOnImageHandlingListener(new ImageLayout.OnImageHandlingListener() {
|
||||||
|
@Override
|
||||||
|
public void onImageClicked() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onReadyLogoClicked() {
|
||||||
|
startImageSelector();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRemoveLogoClicked() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// if (count == 0) {
|
||||||
|
// image.empty();
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (count < 3) {
|
||||||
|
mPhotoLine1.addView(image);
|
||||||
|
} else if (count < 6) {
|
||||||
|
mPhotoLine2.addView(image);
|
||||||
|
} else if (count < 9) {
|
||||||
|
mPhotoLine3.addView(image);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
if (isVideo) {
|
||||||
|
helper.onGetLocalVideoResult(data);
|
||||||
|
}
|
||||||
|
if (requestCode == MULTI_SELECTOR_REQUEST && resultCode == getActivity().RESULT_OK) {
|
||||||
|
mSelectPath.addAll(data.getStringArrayListExtra(MultiImageSelector.EXTRA_RESULT));
|
||||||
|
notifyDataSetChanged(mSelectPath);
|
||||||
|
} else if (requestCode == SINGLE_SELECTOR_REQUEST && resultCode == getActivity().RESULT_OK) {
|
||||||
|
mSelectPath.remove(mSingleIndex);
|
||||||
|
mSelectPath.add(mSingleIndex, data.
|
||||||
|
getStringArrayListExtra(MultiImageSelector.EXTRA_RESULT).get(0));
|
||||||
|
|
||||||
|
notifyDataSetChanged(mSelectPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeImage(String path) {
|
||||||
|
path = path.replace("file:", "");
|
||||||
|
mSelectPath.remove(path);
|
||||||
|
notifyDataSetChanged(mSelectPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startImageSelector() {
|
||||||
|
if (isVideo) {
|
||||||
|
helper.chooseVideoFromLocal();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mSelector.multi();
|
||||||
|
mSelector.count(9 - mSelectPath.size());
|
||||||
|
mSelector.start(this, MULTI_SELECTOR_REQUEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void singleReplace(String path) {
|
||||||
|
if (isVideo) {
|
||||||
|
helper.chooseVideoFromLocal();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
path = path.replace("file:", "");
|
||||||
|
mSingleIndex = mSelectPath.indexOf(path);
|
||||||
|
mSelector.single();
|
||||||
|
mSelector.start(this, SINGLE_SELECTOR_REQUEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setImage(String path, ImageLayout image) {
|
||||||
|
if (path != null) {
|
||||||
|
File file = new File(path);
|
||||||
|
if (null != file) {
|
||||||
|
URI uri = file.toURI();
|
||||||
|
image.imageLoad(uri.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void compressAndUpload() {
|
||||||
|
Iterator<String> i = mSelectPath.iterator();
|
||||||
|
final UploadFile[] uploadFiles = new UploadFile[mSelectPath.size()];
|
||||||
|
int count = 0;
|
||||||
|
while (i.hasNext()) {
|
||||||
|
String path = i.next();
|
||||||
|
path = ImageUtils.compressImage(getActivity(), path, Constant.IMAGE_MEMORY_SIZE, false);
|
||||||
|
File file = new File(path);
|
||||||
|
UploadFile uploadFile = new UploadFile("file[" + count + "]", file);
|
||||||
|
uploadFiles[count] = uploadFile;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null != uploadFiles) {
|
||||||
|
if (uploadFiles.length != 0) {
|
||||||
|
if (uploadFiles[0].getFile().exists()) {
|
||||||
|
getActivity().runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
uploadImage(uploadFiles, mEditText.getText().toString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void uploadVideo(String content, String coverUrl) {
|
||||||
|
UploadFile uploadFile = new UploadFile(System.currentTimeMillis() + ".mp4", videoFile);
|
||||||
|
UploadFile[] files = new UploadFile[]{uploadFile};
|
||||||
|
DynamicsManager.uploadImage((BaseActivity) getActivity(), files, "dynamic",
|
||||||
|
new HttpUiCallBack<List<UploadImageBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||||
|
if (result.size() > 0) {
|
||||||
|
String videoUrl = result.get(0).getUrl();
|
||||||
|
postDynamics(content, coverUrl, videoUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, "视频上传失败");
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void uploadImage(UploadFile[] uploadFiles, final String content) {
|
||||||
|
DynamicsManager.uploadImage((BaseActivity) getActivity(), uploadFiles, "dynamic",
|
||||||
|
new HttpUiCallBack<List<UploadImageBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||||
|
mImages = new StringBuilder();
|
||||||
|
Iterator<UploadImageBean> iterator = result.iterator();
|
||||||
|
int count = 0;
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
UploadImageBean bean = iterator.next();
|
||||||
|
if (0 != count) {
|
||||||
|
mImages.append(",");
|
||||||
|
}
|
||||||
|
|
||||||
|
mImages.append(bean.getUrl());
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
if (isVideo) {
|
||||||
|
uploadVideo(content, mImages.toString());
|
||||||
|
} else {
|
||||||
|
postDynamics(content, mImages.toString(), null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, "图片上传失败");
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setImageUrl(String dynamicId, String imageUrl, String videoUrl) {
|
||||||
|
DynamicsManager.setImageUrl((BaseActivity) getActivity(), dynamicId, imageUrl, videoUrl, new HttpUiCallBack<ImageUploadBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, ImageUploadBean result, String message) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, "动态上传成功");
|
||||||
|
getActivity().setResult(getActivity().RESULT_OK);
|
||||||
|
getActivity().finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
// MaleToast.showMessage(activity, "图片上传失败");
|
||||||
|
progressDialog.dismiss();
|
||||||
|
getActivity().setResult(getActivity().RESULT_OK);
|
||||||
|
getActivity().finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void postDynamics(String content, final String images, final String videoUrl) {
|
||||||
|
DynamicsManager.postDynamics((BaseActivity) getActivity(), content, new HttpUiCallBack<DynamicPostBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, DynamicPostBean result, String message) {
|
||||||
|
if (null != images) {
|
||||||
|
setImageUrl(result.getDynamic_id(), images, videoUrl);
|
||||||
|
} else {
|
||||||
|
if (progressDialog != null) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
}
|
||||||
|
MaleToast.showMessage(activity, "动态上传成功");
|
||||||
|
getActivity().setResult(getActivity().RESULT_OK);
|
||||||
|
getActivity().finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
if (progressDialog != null) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
}
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
if (progressDialog != null) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
}
|
||||||
|
MaleToast.showMessage(activity, "动态上传失败");
|
||||||
|
mBt_publish.setEnabled(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private final int MIN_DELAY_TIME = 8000; // 两次点击间隔不能少于10000ms
|
||||||
|
private long lastClickTime;
|
||||||
|
|
||||||
|
public boolean isFastClick() {
|
||||||
|
boolean flag = true;
|
||||||
|
long currentClickTime = System.currentTimeMillis();
|
||||||
|
if ((currentClickTime - lastClickTime) >= MIN_DELAY_TIME) {
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
lastClickTime = currentClickTime;
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if (view == mBt_publish) {
|
||||||
|
String content = mEditText.getText().toString();
|
||||||
|
if (TextUtils.isEmpty(content)) {
|
||||||
|
MaleToast.showFailureMsg(getActivity(), "请输入文字内容");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (isVideo) {
|
||||||
|
// if (videoFile == null) {
|
||||||
|
// MaleToast.showFailureMsg(DynamicPostActivity.this, "请选择视频");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
if (videoFile != null) {
|
||||||
|
mBt_publish.setEnabled(false);
|
||||||
|
progressDialog = ProgressDialog.show(getActivity(), "正在发布", "请稍后...");
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
compressAndUpload();
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if (mSelectPath.isEmpty()) {
|
||||||
|
// MaleToast.showFailureMsg(DynamicPostActivity.this, "请选择图片");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
String word = null;
|
||||||
|
if (!TextUtils.isEmpty(content)) {
|
||||||
|
word = mEditText.getText().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mSelectPath.isEmpty()) {
|
||||||
|
if (!isFastClick()) {
|
||||||
|
progressDialog = ProgressDialog.show(getActivity(), "正在发布", "请稍后...");
|
||||||
|
mBt_publish.setEnabled(false);
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
compressAndUpload();
|
||||||
|
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (null != word || TextUtils.isEmpty(word)) {
|
||||||
|
postDynamics(content, null, null);
|
||||||
|
// MaleToast.showMessage(DynamicPostActivity.this, "请选择图片");
|
||||||
|
} else {
|
||||||
|
MaleToast.showMessage(getActivity(), "请输入内容");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
@@ -18,8 +19,13 @@ import com.fengliyan.base.base.AnyCallback;
|
|||||||
import com.xuebiping.bolizhuzi.R;
|
import com.xuebiping.bolizhuzi.R;
|
||||||
import com.xuebiping.bolizhuzi.controller.main.adapter.MainViewPagerAdapter;
|
import com.xuebiping.bolizhuzi.controller.main.adapter.MainViewPagerAdapter;
|
||||||
import com.xuebiping.bolizhuzi.controller.main.adapter.ScaleTransitionPagerTitleView;
|
import com.xuebiping.bolizhuzi.controller.main.adapter.ScaleTransitionPagerTitleView;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
|
||||||
|
import com.xuebiping.bolizhuzi.model.settings.UserHomeBean;
|
||||||
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||||
import com.xuebiping.bolizhuzi.view.dynamics.activity.DynamicPostActivity;
|
import com.xuebiping.bolizhuzi.view.dynamics.activity.DynamicPostActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.dynamics.activity.DynamicPublishActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.main.MainActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.main.SearchActivity;
|
import com.xuebiping.bolizhuzi.view.main.SearchActivity;
|
||||||
|
|
||||||
import net.lucode.hackware.magicindicator.MagicIndicator;
|
import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||||
@@ -51,12 +57,15 @@ public class DynamicViewPager2Fragment extends Fragment implements View.OnClickL
|
|||||||
private RecentDynamicFragment mRecent;
|
private RecentDynamicFragment mRecent;
|
||||||
private FollowUsersDynamicFragment mFocusFragment;
|
private FollowUsersDynamicFragment mFocusFragment;
|
||||||
private ImageView mAddFeedBtn;
|
private ImageView mAddFeedBtn;
|
||||||
|
private RelativeLayout mRl_wurao;
|
||||||
|
private TextView mTv_set_wurao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
View v = inflater.inflate(R.layout.fragment_dynamic_view_pager2, container, false);
|
View v = inflater.inflate(R.layout.fragment_dynamic_view_pager2, container, false);
|
||||||
initView(v);
|
initView(v);
|
||||||
|
geDisturb();
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,6 +82,8 @@ public class DynamicViewPager2Fragment extends Fragment implements View.OnClickL
|
|||||||
mDynamicViewPager = v.findViewById(R.id.dynamic_view_pager);
|
mDynamicViewPager = v.findViewById(R.id.dynamic_view_pager);
|
||||||
mRl_home_search = v.findViewById(R.id.rl_home_search);
|
mRl_home_search = v.findViewById(R.id.rl_home_search);
|
||||||
mAddFeedBtn = v.findViewById(R.id.addFeedBtn);
|
mAddFeedBtn = v.findViewById(R.id.addFeedBtn);
|
||||||
|
mRl_wurao = v.findViewById(R.id.rl_wurao);
|
||||||
|
mTv_set_wurao = v.findViewById(R.id.tv_set_wurao);
|
||||||
|
|
||||||
mRecent = new RecentDynamicFragment();
|
mRecent = new RecentDynamicFragment();
|
||||||
mFocusFragment = new FollowUsersDynamicFragment();
|
mFocusFragment = new FollowUsersDynamicFragment();
|
||||||
@@ -110,6 +121,7 @@ public class DynamicViewPager2Fragment extends Fragment implements View.OnClickL
|
|||||||
|
|
||||||
mAddFeedBtn.setOnClickListener(this);
|
mAddFeedBtn.setOnClickListener(this);
|
||||||
mRl_home_search.setOnClickListener(this);
|
mRl_home_search.setOnClickListener(this);
|
||||||
|
mTv_set_wurao.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initMagicIndicator() {
|
private void initMagicIndicator() {
|
||||||
@@ -176,16 +188,19 @@ public class DynamicViewPager2Fragment extends Fragment implements View.OnClickL
|
|||||||
}
|
}
|
||||||
|
|
||||||
void chooseFeedType() {
|
void chooseFeedType() {
|
||||||
ChooseFeedTypeDialog dialog = new ChooseFeedTypeDialog(getActivity());
|
// ChooseFeedTypeDialog dialog = new ChooseFeedTypeDialog(getActivity());
|
||||||
dialog.setCallback(new AnyCallback<ChooseFeedTypeDialog.FeedType>() {
|
// dialog.setCallback(new AnyCallback<ChooseFeedTypeDialog.FeedType>() {
|
||||||
@Override
|
// @Override
|
||||||
public void callback(ChooseFeedTypeDialog.FeedType feedType) {
|
// public void callback(ChooseFeedTypeDialog.FeedType feedType) {
|
||||||
Intent intent = new Intent(getActivity(), DynamicPostActivity.class);
|
// Intent intent = new Intent(getActivity(), DynamicPostActivity.class);
|
||||||
intent.putExtra("isVideo", feedType == ChooseFeedTypeDialog.FeedType.Video);
|
// intent.putExtra("isVideo", feedType == ChooseFeedTypeDialog.FeedType.Video);
|
||||||
getActivity().startActivityForResult(intent, REQUEST_POST);
|
// getActivity().startActivityForResult(intent, REQUEST_POST);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
dialog.show();
|
// dialog.show();
|
||||||
|
|
||||||
|
Intent intent = new Intent(getActivity(), DynamicPublishActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -194,8 +209,50 @@ public class DynamicViewPager2Fragment extends Fragment implements View.OnClickL
|
|||||||
if (view == mRl_home_search) {
|
if (view == mRl_home_search) {
|
||||||
Intent intent = new Intent(getActivity(), SearchActivity.class);
|
Intent intent = new Intent(getActivity(), SearchActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}else if (view == mAddFeedBtn) {
|
} else if (view == mAddFeedBtn) {
|
||||||
chooseFeedType();
|
chooseFeedType();
|
||||||
|
} else if (view == mTv_set_wurao) {
|
||||||
|
if (null != getActivity()) {
|
||||||
|
MainActivity mainActivity = (MainActivity) getActivity();
|
||||||
|
if (null != mainActivity) {
|
||||||
|
mainActivity.setMainGOSettingFragment();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void geDisturb() {
|
||||||
|
SettingManager.getHomeUser((BaseActivity) getActivity(), new HttpUiCallBack<UserHomeBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, UserHomeBean result, String message) {
|
||||||
|
int do_not_disturb = result.getUserinfo().getDo_not_disturb();
|
||||||
|
if (do_not_disturb == 1) {
|
||||||
|
mRl_wurao.setVisibility(View.VISIBLE);
|
||||||
|
}else {
|
||||||
|
mRl_wurao.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getDisturb2(int do_not_disturb) {
|
||||||
|
if (null != mRl_wurao) {
|
||||||
|
if (do_not_disturb == 1) {
|
||||||
|
mRl_wurao.setVisibility(View.VISIBLE);
|
||||||
|
}else {
|
||||||
|
mRl_wurao.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,9 +329,9 @@ public class FollowUsersDynamicFragment extends Fragment {
|
|||||||
|
|
||||||
mImageList.addAll(result.getList());
|
mImageList.addAll(result.getList());
|
||||||
|
|
||||||
if (mImageList.size() != 0 && mImageList.size() % 10 != 0) { //显示尾布局
|
// if (mImageList.size() != 0 && mImageList.size() % 10 != 0) { //显示尾布局
|
||||||
mListView.onNoDataLoaded();
|
// mListView.onNoDataLoaded();
|
||||||
}
|
// }
|
||||||
mAdapter.notifyDataSetChanged();
|
mAdapter.notifyDataSetChanged();
|
||||||
if (page == 1) {
|
if (page == 1) {
|
||||||
mListView.setSelection(0);
|
mListView.setSelection(0);
|
||||||
|
|||||||
@@ -44,6 +44,16 @@ import com.bumptech.glide.Glide;
|
|||||||
import com.bumptech.glide.request.target.SimpleTarget;
|
import com.bumptech.glide.request.target.SimpleTarget;
|
||||||
import com.bumptech.glide.request.transition.Transition;
|
import com.bumptech.glide.request.transition.Transition;
|
||||||
import com.facebook.drawee.view.SimpleDraweeView;
|
import com.facebook.drawee.view.SimpleDraweeView;
|
||||||
|
import com.fengliyan.device.DeviceManager;
|
||||||
|
import com.fengliyan.http.httprequest.HttpCallback;
|
||||||
|
import com.fengliyan.location.LocationManager;
|
||||||
|
import com.fengliyan.messaging.ChatManager;
|
||||||
|
import com.fengliyan.messaging.CustomAttachment;
|
||||||
|
import com.fengliyan.messaging.GiftAttachment;
|
||||||
|
import com.fengliyan.storage.StorageManager;
|
||||||
|
import com.fengliyan.uikit.bottomtab.BottomTab;
|
||||||
|
import com.fengliyan.uikit.dialog.BaseMessageDialog;
|
||||||
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.internal.LinkedTreeMap;
|
import com.google.gson.internal.LinkedTreeMap;
|
||||||
import com.hjq.permissions.OnPermissionCallback;
|
import com.hjq.permissions.OnPermissionCallback;
|
||||||
@@ -51,12 +61,23 @@ import com.hjq.permissions.XXPermissions;
|
|||||||
import com.huawei.agconnect.config.AGConnectServicesConfig;
|
import com.huawei.agconnect.config.AGConnectServicesConfig;
|
||||||
import com.huawei.hms.aaid.HmsInstanceId;
|
import com.huawei.hms.aaid.HmsInstanceId;
|
||||||
import com.huawei.hms.common.ApiException;
|
import com.huawei.hms.common.ApiException;
|
||||||
import com.fengliyan.device.DeviceManager;
|
import com.netease.nimlib.sdk.NIMClient;
|
||||||
import com.fengliyan.http.httprequest.HttpCallback;
|
import com.netease.nimlib.sdk.RequestCallback;
|
||||||
import com.fengliyan.location.LocationManager;
|
import com.netease.nimlib.sdk.RequestCallbackWrapper;
|
||||||
import com.fengliyan.messaging.ChatManager;
|
import com.netease.nimlib.sdk.auth.AuthService;
|
||||||
import com.fengliyan.messaging.CustomAttachment;
|
import com.netease.nimlib.sdk.msg.MsgService;
|
||||||
import com.fengliyan.messaging.GiftAttachment;
|
import com.netease.nimlib.sdk.msg.MsgServiceObserve;
|
||||||
|
import com.netease.nimlib.sdk.msg.attachment.MsgAttachment;
|
||||||
|
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
|
||||||
|
import com.netease.nimlib.sdk.msg.model.IMMessage;
|
||||||
|
import com.netease.nimlib.sdk.msg.model.RecentContact;
|
||||||
|
import com.netease.nimlib.sdk.uinfo.UserService;
|
||||||
|
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
|
||||||
|
import com.snail.antifake.deviceid.emulator.EmuCheckUtil;
|
||||||
|
import com.snail.antifake.jni.EmulatorDetectUtil;
|
||||||
|
import com.umeng.socialize.UMAuthListener;
|
||||||
|
import com.umeng.socialize.bean.SHARE_MEDIA;
|
||||||
|
import com.xinlingwu.share.ShareManager;
|
||||||
import com.xuebiping.bolizhuzi.R;
|
import com.xuebiping.bolizhuzi.R;
|
||||||
import com.xuebiping.bolizhuzi.agora.utils.ToastUtil;
|
import com.xuebiping.bolizhuzi.agora.utils.ToastUtil;
|
||||||
import com.xuebiping.bolizhuzi.controller.constant.ConsUser;
|
import com.xuebiping.bolizhuzi.controller.constant.ConsUser;
|
||||||
@@ -70,6 +91,7 @@ import com.xuebiping.bolizhuzi.controller.eventBus.TurntableEvent;
|
|||||||
import com.xuebiping.bolizhuzi.controller.eventBus.UnReadCountEvent;
|
import com.xuebiping.bolizhuzi.controller.eventBus.UnReadCountEvent;
|
||||||
import com.xuebiping.bolizhuzi.controller.main.manager.GlobalManager;
|
import com.xuebiping.bolizhuzi.controller.main.manager.GlobalManager;
|
||||||
import com.xuebiping.bolizhuzi.controller.main.manager.MainManager;
|
import com.xuebiping.bolizhuzi.controller.main.manager.MainManager;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
|
||||||
import com.xuebiping.bolizhuzi.controller.user.manager.UserManager;
|
import com.xuebiping.bolizhuzi.controller.user.manager.UserManager;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.api.NimUIKit;
|
import com.xuebiping.bolizhuzi.im.uikit.api.NimUIKit;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.business.session.activity.P2PMessageActivity;
|
import com.xuebiping.bolizhuzi.im.uikit.business.session.activity.P2PMessageActivity;
|
||||||
@@ -85,9 +107,11 @@ import com.xuebiping.bolizhuzi.model.main.DialogAdBean;
|
|||||||
import com.xuebiping.bolizhuzi.model.main.FreeVideoBean;
|
import com.xuebiping.bolizhuzi.model.main.FreeVideoBean;
|
||||||
import com.xuebiping.bolizhuzi.model.main.GlobalConfigBean;
|
import com.xuebiping.bolizhuzi.model.main.GlobalConfigBean;
|
||||||
import com.xuebiping.bolizhuzi.model.main.IsKidModelBean;
|
import com.xuebiping.bolizhuzi.model.main.IsKidModelBean;
|
||||||
|
import com.xuebiping.bolizhuzi.model.main.MainPageAnchorBean;
|
||||||
import com.xuebiping.bolizhuzi.model.main.SpeedInfoBean;
|
import com.xuebiping.bolizhuzi.model.main.SpeedInfoBean;
|
||||||
import com.xuebiping.bolizhuzi.model.main.SystemVersionBean;
|
import com.xuebiping.bolizhuzi.model.main.SystemVersionBean;
|
||||||
import com.xuebiping.bolizhuzi.model.main.VideoRequestBean;
|
import com.xuebiping.bolizhuzi.model.main.VideoRequestBean;
|
||||||
|
import com.xuebiping.bolizhuzi.model.settings.UserHomeBean;
|
||||||
import com.xuebiping.bolizhuzi.model.user.bean.BaseUserInfo;
|
import com.xuebiping.bolizhuzi.model.user.bean.BaseUserInfo;
|
||||||
import com.xuebiping.bolizhuzi.utils.CitySPUtils;
|
import com.xuebiping.bolizhuzi.utils.CitySPUtils;
|
||||||
import com.xuebiping.bolizhuzi.utils.DemoHelper;
|
import com.xuebiping.bolizhuzi.utils.DemoHelper;
|
||||||
@@ -109,12 +133,12 @@ import com.xuebiping.bolizhuzi.view.base.utils.view.AttentionDialog;
|
|||||||
import com.xuebiping.bolizhuzi.view.base.utils.view.KidDialog;
|
import com.xuebiping.bolizhuzi.view.base.utils.view.KidDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.base.utils.view.KidOpenDialog;
|
import com.xuebiping.bolizhuzi.view.base.utils.view.KidOpenDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.dynamics.fragment.DynamicViewPager2Fragment;
|
import com.xuebiping.bolizhuzi.view.dynamics.fragment.DynamicViewPager2Fragment;
|
||||||
import com.xuebiping.bolizhuzi.view.dynamics.fragment.DynamicViewPagerFragment;
|
|
||||||
import com.xuebiping.bolizhuzi.view.login.LoginActivity;
|
import com.xuebiping.bolizhuzi.view.login.LoginActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.login.utils.LoginUtils;
|
import com.xuebiping.bolizhuzi.view.login.utils.LoginUtils;
|
||||||
import com.xuebiping.bolizhuzi.view.luck.LuckFragment;
|
import com.xuebiping.bolizhuzi.view.luck.LuckFragment;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.CustomAlertDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.CustomAlertDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.FreeVideoDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.FreeVideoDialog;
|
||||||
|
import com.xuebiping.bolizhuzi.view.main.dialog.OpenDisturbDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.PermissionDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.PermissionDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.UpdateDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.UpdateDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.main.receiver.NotificationClickReceiver;
|
import com.xuebiping.bolizhuzi.view.main.receiver.NotificationClickReceiver;
|
||||||
@@ -124,31 +148,9 @@ import com.xuebiping.bolizhuzi.view.news.fragment.MainMessageFragment;
|
|||||||
import com.xuebiping.bolizhuzi.view.news.im.DemoCache;
|
import com.xuebiping.bolizhuzi.view.news.im.DemoCache;
|
||||||
import com.xuebiping.bolizhuzi.view.settings.BindPhoneConfirmActivity;
|
import com.xuebiping.bolizhuzi.view.settings.BindPhoneConfirmActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.settings.QuickRechargeActivity;
|
import com.xuebiping.bolizhuzi.view.settings.QuickRechargeActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.settings.SettingFragment;
|
|
||||||
import com.xuebiping.bolizhuzi.view.settings.SettingFragment2;
|
import com.xuebiping.bolizhuzi.view.settings.SettingFragment2;
|
||||||
import com.xuebiping.bolizhuzi.view.settings.dialog.GirlAuthDialog;
|
import com.xuebiping.bolizhuzi.view.settings.dialog.GirlAuthDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.settings.dialog.SpeedCallDialog;
|
import com.xuebiping.bolizhuzi.view.settings.dialog.SpeedCallDialog;
|
||||||
import com.fengliyan.storage.StorageManager;
|
|
||||||
import com.fengliyan.uikit.bottomtab.BottomTab;
|
|
||||||
import com.fengliyan.uikit.dialog.BaseMessageDialog;
|
|
||||||
import com.fengliyan.uikit.toast.MaleToast;
|
|
||||||
import com.netease.nimlib.sdk.NIMClient;
|
|
||||||
import com.netease.nimlib.sdk.RequestCallback;
|
|
||||||
import com.netease.nimlib.sdk.RequestCallbackWrapper;
|
|
||||||
import com.netease.nimlib.sdk.auth.AuthService;
|
|
||||||
import com.netease.nimlib.sdk.msg.MsgService;
|
|
||||||
import com.netease.nimlib.sdk.msg.MsgServiceObserve;
|
|
||||||
import com.netease.nimlib.sdk.msg.attachment.MsgAttachment;
|
|
||||||
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
|
|
||||||
import com.netease.nimlib.sdk.msg.model.IMMessage;
|
|
||||||
import com.netease.nimlib.sdk.msg.model.RecentContact;
|
|
||||||
import com.netease.nimlib.sdk.uinfo.UserService;
|
|
||||||
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
|
|
||||||
import com.snail.antifake.deviceid.emulator.EmuCheckUtil;
|
|
||||||
import com.snail.antifake.jni.EmulatorDetectUtil;
|
|
||||||
import com.umeng.socialize.UMAuthListener;
|
|
||||||
import com.umeng.socialize.bean.SHARE_MEDIA;
|
|
||||||
import com.xinlingwu.share.ShareManager;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -435,7 +437,7 @@ public class MainActivity extends BaseActivity implements DemoHelper.AppIdsUpdat
|
|||||||
queryCities();
|
queryCities();
|
||||||
getGlobalConfig();
|
getGlobalConfig();
|
||||||
activeUpdate();
|
activeUpdate();
|
||||||
getKidModel(0);
|
// getKidModel(0);
|
||||||
|
|
||||||
int unreadNum = NIMClient.getService(MsgService.class).getTotalUnreadCount();
|
int unreadNum = NIMClient.getService(MsgService.class).getTotalUnreadCount();
|
||||||
//消息tab显示最近未读联系人头像
|
//消息tab显示最近未读联系人头像
|
||||||
@@ -485,6 +487,8 @@ public class MainActivity extends BaseActivity implements DemoHelper.AppIdsUpdat
|
|||||||
|
|
||||||
NIMClient.getService(MsgServiceObserve.class).observeReceiveMessage(incomingMessageObserver, true);
|
NIMClient.getService(MsgServiceObserve.class).observeReceiveMessage(incomingMessageObserver, true);
|
||||||
// freeAnchor();
|
// freeAnchor();
|
||||||
|
geMainDisturb();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
com.netease.nimlib.sdk.Observer<List<IMMessage>> incomingMessageObserver = new com.netease.nimlib.sdk.Observer<List<IMMessage>>() {
|
com.netease.nimlib.sdk.Observer<List<IMMessage>> incomingMessageObserver = new com.netease.nimlib.sdk.Observer<List<IMMessage>>() {
|
||||||
@@ -1759,6 +1763,64 @@ public class MainActivity extends BaseActivity implements DemoHelper.AppIdsUpdat
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private OpenDisturbDialog mOpenDisturbDialog;
|
||||||
|
|
||||||
|
public void geMainDisturb() {
|
||||||
|
SettingManager.getHomeUser(this, new HttpUiCallBack<UserHomeBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, UserHomeBean result, String message) {
|
||||||
|
int do_not_disturb = result.getUserinfo().getDo_not_disturb();
|
||||||
|
if (do_not_disturb == 1) {
|
||||||
|
if (mOpenDisturbDialog != null) {
|
||||||
|
mOpenDisturbDialog.dismiss();
|
||||||
|
mOpenDisturbDialog = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
mOpenDisturbDialog = new OpenDisturbDialog(MainActivity.this, R.style.SelectiveDialog);
|
||||||
|
mOpenDisturbDialog.setOnFinishDisturbListener(new OpenDisturbDialog.OnFinishDisturbListener() {
|
||||||
|
@Override
|
||||||
|
public void onFinishDisturb() {
|
||||||
|
changeVideoStatus2();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mOpenDisturbDialog.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void changeVideoStatus2() {
|
||||||
|
MainManager.changeVideoStatus2(this, 0, new HttpUiCallBack<MainPageAnchorBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, MainPageAnchorBean result, String message) {
|
||||||
|
MaleToast.showMessage(activity, "勿扰模式关闭成功");
|
||||||
|
mOpenDisturbDialog.dismiss();
|
||||||
|
getMainDisturb(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
MaleToast.showMessage(activity, "请重试");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onIdsValid(String ids) {
|
public void onIdsValid(String ids) {
|
||||||
try {
|
try {
|
||||||
@@ -1769,6 +1831,22 @@ public class MainActivity extends BaseActivity implements DemoHelper.AppIdsUpdat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void getMainDisturb(int do_not_disturb) {
|
||||||
|
if (null != mMainRecommendFragment) {
|
||||||
|
mMainRecommendFragment.getDisturb2(do_not_disturb);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null != mDynamicViewPagerFragment) {
|
||||||
|
mDynamicViewPagerFragment.getDisturb2(do_not_disturb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMainGOSettingFragment() {
|
||||||
|
if (null != mBottomTab) {
|
||||||
|
mBottomTab.change(4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 速配相关
|
// 速配相关
|
||||||
@Override
|
@Override
|
||||||
public void onMessageListener(int code, String method, String data, String message) {
|
public void onMessageListener(int code, String method, String data, String message) {
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ import android.text.TextUtils;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.AbsListView;
|
import android.widget.AbsListView;
|
||||||
|
|
||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
|
||||||
|
|
||||||
import com.fengliyan.uikit.dialog.BottomGiftDialog;
|
import com.fengliyan.uikit.dialog.BottomGiftDialog;
|
||||||
|
import com.fengliyan.uikit.dialog.BottomSelectiveDialog;
|
||||||
import com.fengliyan.uikit.dialog.DialogGiftBean;
|
import com.fengliyan.uikit.dialog.DialogGiftBean;
|
||||||
import com.fengliyan.uikit.dialog.GiftListBean;
|
import com.fengliyan.uikit.dialog.GiftListBean;
|
||||||
|
import com.fengliyan.uikit.refresh.LoadMoreListView;
|
||||||
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
import com.xuebiping.bolizhuzi.R;
|
import com.xuebiping.bolizhuzi.R;
|
||||||
import com.xuebiping.bolizhuzi.controller.dynamics.adapter.DynamicsAdapter;
|
|
||||||
import com.xuebiping.bolizhuzi.controller.dynamics.adapter.DynamicsAdapter1;
|
import com.xuebiping.bolizhuzi.controller.dynamics.adapter.DynamicsAdapter1;
|
||||||
import com.xuebiping.bolizhuzi.controller.dynamics.manager.DynamicsManager;
|
import com.xuebiping.bolizhuzi.controller.dynamics.manager.DynamicsManager;
|
||||||
import com.xuebiping.bolizhuzi.controller.eventBus.DynamicEvent;
|
import com.xuebiping.bolizhuzi.controller.eventBus.DynamicEvent;
|
||||||
@@ -23,10 +23,6 @@ import com.xuebiping.bolizhuzi.model.dynamics.DynamicsListBean;
|
|||||||
import com.xuebiping.bolizhuzi.model.main.FollowResultBean;
|
import com.xuebiping.bolizhuzi.model.main.FollowResultBean;
|
||||||
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||||
import com.xuebiping.bolizhuzi.view.base.utils.view.HangUpDialog;
|
|
||||||
import com.fengliyan.uikit.dialog.BottomSelectiveDialog;
|
|
||||||
import com.fengliyan.uikit.refresh.LoadMoreListView;
|
|
||||||
import com.fengliyan.uikit.toast.MaleToast;
|
|
||||||
import com.xuebiping.bolizhuzi.view.dynamics.activity.DynamicDetailActivity;
|
import com.xuebiping.bolizhuzi.view.dynamics.activity.DynamicDetailActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.settings.CaibeiRechargeActivity;
|
import com.xuebiping.bolizhuzi.view.settings.CaibeiRechargeActivity;
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import com.fengliyan.device.DeviceManager;
|
|||||||
import com.fengliyan.messaging.ChatManager;
|
import com.fengliyan.messaging.ChatManager;
|
||||||
import com.fengliyan.messaging.EventBusGiftMessage;
|
import com.fengliyan.messaging.EventBusGiftMessage;
|
||||||
import com.luck.picture.lib.utils.ToastUtils;
|
import com.luck.picture.lib.utils.ToastUtils;
|
||||||
|
import com.shuyu.gsyvideoplayer.utils.GSYVideoType;
|
||||||
import com.xuebiping.bolizhuzi.R;
|
import com.xuebiping.bolizhuzi.R;
|
||||||
import com.xuebiping.bolizhuzi.controller.constant.ConsUser;
|
import com.xuebiping.bolizhuzi.controller.constant.ConsUser;
|
||||||
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
|
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
|
||||||
@@ -73,10 +74,13 @@ import com.xuebiping.bolizhuzi.view.base.utils.view.OtherGuardDialog;
|
|||||||
import com.xuebiping.bolizhuzi.view.base.utils.view.WechatDialog;
|
import com.xuebiping.bolizhuzi.view.base.utils.view.WechatDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.diooto.Diooto;
|
import com.xuebiping.bolizhuzi.view.diooto.Diooto;
|
||||||
import com.xuebiping.bolizhuzi.view.diooto.config.DiootoConfig;
|
import com.xuebiping.bolizhuzi.view.diooto.config.DiootoConfig;
|
||||||
|
import com.xuebiping.bolizhuzi.view.dynamics.activity.PageVideoPlay2Activity;
|
||||||
import com.xuebiping.bolizhuzi.view.dynamics.activity.PageVideoPlayActivity;
|
import com.xuebiping.bolizhuzi.view.dynamics.activity.PageVideoPlayActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.dynamics.activity.QYPreviewVideoActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.ConfirmWXAccountDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.ConfirmWXAccountDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.LookWechatDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.LookWechatDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.MainShareDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.MainShareDialog;
|
||||||
|
import com.xuebiping.bolizhuzi.view.main.ui.EmptyControlVideo;
|
||||||
import com.xuebiping.bolizhuzi.view.main.utils.DefaultExoConfig;
|
import com.xuebiping.bolizhuzi.view.main.utils.DefaultExoConfig;
|
||||||
import com.xuebiping.bolizhuzi.view.news.fragment.NewFragment;
|
import com.xuebiping.bolizhuzi.view.news.fragment.NewFragment;
|
||||||
import com.xuebiping.bolizhuzi.view.settings.InfoEditActivity;
|
import com.xuebiping.bolizhuzi.view.settings.InfoEditActivity;
|
||||||
@@ -148,7 +152,7 @@ public class MainPageFragment extends Fragment implements View.OnClickListener {
|
|||||||
private TextView copyBtn;
|
private TextView copyBtn;
|
||||||
|
|
||||||
private ImageView tagVipImageView;
|
private ImageView tagVipImageView;
|
||||||
private ImageView tagSVipImageView;
|
// private ImageView tagSVipImageView;
|
||||||
private ImageView tagNewImageView;
|
private ImageView tagNewImageView;
|
||||||
private ImageView tagRealImageView;
|
private ImageView tagRealImageView;
|
||||||
private ImageView tagPhoneImageView;
|
private ImageView tagPhoneImageView;
|
||||||
@@ -454,7 +458,7 @@ public class MainPageFragment extends Fragment implements View.OnClickListener {
|
|||||||
mSvGuardImages[3] = v.findViewById(R.id.personal_main_page_guard_photo_4);
|
mSvGuardImages[3] = v.findViewById(R.id.personal_main_page_guard_photo_4);
|
||||||
|
|
||||||
tagVipImageView = v.findViewById(R.id.tagVipImageView);
|
tagVipImageView = v.findViewById(R.id.tagVipImageView);
|
||||||
tagSVipImageView = v.findViewById(R.id.tagSVipImageView);
|
// tagSVipImageView = v.findViewById(R.id.tagSVipImageView);
|
||||||
tagNewImageView = v.findViewById(R.id.tagNewImageView);
|
tagNewImageView = v.findViewById(R.id.tagNewImageView);
|
||||||
tagRealImageView = v.findViewById(R.id.tagRealImageView);
|
tagRealImageView = v.findViewById(R.id.tagRealImageView);
|
||||||
tagPhoneImageView = v.findViewById(R.id.tagPhoneImageView);
|
tagPhoneImageView = v.findViewById(R.id.tagPhoneImageView);
|
||||||
@@ -489,9 +493,9 @@ public class MainPageFragment extends Fragment implements View.OnClickListener {
|
|||||||
tv_code.setText("ID:" + mMainPageBean.getInfo().getUsercode());
|
tv_code.setText("ID:" + mMainPageBean.getInfo().getUsercode());
|
||||||
sv_er.setImageURI(StrU.getResourcePath(mMainPageBean.getQrcode(), getActivity()));
|
sv_er.setImageURI(StrU.getResourcePath(mMainPageBean.getQrcode(), getActivity()));
|
||||||
|
|
||||||
iv_video_call.setImageAssetsFolder("images/");
|
// iv_video_call.setImageAssetsFolder("images/");
|
||||||
iv_video_call.setAnimation("video_call_btn.json");
|
// iv_video_call.setAnimation("video_call_btn.json");
|
||||||
iv_video_call.playAnimation();
|
// iv_video_call.playAnimation();
|
||||||
|
|
||||||
RelativeLayout rl_comment = v.findViewById(R.id.rl_comment);
|
RelativeLayout rl_comment = v.findViewById(R.id.rl_comment);
|
||||||
mLl_comment_title = v.findViewById(R.id.ll_comment_title);
|
mLl_comment_title = v.findViewById(R.id.ll_comment_title);
|
||||||
@@ -500,6 +504,10 @@ public class MainPageFragment extends Fragment implements View.OnClickListener {
|
|||||||
TextView tv_dislike_count = v.findViewById(R.id.tv_dislike_count);
|
TextView tv_dislike_count = v.findViewById(R.id.tv_dislike_count);
|
||||||
RecyclerView rv_main_info_comment = v.findViewById(R.id.rv_main_info_comment);
|
RecyclerView rv_main_info_comment = v.findViewById(R.id.rv_main_info_comment);
|
||||||
|
|
||||||
|
RelativeLayout rl_level = v.findViewById(R.id.rl_level);
|
||||||
|
ImageView iv_level = v.findViewById(R.id.iv_level);
|
||||||
|
TextView tv_level = v.findViewById(R.id.tv_level);
|
||||||
|
|
||||||
mBack.setOnClickListener(this);
|
mBack.setOnClickListener(this);
|
||||||
mFocusButton.setOnClickListener(this);
|
mFocusButton.setOnClickListener(this);
|
||||||
mGiftLayout.setOnClickListener(this);
|
mGiftLayout.setOnClickListener(this);
|
||||||
@@ -509,7 +517,7 @@ public class MainPageFragment extends Fragment implements View.OnClickListener {
|
|||||||
mOtherPhoto.setOnClickListener(this);
|
mOtherPhoto.setOnClickListener(this);
|
||||||
mGuardLayout.setOnClickListener(this);
|
mGuardLayout.setOnClickListener(this);
|
||||||
view_end.setOnClickListener(this);
|
view_end.setOnClickListener(this);
|
||||||
iv_video_call.setOnClickListener(this);
|
// iv_video_call.setOnClickListener(this);
|
||||||
personal_player.setOnClickListener(this);
|
personal_player.setOnClickListener(this);
|
||||||
cv_video.setOnClickListener(this);
|
cv_video.setOnClickListener(this);
|
||||||
mIv_look_wechat.setOnClickListener(this);
|
mIv_look_wechat.setOnClickListener(this);
|
||||||
@@ -519,6 +527,50 @@ public class MainPageFragment extends Fragment implements View.OnClickListener {
|
|||||||
mLl_real_person_auto.setOnClickListener(this);
|
mLl_real_person_auto.setOnClickListener(this);
|
||||||
mLl_comment_title.setOnClickListener(this);
|
mLl_comment_title.setOnClickListener(this);
|
||||||
|
|
||||||
|
int level = mMainPageBean.getInfo().getLevel();
|
||||||
|
tv_level.setText(level + "");
|
||||||
|
if (mMainPageBean.getInfo().getGender() == 1) {
|
||||||
|
if (level > 0 && level <= 15) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg1);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_1);
|
||||||
|
} else if (level > 15 && level <= 30) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg2);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_2);
|
||||||
|
} else if (level > 30 && level <= 45) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg3);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_3);
|
||||||
|
} else if (level > 45 && level <= 60) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg4);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_4);
|
||||||
|
} else if (level > 60 && level <= 75) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg5);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_5);
|
||||||
|
} else {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg6);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_6);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (level > 0 && level <= 15) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg1);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_1);
|
||||||
|
} else if (level > 15 && level <= 30) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg2);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_2);
|
||||||
|
} else if (level > 30 && level <= 45) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg3);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_3);
|
||||||
|
} else if (level > 45 && level <= 60) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg4);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_4);
|
||||||
|
} else if (level > 60 && level <= 75) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg5);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_5);
|
||||||
|
} else {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg6);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mMainPageBean.getComment() == null) {
|
if (mMainPageBean.getComment() == null) {
|
||||||
rl_comment.setVisibility(View.GONE);
|
rl_comment.setVisibility(View.GONE);
|
||||||
}else {
|
}else {
|
||||||
@@ -555,7 +607,7 @@ public class MainPageFragment extends Fragment implements View.OnClickListener {
|
|||||||
if (player.getAudioComponent() != null) {
|
if (player.getAudioComponent() != null) {
|
||||||
player.getAudioComponent().setVolume(0);
|
player.getAudioComponent().setVolume(0);
|
||||||
}
|
}
|
||||||
player.setRepeatMode(Player.REPEAT_MODE_OFF);
|
player.setRepeatMode(Player.REPEAT_MODE_ONE);
|
||||||
personal_player.setPlayer(player);
|
personal_player.setPlayer(player);
|
||||||
player.setMediaSource(new DefaultExoConfig(getActivity()).createMediaSource(Uri.parse(StrU.getResourcePath(videoUrl, getActivity()))));
|
player.setMediaSource(new DefaultExoConfig(getActivity()).createMediaSource(Uri.parse(StrU.getResourcePath(videoUrl, getActivity()))));
|
||||||
player.prepare();
|
player.prepare();
|
||||||
@@ -566,8 +618,8 @@ public class MainPageFragment extends Fragment implements View.OnClickListener {
|
|||||||
public void onPlaybackStateChanged(int state) {
|
public void onPlaybackStateChanged(int state) {
|
||||||
Player.EventListener.super.onPlaybackStateChanged(state);
|
Player.EventListener.super.onPlaybackStateChanged(state);
|
||||||
if (state == Player.STATE_ENDED) {
|
if (state == Player.STATE_ENDED) {
|
||||||
view_end.setVisibility(View.VISIBLE);
|
// view_end.setVisibility(View.VISIBLE);
|
||||||
iv_video_call.setVisibility(View.VISIBLE);
|
// iv_video_call.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -575,11 +627,16 @@ public class MainPageFragment extends Fragment implements View.OnClickListener {
|
|||||||
|
|
||||||
|
|
||||||
//男用户不显示真人
|
//男用户不显示真人
|
||||||
if (0 == mMainPageBean.getInfo().getVip()) {
|
// if (0 == mMainPageBean.getInfo().getVip()) {
|
||||||
|
// tagVipImageView.setVisibility(View.VISIBLE);
|
||||||
|
// } else if (1 == mMainPageBean.getInfo().getVip()) {
|
||||||
|
// tagSVipImageView.setVisibility(View.VISIBLE);
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (mMainPageBean.getInfo().getVip() == 0 || mMainPageBean.getInfo().getVip() == 1) {
|
||||||
tagVipImageView.setVisibility(View.VISIBLE);
|
tagVipImageView.setVisibility(View.VISIBLE);
|
||||||
} else if (1 == mMainPageBean.getInfo().getVip()) {
|
|
||||||
tagSVipImageView.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mMainPageBean.getInfo().getGender() == 1) {
|
if (mMainPageBean.getInfo().getGender() == 1) {
|
||||||
tagRealImageView.setVisibility(View.VISIBLE);
|
tagRealImageView.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
@@ -1220,13 +1277,22 @@ public class MainPageFragment extends Fragment implements View.OnClickListener {
|
|||||||
} else if (view == iv_video_call || view == view_end) {
|
} else if (view == iv_video_call || view == view_end) {
|
||||||
getCallInfo(0);
|
getCallInfo(0);
|
||||||
} else if (view == personal_player || view == cv_video) {
|
} else if (view == personal_player || view == cv_video) {
|
||||||
Intent intent = new Intent(getActivity(), PageVideoPlayActivity.class);
|
// Intent intent = new Intent(getActivity(), PageVideoPlayActivity.class);
|
||||||
intent.putExtra("userId", mMainPageBean.getInfo().getUserId());
|
// intent.putExtra("userId", mMainPageBean.getInfo().getUserId());
|
||||||
|
// intent.putExtra("videoUrl", mMainPageBean.getVideo_url());
|
||||||
|
// intent.putExtra("age", mMainPageBean.getInfo().getAge());
|
||||||
|
// intent.putExtra("nickname", mMainPageBean.getInfo().getNickname());
|
||||||
|
// intent.putExtra("avatar_url", mMainPageBean.getInfo().getAvatar());
|
||||||
|
// intent.putExtra("is_follow", mMainPageBean.getInfo().getIs_follow());
|
||||||
|
// startActivity(intent);
|
||||||
|
|
||||||
|
// Intent intent = new Intent(getActivity(), QYPreviewVideoActivity.class);
|
||||||
|
// intent.putExtra("videoUrl", StrU.getResourcePath(mMainPageBean.getVideo_url(), getActivity()));
|
||||||
|
// startActivity(intent);
|
||||||
|
|
||||||
|
Intent intent = new Intent(getActivity(), PageVideoPlay2Activity.class);
|
||||||
intent.putExtra("videoUrl", mMainPageBean.getVideo_url());
|
intent.putExtra("videoUrl", mMainPageBean.getVideo_url());
|
||||||
intent.putExtra("age", mMainPageBean.getInfo().getAge());
|
// intent.putExtra("videoUrl", "http://www.w3school.com.cn/i/movie.mp4");
|
||||||
intent.putExtra("nickname", mMainPageBean.getInfo().getNickname());
|
|
||||||
intent.putExtra("avatar_url", mMainPageBean.getInfo().getAvatar());
|
|
||||||
intent.putExtra("is_follow", mMainPageBean.getInfo().getIs_follow());
|
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
} else if (view == mIv_look_wechat) {
|
} else if (view == mIv_look_wechat) {
|
||||||
if (mMainPageBean.getInfo().getHas_wechat() == 1) {
|
if (mMainPageBean.getInfo().getHas_wechat() == 1) {
|
||||||
|
|||||||
@@ -16,19 +16,33 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
import com.blankj.utilcode.util.GsonUtils;
|
||||||
|
import com.fengliyan.http.httprequest.HttpCallback;
|
||||||
import com.fengliyan.uikit.UiUtils;
|
import com.fengliyan.uikit.UiUtils;
|
||||||
import com.fengliyan.uikit.toast.MaleToast;
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
import com.xuebiping.bolizhuzi.R;
|
import com.xuebiping.bolizhuzi.R;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.constant.ConsUser;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
|
||||||
import com.xuebiping.bolizhuzi.controller.constant.Constant;
|
import com.xuebiping.bolizhuzi.controller.constant.Constant;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.eventBus.RegisterInfoEvent;
|
||||||
import com.xuebiping.bolizhuzi.controller.main.adapter.MainViewPagerAdapter;
|
import com.xuebiping.bolizhuzi.controller.main.adapter.MainViewPagerAdapter;
|
||||||
import com.xuebiping.bolizhuzi.controller.main.adapter.ScaleTransitionPagerTitleView;
|
import com.xuebiping.bolizhuzi.controller.main.adapter.ScaleTransitionPagerTitleView;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.main.manager.MainManager;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.settings.adapter.constant.SettingOptions;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
|
||||||
import com.xuebiping.bolizhuzi.controller.user.manager.UserManager;
|
import com.xuebiping.bolizhuzi.controller.user.manager.UserManager;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.ToastHelper;
|
import com.xuebiping.bolizhuzi.im.uikit.common.ToastHelper;
|
||||||
|
import com.xuebiping.bolizhuzi.model.settings.UserFrameBean;
|
||||||
|
import com.xuebiping.bolizhuzi.model.settings.UserHomeBean;
|
||||||
import com.xuebiping.bolizhuzi.utils.NoClearSPUtils;
|
import com.xuebiping.bolizhuzi.utils.NoClearSPUtils;
|
||||||
|
import com.xuebiping.bolizhuzi.utils.SPUtils;
|
||||||
|
import com.xuebiping.bolizhuzi.utils.StrU;
|
||||||
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.ShaiXuanDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.ShaiXuanDialog;
|
||||||
|
|
||||||
import net.lucode.hackware.magicindicator.MagicIndicator;
|
import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||||
@@ -42,9 +56,12 @@ import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.Li
|
|||||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.CommonPagerTitleView;
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.CommonPagerTitleView;
|
||||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.SimplePagerTitleView;
|
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.SimplePagerTitleView;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import de.greenrobot.event.EventBus;
|
||||||
|
|
||||||
public class MainRecommend2Fragment extends Fragment implements View.OnClickListener {
|
public class MainRecommend2Fragment extends Fragment implements View.OnClickListener {
|
||||||
|
|
||||||
private View v;
|
private View v;
|
||||||
@@ -66,12 +83,15 @@ public class MainRecommend2Fragment extends Fragment implements View.OnClickList
|
|||||||
private MainFiveStarFragment mFiveStarFragment;
|
private MainFiveStarFragment mFiveStarFragment;
|
||||||
private MainFourStarFragment mFourStarFragment;
|
private MainFourStarFragment mFourStarFragment;
|
||||||
private MainThreeStarFragment mThreeStarFragment;
|
private MainThreeStarFragment mThreeStarFragment;
|
||||||
|
private RelativeLayout mRl_wurao;
|
||||||
|
private TextView mTv_set_wurao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
v = inflater.inflate(R.layout.fragment_main_recommend2, container, false);
|
v = inflater.inflate(R.layout.fragment_main_recommend2, container, false);
|
||||||
initView(v);
|
initView(v);
|
||||||
|
geDisturb();
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,10 +109,13 @@ public class MainRecommend2Fragment extends Fragment implements View.OnClickList
|
|||||||
mRl_home_change = v.findViewById(R.id.rl_home_change);
|
mRl_home_change = v.findViewById(R.id.rl_home_change);
|
||||||
mMagicIndicator = v.findViewById(R.id.magic_indicator);
|
mMagicIndicator = v.findViewById(R.id.magic_indicator);
|
||||||
mMainViewPager = v.findViewById(R.id.main_view_pager);
|
mMainViewPager = v.findViewById(R.id.main_view_pager);
|
||||||
|
mRl_wurao = v.findViewById(R.id.rl_wurao);
|
||||||
|
mTv_set_wurao = v.findViewById(R.id.tv_set_wurao);
|
||||||
|
|
||||||
mLl_select.setOnClickListener(this);
|
mLl_select.setOnClickListener(this);
|
||||||
mRl_home_search.setOnClickListener(this);
|
mRl_home_search.setOnClickListener(this);
|
||||||
mRl_home_change.setOnClickListener(this);
|
mRl_home_change.setOnClickListener(this);
|
||||||
|
mTv_set_wurao.setOnClickListener(this);
|
||||||
|
|
||||||
mLookMeFragment = new LookMeFragment();
|
mLookMeFragment = new LookMeFragment();
|
||||||
mRecommendFragment = new RecommendFragment2();
|
mRecommendFragment = new RecommendFragment2();
|
||||||
@@ -283,7 +306,7 @@ public class MainRecommend2Fragment extends Fragment implements View.OnClickList
|
|||||||
if (view == mRl_home_search) {
|
if (view == mRl_home_search) {
|
||||||
Intent intent = new Intent(getActivity(), SearchActivity.class);
|
Intent intent = new Intent(getActivity(), SearchActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}else if (view == mLl_select) {
|
} else if (view == mLl_select) {
|
||||||
|
|
||||||
ShaiXuanDialog shaiXuanDialog = new ShaiXuanDialog(getActivity());
|
ShaiXuanDialog shaiXuanDialog = new ShaiXuanDialog(getActivity());
|
||||||
shaiXuanDialog.show();
|
shaiXuanDialog.show();
|
||||||
@@ -293,11 +316,53 @@ public class MainRecommend2Fragment extends Fragment implements View.OnClickList
|
|||||||
NoClearSPUtils.saveInt(getActivity(), UserManager.getUserInfo().getUser_id() + Constant.FRIEND_SELECT, isSelect);
|
NoClearSPUtils.saveInt(getActivity(), UserManager.getUserInfo().getUser_id() + Constant.FRIEND_SELECT, isSelect);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else if (view == mRl_home_change) {
|
} else if (view == mRl_home_change) {
|
||||||
if (mRecommendFragment != null && mVoiceFragment != null) {
|
if (mRecommendFragment != null && mVoiceFragment != null) {
|
||||||
mRecommendFragment.layoutChange();
|
mRecommendFragment.layoutChange();
|
||||||
mVoiceFragment.layoutChange();
|
mVoiceFragment.layoutChange();
|
||||||
}
|
}
|
||||||
|
} else if (view == mTv_set_wurao) {
|
||||||
|
if (null != getActivity()) {
|
||||||
|
MainActivity mainActivity = (MainActivity) getActivity();
|
||||||
|
if (null != mainActivity) {
|
||||||
|
mainActivity.setMainGOSettingFragment();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void geDisturb() {
|
||||||
|
SettingManager.getHomeUser((BaseActivity) getActivity(), new HttpUiCallBack<UserHomeBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, UserHomeBean result, String message) {
|
||||||
|
int do_not_disturb = result.getUserinfo().getDo_not_disturb();
|
||||||
|
if (do_not_disturb == 1) {
|
||||||
|
mRl_wurao.setVisibility(View.VISIBLE);
|
||||||
|
}else {
|
||||||
|
mRl_wurao.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getDisturb2(int do_not_disturb) {
|
||||||
|
if (null != mRl_wurao) {
|
||||||
|
if (do_not_disturb == 1) {
|
||||||
|
mRl_wurao.setVisibility(View.VISIBLE);
|
||||||
|
}else {
|
||||||
|
mRl_wurao.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.xuebiping.bolizhuzi.view.main.dialog;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.xuebiping.bolizhuzi.R;
|
||||||
|
|
||||||
|
public class OpenDisturbDialog extends Dialog implements View.OnClickListener {
|
||||||
|
|
||||||
|
private Context mContext;
|
||||||
|
private RelativeLayout mRl_close;
|
||||||
|
private Button mBt_finish_disturb;
|
||||||
|
|
||||||
|
public OpenDisturbDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OpenDisturbDialog(@NonNull Context context, int themeResId) {
|
||||||
|
super(context, themeResId);
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected OpenDisturbDialog(@NonNull Context context, boolean cancelable, @Nullable OnCancelListener cancelListener) {
|
||||||
|
super(context, cancelable, cancelListener);
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
setContentView(R.layout.dialog_open_disturb);
|
||||||
|
|
||||||
|
Window window = this.getWindow();
|
||||||
|
window.setGravity(Gravity.CENTER);
|
||||||
|
WindowManager.LayoutParams params = window.getAttributes();
|
||||||
|
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||||
|
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||||
|
// window.setWindowAnimations(R.style.share_animation);
|
||||||
|
window.setAttributes(params);
|
||||||
|
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
mRl_close = findViewById(R.id.rl_close);
|
||||||
|
mBt_finish_disturb = findViewById(R.id.bt_finish_disturb);
|
||||||
|
|
||||||
|
mRl_close.setOnClickListener(this);
|
||||||
|
mBt_finish_disturb.setOnClickListener(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if (view == mRl_close) {
|
||||||
|
dismiss();
|
||||||
|
} else if (view == mBt_finish_disturb) {
|
||||||
|
if (null != mOnFinishDisturbListener) {
|
||||||
|
mOnFinishDisturbListener.onFinishDisturb();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private OnFinishDisturbListener mOnFinishDisturbListener;
|
||||||
|
|
||||||
|
public interface OnFinishDisturbListener {
|
||||||
|
void onFinishDisturb();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnFinishDisturbListener(OnFinishDisturbListener onFinishDisturbListener) {
|
||||||
|
mOnFinishDisturbListener = onFinishDisturbListener;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -88,7 +88,7 @@ public class ShaiXuanDialog extends Dialog implements View.OnClickListener {
|
|||||||
|
|
||||||
ll_nm_video_call = findViewById(R.id.ll_nm_video_call);
|
ll_nm_video_call = findViewById(R.id.ll_nm_video_call);
|
||||||
|
|
||||||
findViewById(R.id.iv_close).setOnClickListener(new View.OnClickListener() {
|
findViewById(R.id.rl_close).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
dismiss();
|
dismiss();
|
||||||
|
|||||||
@@ -2,13 +2,15 @@ package com.xuebiping.bolizhuzi.view.main.ui;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
|
||||||
import com.xuebiping.bolizhuzi.R;
|
|
||||||
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
|
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
|
||||||
|
import com.xuebiping.bolizhuzi.R;
|
||||||
|
|
||||||
public class EmptyControlVideo extends StandardGSYVideoPlayer {
|
public class EmptyControlVideo extends StandardGSYVideoPlayer {
|
||||||
|
|
||||||
|
|
||||||
public EmptyControlVideo(Context context, Boolean fullFlag) {
|
public EmptyControlVideo(Context context, Boolean fullFlag) {
|
||||||
super(context, fullFlag);
|
super(context, fullFlag);
|
||||||
}
|
}
|
||||||
@@ -37,6 +39,7 @@ public class EmptyControlVideo extends StandardGSYVideoPlayer {
|
|||||||
|
|
||||||
//不给触摸亮度,如果需要,屏蔽下方代码即可
|
//不给触摸亮度,如果需要,屏蔽下方代码即可
|
||||||
mBrightness = false;
|
mBrightness = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -194,11 +194,11 @@ public class GeneralMemberFragment extends Fragment implements View.OnClickListe
|
|||||||
tv_member_open.setText("立即开通");
|
tv_member_open.setText("立即开通");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
|
// if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
|
||||||
lin_member_bottom_btn.setVisibility(View.GONE);
|
// lin_member_bottom_btn.setVisibility(View.GONE);
|
||||||
tv_member_open.setVisibility(View.VISIBLE);
|
// tv_member_open.setVisibility(View.VISIBLE);
|
||||||
tv_member_open.setText("邀请好友开通");
|
// tv_member_open.setText("邀请好友开通");
|
||||||
}
|
// }
|
||||||
|
|
||||||
List<MemberInfoList> list = result.getInfo().getList();
|
List<MemberInfoList> list = result.getInfo().getList();
|
||||||
if (list != null && list.size() > 0) {
|
if (list != null && list.size() > 0) {
|
||||||
@@ -338,22 +338,34 @@ public class GeneralMemberFragment extends Fragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
showPay(goodsId);
|
showPay(goodsId);
|
||||||
} else if (v == tv_member_open) {
|
} else if (v == tv_member_open) {
|
||||||
if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
|
// if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
|
||||||
Intent intent = new Intent(getContext(), InvitationActivity.class);
|
// Intent intent = new Intent(getContext(), InvitationActivity.class);
|
||||||
startActivity(intent);
|
// startActivity(intent);
|
||||||
|
// } else {
|
||||||
|
// if (defaultType == 1) {
|
||||||
|
// goodsId = goodsId2;
|
||||||
|
// price = price2;
|
||||||
|
// } else if (defaultType == 2) {
|
||||||
|
// goodsId = goodsId3;
|
||||||
|
// price = price3;
|
||||||
|
// } else {
|
||||||
|
// goodsId = goodsId1;
|
||||||
|
// price = price1;
|
||||||
|
// }
|
||||||
|
// showPay(goodsId);
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (defaultType == 1) {
|
||||||
|
goodsId = goodsId2;
|
||||||
|
price = price2;
|
||||||
|
} else if (defaultType == 2) {
|
||||||
|
goodsId = goodsId3;
|
||||||
|
price = price3;
|
||||||
} else {
|
} else {
|
||||||
if (defaultType == 1) {
|
goodsId = goodsId1;
|
||||||
goodsId = goodsId2;
|
price = price1;
|
||||||
price = price2;
|
|
||||||
} else if (defaultType == 2) {
|
|
||||||
goodsId = goodsId3;
|
|
||||||
price = price3;
|
|
||||||
} else {
|
|
||||||
goodsId = goodsId1;
|
|
||||||
price = price1;
|
|
||||||
}
|
|
||||||
showPay(goodsId);
|
|
||||||
}
|
}
|
||||||
|
showPay(goodsId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import android.content.ClipboardManager;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -51,8 +52,15 @@ public class InvitationActivity extends BaseActivity implements
|
|||||||
super.onCreate(onSavedInstance);
|
super.onCreate(onSavedInstance);
|
||||||
binding = ActivityInvitationBinding.inflate(getLayoutInflater());
|
binding = ActivityInvitationBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
setDefaultTitle();
|
// setDefaultTitle();
|
||||||
setTitleName("邀请好友");
|
// setTitleName("邀请好友");
|
||||||
|
setRightCustomTextTitle("邀请好友", "邀请明细", new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent(InvitationActivity.this, InviteListActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
// View lin = binding.holderView;
|
// View lin = binding.holderView;
|
||||||
// ImageView bgImageView = findViewById(R.id.bgImageView);
|
// ImageView bgImageView = findViewById(R.id.bgImageView);
|
||||||
// lin.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
// lin.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||||
@@ -101,7 +109,7 @@ public class InvitationActivity extends BaseActivity implements
|
|||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
binding.shareLinkBtn.setOnClickListener(new View.OnClickListener() {
|
binding.shareLinkBtn2.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
mShareDialog.show();
|
mShareDialog.show();
|
||||||
@@ -118,7 +126,7 @@ public class InvitationActivity extends BaseActivity implements
|
|||||||
binding.tvManTip.setVisibility(View.GONE);
|
binding.tvManTip.setVisibility(View.GONE);
|
||||||
binding.menTip1.setVisibility(View.GONE);
|
binding.menTip1.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
binding.sharePosterBtn.setOnClickListener(new View.OnClickListener() {
|
binding.sharePosterBtn2.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
showPoster();
|
showPoster();
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.Switch;
|
import android.widget.Switch;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@@ -57,6 +58,7 @@ import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
|||||||
import com.xuebiping.bolizhuzi.view.base.BaseApplication;
|
import com.xuebiping.bolizhuzi.view.base.BaseApplication;
|
||||||
import com.xuebiping.bolizhuzi.view.base.BaseWebViewActivity;
|
import com.xuebiping.bolizhuzi.view.base.BaseWebViewActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||||
|
import com.xuebiping.bolizhuzi.view.main.MainActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.main.MainPageActivity;
|
import com.xuebiping.bolizhuzi.view.main.MainPageActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.ShaiXuanDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.ShaiXuanDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.rank.ZhiRankActivity;
|
import com.xuebiping.bolizhuzi.view.rank.ZhiRankActivity;
|
||||||
@@ -131,6 +133,11 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
|||||||
private String mUsercode;
|
private String mUsercode;
|
||||||
private TextView mTv_go_open;
|
private TextView mTv_go_open;
|
||||||
private int mDo_not_disturb;
|
private int mDo_not_disturb;
|
||||||
|
private ProgressBar mPb_intimacy;
|
||||||
|
private TextView mTv_jy_level;
|
||||||
|
private RelativeLayout rl_level;
|
||||||
|
private ImageView iv_level;
|
||||||
|
private TextView tv_level;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
@@ -201,6 +208,13 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
|||||||
ll_mine_video_chat = v.findViewById(R.id.ll_mine_video_chat);
|
ll_mine_video_chat = v.findViewById(R.id.ll_mine_video_chat);
|
||||||
mTv_go_open = v.findViewById(R.id.tv_go_open);
|
mTv_go_open = v.findViewById(R.id.tv_go_open);
|
||||||
|
|
||||||
|
rl_level = v.findViewById(R.id.rl_level);
|
||||||
|
iv_level = v.findViewById(R.id.iv_level);
|
||||||
|
tv_level = v.findViewById(R.id.tv_level);
|
||||||
|
|
||||||
|
mPb_intimacy = v.findViewById(R.id.pb_intimacy);
|
||||||
|
mTv_jy_level = v.findViewById(R.id.tv_jy_level);
|
||||||
|
|
||||||
rl_user_info.setOnClickListener(this);
|
rl_user_info.setOnClickListener(this);
|
||||||
ll_go_edit_layout.setOnClickListener(this);
|
ll_go_edit_layout.setOnClickListener(this);
|
||||||
tv_go_homepage.setOnClickListener(this);
|
tv_go_homepage.setOnClickListener(this);
|
||||||
@@ -264,6 +278,55 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
|||||||
tv_age.setText(result.getUserinfo().getAge() + "");
|
tv_age.setText(result.getUserinfo().getAge() + "");
|
||||||
mUsercode = result.getUserinfo().getUsercode();
|
mUsercode = result.getUserinfo().getUsercode();
|
||||||
tv_qingyu_id.setText("ID:" + mUsercode);
|
tv_qingyu_id.setText("ID:" + mUsercode);
|
||||||
|
|
||||||
|
int level = result.getUserinfo().getLevel();
|
||||||
|
|
||||||
|
tv_level.setText(level + "");
|
||||||
|
if (result.getUserinfo().getGender() == 1) {
|
||||||
|
if (level > 0 && level <= 15) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg1);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_1);
|
||||||
|
} else if (level > 15 && level <= 30) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg2);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_2);
|
||||||
|
} else if (level > 30 && level <= 45) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg3);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_3);
|
||||||
|
} else if (level > 45 && level <= 60) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg4);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_4);
|
||||||
|
} else if (level > 60 && level <= 75) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg5);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_5);
|
||||||
|
} else {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_modle_bg6);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_modle_6);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (level > 0 && level <= 15) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg1);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_1);
|
||||||
|
} else if (level > 15 && level <= 30) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg2);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_2);
|
||||||
|
} else if (level > 30 && level <= 45) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg3);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_3);
|
||||||
|
} else if (level > 45 && level <= 60) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg4);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_4);
|
||||||
|
} else if (level > 60 && level <= 75) {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg5);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_5);
|
||||||
|
} else {
|
||||||
|
rl_level.setBackgroundResource(R.mipmap.ic_use_bg6);
|
||||||
|
iv_level.setImageResource(R.mipmap.ic_use_6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mPb_intimacy.setProgress(result.getUserinfo().getLevel_percent());
|
||||||
|
mTv_jy_level.setText("距下一级还差" + result.getUserinfo().getNext_level_diff_wealth_value() + "财富值");
|
||||||
|
|
||||||
//1=超级会员 0=普通会员 2=没有会员
|
//1=超级会员 0=普通会员 2=没有会员
|
||||||
if (0 == result.getUserinfo().getVip()) {
|
if (0 == result.getUserinfo().getVip()) {
|
||||||
isVip = true;
|
isVip = true;
|
||||||
@@ -329,7 +392,11 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
|||||||
mOptions1.add(SettingOptions.WALLET);
|
mOptions1.add(SettingOptions.WALLET);
|
||||||
mOptions1.add(SettingOptions.TASK);
|
mOptions1.add(SettingOptions.TASK);
|
||||||
mOptions1.add(SettingOptions.MYMYINTIMACY);
|
mOptions1.add(SettingOptions.MYMYINTIMACY);
|
||||||
mOptions1.add(SettingOptions.UPAUTH);
|
|
||||||
|
if (result.getUserinfo().getGender() == 1) {
|
||||||
|
mOptions1.add(SettingOptions.UPAUTH);
|
||||||
|
}
|
||||||
|
|
||||||
mOptions1.add(SettingOptions.CUSTOMER);
|
mOptions1.add(SettingOptions.CUSTOMER);
|
||||||
mOptions1.add(SettingOptions.BEAUTY);
|
mOptions1.add(SettingOptions.BEAUTY);
|
||||||
mOptions1.add(SettingOptions.SETTING);
|
mOptions1.add(SettingOptions.SETTING);
|
||||||
@@ -444,6 +511,15 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
|||||||
public void onSuccess(BaseActivity activity, MainPageAnchorBean result, String message) {
|
public void onSuccess(BaseActivity activity, MainPageAnchorBean result, String message) {
|
||||||
mDo_not_disturb = result.getDo_not_disturb();
|
mDo_not_disturb = result.getDo_not_disturb();
|
||||||
|
|
||||||
|
if (null != getActivity()) {
|
||||||
|
MainActivity mainActivity = (MainActivity) getActivity();
|
||||||
|
|
||||||
|
if (null != mainActivity) {
|
||||||
|
mainActivity.getMainDisturb(mDo_not_disturb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (mDo_not_disturb == 1) { //已开启勿扰模式
|
if (mDo_not_disturb == 1) { //已开启勿扰模式
|
||||||
MaleToast.showMessage(activity, "勿扰模式开启成功");
|
MaleToast.showMessage(activity, "勿扰模式开启成功");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
@@ -189,11 +189,11 @@ public class SuperMember2Fragment extends Fragment implements View.OnClickListen
|
|||||||
tv_member_open.setText("立即开通");
|
tv_member_open.setText("立即开通");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
|
// if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
|
||||||
lin_member_bottom_btn.setVisibility(View.GONE);
|
// lin_member_bottom_btn.setVisibility(View.GONE);
|
||||||
tv_member_open.setVisibility(View.VISIBLE);
|
// tv_member_open.setVisibility(View.VISIBLE);
|
||||||
tv_member_open.setText("邀请好友开通");
|
// tv_member_open.setText("邀请好友开通");
|
||||||
}
|
// }
|
||||||
|
|
||||||
List<MemberInfoList> list = result.getInfo().getList();
|
List<MemberInfoList> list = result.getInfo().getList();
|
||||||
if (list != null && list.size() > 0) {
|
if (list != null && list.size() > 0) {
|
||||||
@@ -337,22 +337,34 @@ public class SuperMember2Fragment extends Fragment implements View.OnClickListen
|
|||||||
}
|
}
|
||||||
showPay(goodsId);
|
showPay(goodsId);
|
||||||
} else if (v == tv_member_open) {
|
} else if (v == tv_member_open) {
|
||||||
if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
|
// if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 1) {
|
||||||
Intent intent = new Intent(getContext(), InvitationActivity.class);
|
// Intent intent = new Intent(getContext(), InvitationActivity.class);
|
||||||
startActivity(intent);
|
// startActivity(intent);
|
||||||
|
// } else {
|
||||||
|
// if (defaultType == 1) {
|
||||||
|
// goodsId = goodsId2;
|
||||||
|
// price = price2;
|
||||||
|
// } else if (defaultType == 2) {
|
||||||
|
// goodsId = goodsId3;
|
||||||
|
// price = price3;
|
||||||
|
// } else {
|
||||||
|
// goodsId = goodsId1;
|
||||||
|
// price = price1;
|
||||||
|
// }
|
||||||
|
// showPay(goodsId);
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (defaultType == 1) {
|
||||||
|
goodsId = goodsId2;
|
||||||
|
price = price2;
|
||||||
|
} else if (defaultType == 2) {
|
||||||
|
goodsId = goodsId3;
|
||||||
|
price = price3;
|
||||||
} else {
|
} else {
|
||||||
if (defaultType == 1) {
|
goodsId = goodsId1;
|
||||||
goodsId = goodsId2;
|
price = price1;
|
||||||
price = price2;
|
|
||||||
} else if (defaultType == 2) {
|
|
||||||
goodsId = goodsId3;
|
|
||||||
price = price3;
|
|
||||||
} else {
|
|
||||||
goodsId = goodsId1;
|
|
||||||
price = price1;
|
|
||||||
}
|
|
||||||
showPay(goodsId);
|
|
||||||
}
|
}
|
||||||
|
showPay(goodsId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import com.bigkoo.pickerview.view.TimePickerView;
|
|||||||
import com.facebook.drawee.view.SimpleDraweeView;
|
import com.facebook.drawee.view.SimpleDraweeView;
|
||||||
import com.fengliyan.http.httprequest.UploadFile;
|
import com.fengliyan.http.httprequest.UploadFile;
|
||||||
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
||||||
|
import com.fengliyan.uikit.title.Title;
|
||||||
import com.fengliyan.uikit.toast.MaleToast;
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.hjq.permissions.OnPermissionCallback;
|
import com.hjq.permissions.OnPermissionCallback;
|
||||||
@@ -95,6 +96,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
private RelativeLayout rl_tiz_layout;
|
private RelativeLayout rl_tiz_layout;
|
||||||
private RelativeLayout rl_xz_layout;
|
private RelativeLayout rl_xz_layout;
|
||||||
private RelativeLayout rl_city_layout;
|
private RelativeLayout rl_city_layout;
|
||||||
|
private TextView mRight;
|
||||||
private PermissionDialog permissionDialog;
|
private PermissionDialog permissionDialog;
|
||||||
|
|
||||||
private TimePickerView mAgePicker;
|
private TimePickerView mAgePicker;
|
||||||
@@ -169,18 +171,38 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_up_privilege);
|
setContentView(R.layout.activity_up_privilege);
|
||||||
|
|
||||||
setRightCustomTextTitle("UP主认证", "准则", new View.OnClickListener() {
|
// setRightCustomTextTitle("UP主认证", "准则", new View.OnClickListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onClick(View view) {
|
// public void onClick(View view) {
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
}
|
initTitle();
|
||||||
});
|
|
||||||
|
|
||||||
mManager = new UserAvatarManager(this);
|
mManager = new UserAvatarManager(this);
|
||||||
|
|
||||||
initView();
|
initView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initTitle() {
|
||||||
|
setTitleName("UP主认证");
|
||||||
|
Title title = getCustomTitle();
|
||||||
|
mRight = (TextView) title.findViewById(R.id.right_text);
|
||||||
|
mRight.setText("准则");
|
||||||
|
mRight.setTextColor(getResources().getColor(R.color.mainColor));
|
||||||
|
mRight.setVisibility(View.VISIBLE);
|
||||||
|
mRight.setTextSize(17);
|
||||||
|
mRight.setEnabled(true);
|
||||||
|
mRight.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
MaleToast.showMessage(UpPrivilegeActivity.this, "开发中");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
rl_avatar_layout = findViewById(R.id.rl_avatar_layout);
|
rl_avatar_layout = findViewById(R.id.rl_avatar_layout);
|
||||||
sd_avatar = findViewById(R.id.sd_avatar);
|
sd_avatar = findViewById(R.id.sd_avatar);
|
||||||
|
|||||||
24
app/src/main/res/drawable/progressbar_level.xml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- 背景 -->
|
||||||
|
<item
|
||||||
|
android:id="@android:id/background"
|
||||||
|
android:drawable="@drawable/shape_20999999_r45_bg"></item>
|
||||||
|
<!-- 第二进度条样式,用不怎么到直接设置成了和背景色一样的颜色,隐藏起来 -->
|
||||||
|
<item android:id="@android:id/secondaryProgress" android:drawable="@drawable/shape_20999999_r45_bg">
|
||||||
|
</item>
|
||||||
|
<!-- 第一进度条样式,我想修改的,修改成简单的灰色 -->
|
||||||
|
<item android:id="@android:id/progress">
|
||||||
|
<clip>
|
||||||
|
<shape>
|
||||||
|
<!-- 圆角设置 -->
|
||||||
|
<corners android:radius="@dimen/dp16" />
|
||||||
|
<gradient
|
||||||
|
android:angle="180"
|
||||||
|
android:endColor="#EFD73D"
|
||||||
|
android:startColor="#FF902E" />
|
||||||
|
<!-- <solid android:color="@color/yellow_ffd33e" />-->
|
||||||
|
</shape>
|
||||||
|
</clip>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
6
app/src/main/res/drawable/shape_20999999_r45_bg.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="@dimen/dp45" />
|
||||||
|
<solid android:color="#33999999"/>
|
||||||
|
</shape>
|
||||||
6
app/src/main/res/drawable/shape_efecec_r14_bg.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
<solid android:color="#EFECEC"/>
|
||||||
|
</shape>
|
||||||
7
app/src/main/res/drawable/shape_f9fafc_r4_bg.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="4dp"/>
|
||||||
|
<solid android:color="#EFECEC"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
@@ -2,9 +2,13 @@
|
|||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
|
|
||||||
|
<!-- <gradient android:angle="0"-->
|
||||||
|
<!-- android:startColor="#E685A6"-->
|
||||||
|
<!-- android:endColor="#DA5281"/>-->
|
||||||
|
|
||||||
<gradient android:angle="0"
|
<gradient android:angle="0"
|
||||||
android:startColor="#E685A6"
|
android:startColor="#65DAEC"
|
||||||
android:endColor="#DA5281"/>
|
android:endColor="#6FF0B7"/>
|
||||||
|
|
||||||
<corners android:radius="45dp"/>
|
<corners android:radius="45dp"/>
|
||||||
|
|
||||||
|
|||||||
8
app/src/main/res/drawable/shape_wurao_bg.xml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
|
||||||
|
<solid android:color="#33EB6DD2"/>
|
||||||
|
<corners android:radius="@dimen/dp10"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
@@ -142,6 +142,7 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/bind_real_name"
|
android:id="@+id/bind_real_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
|
|||||||
50
app/src/main/res/layout/activity_dynamic_publish.xml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/rl_head"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp48"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/ll_back"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@mipmap/ic_black_back" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||||
|
android:id="@+id/magic_indicator"
|
||||||
|
android:layout_width="1000dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_zhunze"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:text="准则"
|
||||||
|
android:textColor="@color/yellow_ffd33e" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.viewpager.widget.ViewPager
|
||||||
|
android:id="@+id/main_view_pager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/rl_head" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
@@ -5,7 +5,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:viewBindingIgnore="true">
|
tools:viewBindingIgnore="true"
|
||||||
|
android:background="@color/white">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_content_layout"
|
android:id="@+id/ll_content_layout"
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
android:layout_below="@+id/tv_tip"
|
android:layout_below="@+id/tv_tip"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:visibility="visible"
|
android:visibility="gone"
|
||||||
android:layout_marginTop="@dimen/dp10"
|
android:layout_marginTop="@dimen/dp10"
|
||||||
android:background="@drawable/bg_invite"
|
android:background="@drawable/bg_invite"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@@ -640,6 +640,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:layout_marginBottom="100dp"
|
||||||
android:id="@+id/tv_tip"
|
android:id="@+id/tv_tip"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -668,4 +669,41 @@
|
|||||||
android:background="@drawable/bg_invite_share"/>
|
android:background="@drawable/bg_invite_share"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginBottom="25dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/shareLinkBtn2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="链接分享"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:background="@drawable/bg_invite_share" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sharePosterBtn2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="海报分享"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:background="@drawable/bg_invite_share" />
|
||||||
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
38
app/src/main/res/layout/activity_page_video_play2.xml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/black">
|
||||||
|
|
||||||
|
<com.xuebiping.bolizhuzi.view.main.ui.EmptyControlVideo
|
||||||
|
android:id="@+id/videoView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@android:color/transparent" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/iv_back"
|
||||||
|
android:layout_marginTop="48dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/ic_back_white" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<com.xuebiping.bolizhuzi.utils.ProgressView
|
||||||
|
android:id="@+id/progress"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="8dp"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginStart="18dp"
|
||||||
|
android:layout_marginEnd="18dp"
|
||||||
|
android:layout_marginBottom="30dp" />
|
||||||
|
</RelativeLayout>
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
android:background="@color/black"
|
android:background="@color/black"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
|
android:paddingTop="44dp"
|
||||||
android:layout_height="match_parent">
|
android:paddingBottom="44dp">
|
||||||
|
|
||||||
<com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
<com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
|
|||||||
@@ -124,6 +124,7 @@
|
|||||||
android:background="@color/colorDevider" />
|
android:background="@color/colorDevider" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@@ -157,6 +158,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/colorDevider" />
|
android:background="@color/colorDevider" />
|
||||||
@@ -200,6 +202,7 @@
|
|||||||
android:background="@color/colorDevider" />
|
android:background="@color/colorDevider" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@@ -233,11 +236,13 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/colorDevider" />
|
android:background="@color/colorDevider" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@@ -271,6 +276,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="@color/colorDevider" />
|
android:background="@color/colorDevider" />
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="24dp"
|
android:layout_marginLeft="24dp"
|
||||||
android:layout_marginTop="28dp"
|
android:layout_marginTop="40dp"
|
||||||
android:layout_marginRight="24dp"
|
android:layout_marginRight="24dp"
|
||||||
android:background="@drawable/shape_white_bg_r14"
|
android:background="@drawable/shape_white_bg_r14"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_chat"
|
android:id="@+id/tv_chat"
|
||||||
android:textColor="@color/one_text"
|
android:textColor="@color/one_text"
|
||||||
android:layout_marginTop="44dp"
|
android:layout_marginTop="56dp"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -125,13 +125,13 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_width="112dp"
|
android:layout_width="160dp"
|
||||||
android:layout_height="56dp">
|
android:layout_height="80dp">
|
||||||
|
|
||||||
<com.facebook.drawee.view.SimpleDraweeView
|
<com.facebook.drawee.view.SimpleDraweeView
|
||||||
android:id="@+id/my_user_head"
|
android:id="@+id/my_user_head"
|
||||||
android:layout_width="56dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="80dp"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
app:roundAsCircle="true"
|
app:roundAsCircle="true"
|
||||||
app:roundingBorderColor="@color/white"
|
app:roundingBorderColor="@color/white"
|
||||||
@@ -140,18 +140,18 @@
|
|||||||
<com.facebook.drawee.view.SimpleDraweeView
|
<com.facebook.drawee.view.SimpleDraweeView
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:id="@+id/other_user_head"
|
android:id="@+id/other_user_head"
|
||||||
android:layout_width="56dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="80dp"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
app:roundAsCircle="true"
|
app:roundAsCircle="true"
|
||||||
app:roundingBorderColor="@color/white"
|
app:roundingBorderColor="@color/white"
|
||||||
app:roundingBorderWidth="2dp" />
|
app:roundingBorderWidth="2dp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="22dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="22dp"
|
android:layout_height="40dp"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:src="@mipmap/ic_look_wechat_love" />
|
android:src="@mipmap/ic_xintiao" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
69
app/src/main/res/layout/dialog_open_disturb.xml
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@color/transparent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_marginLeft="32dp"
|
||||||
|
android:layout_marginRight="32dp"
|
||||||
|
android:background="@drawable/shape_white_bg_r14"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_close"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_width="@dimen/dp32"
|
||||||
|
android:layout_height="@dimen/dp32">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_close"
|
||||||
|
android:layout_width="@dimen/dp12"
|
||||||
|
android:layout_height="@dimen/dp12"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@mipmap/ic_select_finish"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_disturb"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:src="@mipmap/ic_do_not_disturb"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="60dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_intro"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:textColor="@color/one_text"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:layout_below="@+id/iv_disturb"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:text="您当前处于勿扰状态,无法正常使用1对1视频功能,请点击下方按钮关闭勿扰状态,以免错过女神的来电互动哦!"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:background="@drawable/shape_button_enable"
|
||||||
|
android:id="@+id/bt_finish_disturb"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:layout_marginBottom="20dp"
|
||||||
|
android:layout_below="@+id/tv_intro"
|
||||||
|
android:layout_marginLeft="32dp"
|
||||||
|
android:layout_marginRight="32dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:text="关闭勿扰"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
136
app/src/main/res/layout/fragment_dynamic_image_text.xml
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical" android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:viewBindingIgnore="true"
|
||||||
|
android:background="@android:color/white">
|
||||||
|
|
||||||
|
<include layout="@layout/item_edit"/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_add_topic"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp20"
|
||||||
|
android:layout_marginTop="@dimen/dp15"
|
||||||
|
android:layout_marginBottom="@dimen/dp20"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/dp14"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="选择话题"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_right"
|
||||||
|
android:layout_width="@dimen/dp18"
|
||||||
|
android:layout_height="@dimen/dp18"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:src="@mipmap/girlauth_right"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_topic_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#999999"
|
||||||
|
android:textSize="@dimen/dp14"
|
||||||
|
android:layout_toLeftOf="@+id/iv_right"
|
||||||
|
android:text="添加话题"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp14"
|
||||||
|
android:layout_height="@dimen/dp14"
|
||||||
|
android:layout_toLeftOf="@+id/tv_topic_content"
|
||||||
|
android:layout_marginRight="@dimen/dp6"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:src="@mipmap/ic_topic_small"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="选择照片"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/dynamics_post_line_1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/dynamics_post_video"
|
||||||
|
android:layout_width="110.5dp"
|
||||||
|
android:layout_height="110.5dp"
|
||||||
|
android:background="@color/background"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:gravity="center">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_dynamic_video"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/dynamics_post_line_2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/dynamics_post_line_3"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:text="选择照片(最多可选择9张)"
|
||||||
|
android:textColor="@color/three_text"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_publish"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_marginLeft="44dp"
|
||||||
|
android:layout_marginRight="44dp"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:text="发布" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
136
app/src/main/res/layout/fragment_dynamic_video_text.xml
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical" android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:viewBindingIgnore="true"
|
||||||
|
android:background="@android:color/white">
|
||||||
|
|
||||||
|
<include layout="@layout/item_edit"/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_add_topic"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp20"
|
||||||
|
android:layout_marginTop="@dimen/dp15"
|
||||||
|
android:layout_marginBottom="@dimen/dp20"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/dp14"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="选择话题"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_right"
|
||||||
|
android:layout_width="@dimen/dp18"
|
||||||
|
android:layout_height="@dimen/dp18"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:src="@mipmap/girlauth_right"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_topic_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#999999"
|
||||||
|
android:textSize="@dimen/dp14"
|
||||||
|
android:layout_toLeftOf="@+id/iv_right"
|
||||||
|
android:text="添加话题"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp14"
|
||||||
|
android:layout_height="@dimen/dp14"
|
||||||
|
android:layout_toLeftOf="@+id/tv_topic_content"
|
||||||
|
android:layout_marginRight="@dimen/dp6"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:src="@mipmap/ic_topic_small"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="选择视频"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/dynamics_post_line_1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/dynamics_post_video"
|
||||||
|
android:layout_width="110.5dp"
|
||||||
|
android:layout_height="110.5dp"
|
||||||
|
android:background="@color/background"
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:gravity="center">
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_dynamic_video"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/dynamics_post_line_2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/dynamics_post_line_3"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:text="选择视频(文件大小最大200MB)"
|
||||||
|
android:textColor="@color/three_text"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/bt_publish"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_marginLeft="44dp"
|
||||||
|
android:layout_marginRight="44dp"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
android:text="发布" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -6,31 +6,73 @@
|
|||||||
android:layout_marginBottom="50dp">
|
android:layout_marginBottom="50dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_marginLeft="@dimen/dp12"
|
|
||||||
android:id="@+id/rl_head"
|
android:id="@+id/rl_head"
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp48">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
<LinearLayout
|
||||||
android:id="@+id/magic_indicator"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="@dimen/dp48"
|
||||||
android:layout_height="match_parent"
|
android:layout_marginLeft="@dimen/dp12"
|
||||||
android:layout_weight="1"
|
android:orientation="horizontal">
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||||
|
android:id="@+id/magic_indicator"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_gravity="center_vertical" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_home_search"
|
||||||
|
android:layout_width="@dimen/dp44"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_home_search" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rl_home_search"
|
android:visibility="gone"
|
||||||
android:layout_width="@dimen/dp44"
|
android:id="@+id/rl_wurao"
|
||||||
android:layout_height="match_parent">
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp40"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:background="@drawable/shape_wurao_bg">
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_home_search" />
|
android:layout_centerVertical="true"
|
||||||
</RelativeLayout>
|
android:layout_marginLeft="6dp"
|
||||||
|
android:drawableStart="@mipmap/ic_wurao_tip"
|
||||||
|
android:drawablePadding="4dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="您当前没有关闭勿扰模式,无法1v1视频"
|
||||||
|
android:textColor="@color/one_text"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_set_wurao"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="6dp"
|
||||||
|
android:background="@drawable/shape_button_enable"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="去设置"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.viewpager.widget.ViewPager
|
<androidx.viewpager.widget.ViewPager
|
||||||
|
|||||||
@@ -6,67 +6,109 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/rl_head"
|
android:id="@+id/rl_head"
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp48">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:visibility="gone"
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/ll_select"
|
android:layout_height="@dimen/dp48"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:layout_marginLeft="8dp"
|
|
||||||
android:layout_marginRight="8dp"
|
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:textStyle="bold"
|
android:visibility="gone"
|
||||||
|
android:id="@+id/ll_select"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="筛选"
|
|
||||||
android:textColor="#ffe472ed"
|
|
||||||
android:textSize="13sp"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:src="@drawable/ic_main_select_man_and_woman"
|
android:layout_marginLeft="8dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_marginRight="8dp"
|
||||||
android:layout_height="wrap_content"/>
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="筛选"
|
||||||
|
android:textColor="#ffe472ed"
|
||||||
|
android:textSize="13sp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:src="@drawable/ic_main_select_man_and_woman"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||||
|
android:layout_marginLeft="6dp"
|
||||||
|
android:id="@+id/magic_indicator"
|
||||||
|
android:layout_width="1000dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_gravity="center_vertical" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_home_change"
|
||||||
|
android:layout_width="@dimen/dp32"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_home_change" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_home_search"
|
||||||
|
android:layout_width="@dimen/dp32"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_home_search" />
|
||||||
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
|
||||||
android:layout_marginLeft="6dp"
|
|
||||||
android:id="@+id/magic_indicator"
|
|
||||||
android:layout_width="1000dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rl_home_change"
|
android:visibility="gone"
|
||||||
android:layout_width="@dimen/dp32"
|
android:id="@+id/rl_wurao"
|
||||||
android:layout_height="match_parent">
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp40"
|
||||||
|
android:layout_marginLeft="8dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:background="@drawable/shape_wurao_bg">
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/ic_home_change" />
|
android:layout_centerVertical="true"
|
||||||
</RelativeLayout>
|
android:layout_marginLeft="6dp"
|
||||||
|
android:drawableStart="@mipmap/ic_wurao_tip"
|
||||||
|
android:drawablePadding="4dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="您当前没有关闭勿扰模式,无法1v1视频"
|
||||||
|
android:textColor="@color/one_text"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<RelativeLayout
|
<TextView
|
||||||
android:id="@+id/rl_home_search"
|
android:id="@+id/tv_set_wurao"
|
||||||
android:layout_width="@dimen/dp32"
|
android:layout_width="60dp"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="24dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
<ImageView
|
android:layout_centerVertical="true"
|
||||||
android:layout_centerInParent="true"
|
android:layout_marginRight="6dp"
|
||||||
android:layout_width="wrap_content"
|
android:background="@drawable/shape_button_enable"
|
||||||
android:layout_height="wrap_content"
|
android:gravity="center"
|
||||||
android:src="@drawable/ic_home_search" />
|
android:text="去设置"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -191,8 +191,8 @@
|
|||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginEnd="18dp"
|
android:layout_marginEnd="18dp"
|
||||||
android:layout_marginBottom="32dp"
|
android:layout_marginBottom="32dp"
|
||||||
android:visibility="gone"
|
fresco:cardCornerRadius="8dp"
|
||||||
fresco:cardCornerRadius="8dp">
|
android:visibility="gone">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -224,16 +224,6 @@
|
|||||||
fresco:layout_constraintTop_toTopOf="parent"
|
fresco:layout_constraintTop_toTopOf="parent"
|
||||||
fresco:lottie_loop="true" />
|
fresco:lottie_loop="true" />
|
||||||
|
|
||||||
<!-- <ImageView-->
|
|
||||||
<!-- android:id="@+id/iv_video_call"-->
|
|
||||||
<!-- android:layout_width="40dp"-->
|
|
||||||
<!-- android:layout_height="40dp"-->
|
|
||||||
<!-- android:src="@drawable/ic_play_call"-->
|
|
||||||
<!-- android:visibility="gone"-->
|
|
||||||
<!-- fresco:layout_constraintBottom_toBottomOf="parent"-->
|
|
||||||
<!-- fresco:layout_constraintEnd_toEndOf="parent"-->
|
|
||||||
<!-- fresco:layout_constraintStart_toStartOf="parent"-->
|
|
||||||
<!-- fresco:layout_constraintTop_toTopOf="parent" />-->
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
@@ -328,24 +318,58 @@
|
|||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/tagVipImageView"
|
android:id="@+id/tagVipImageView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="16dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="16dp"
|
||||||
android:layout_marginLeft="12dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_toEndOf="@+id/personal_main_page_name"
|
android:layout_toEndOf="@+id/personal_main_page_name"
|
||||||
android:src="@drawable/ic_pvip"
|
android:src="@mipmap/ic_model_v" />
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
<ImageView
|
<!-- <ImageView-->
|
||||||
android:id="@+id/tagSVipImageView"
|
<!-- android:id="@+id/tagSVipImageView"-->
|
||||||
android:layout_width="wrap_content"
|
<!-- android:layout_width="wrap_content"-->
|
||||||
android:layout_height="wrap_content"
|
<!-- android:layout_height="wrap_content"-->
|
||||||
android:layout_marginLeft="12dp"
|
<!-- android:layout_marginLeft="12dp"-->
|
||||||
|
<!-- android:layout_marginTop="4dp"-->
|
||||||
|
<!-- android:layout_toEndOf="@+id/personal_main_page_name"-->
|
||||||
|
<!-- android:src="@drawable/ic_gvip"-->
|
||||||
|
<!-- android:visibility="gone" />-->
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:layout_toEndOf="@+id/personal_main_page_name"
|
android:layout_toEndOf="@+id/tagVipImageView"
|
||||||
android:src="@drawable/ic_gvip"
|
android:id="@+id/rl_level"
|
||||||
android:visibility="gone" />
|
android:layout_width="42dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:background="@mipmap/ic_modle_bg1">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="4dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_level"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:src="@mipmap/ic_modle_1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_level"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="22"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="10dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_signature"
|
android:id="@+id/tv_signature"
|
||||||
@@ -1179,6 +1203,7 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/rl_comment"
|
android:id="@+id/rl_comment"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -126,34 +126,40 @@
|
|||||||
app:layout_constraintTop_toTopOf="@+id/tv_nick_name"
|
app:layout_constraintTop_toTopOf="@+id/tv_nick_name"
|
||||||
tools:text="123" />
|
tools:text="123" />
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:id="@+id/ll_level"
|
android:id="@+id/rl_level"
|
||||||
android:layout_width="@dimen/dp44"
|
android:layout_width="42dp"
|
||||||
android:layout_height="@dimen/dp22"
|
android:layout_height="16dp"
|
||||||
android:layout_marginStart="@dimen/dp10"
|
android:layout_marginLeft="10dp"
|
||||||
android:background="@drawable/bg_level"
|
android:background="@mipmap/ic_modle_bg1"
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/tv_nick_name"
|
app:layout_constraintBottom_toBottomOf="@+id/tv_nick_name"
|
||||||
app:layout_constraintStart_toEndOf="@+id/tv_nick_name"
|
app:layout_constraintStart_toEndOf="@+id/tv_nick_name"
|
||||||
app:layout_constraintTop_toTopOf="@+id/tv_nick_name">
|
app:layout_constraintTop_toTopOf="@+id/tv_nick_name">
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:layout_width="@dimen/dp8"
|
|
||||||
android:layout_height="@dimen/dp5"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:src="@mipmap/ic_mine_jt_s" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_level"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp5"
|
android:layout_centerVertical="true"
|
||||||
android:text="1"
|
android:layout_marginLeft="4dp"
|
||||||
android:textColor="@color/white"
|
android:gravity="center_vertical"
|
||||||
android:textSize="11dp" />
|
android:orientation="horizontal">
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_level"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:src="@mipmap/ic_modle_1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_level"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="22"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="10dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_qingyu_id"
|
android:id="@+id/tv_qingyu_id"
|
||||||
@@ -166,20 +172,22 @@
|
|||||||
android:text="ID:"
|
android:text="ID:"
|
||||||
android:textColor="#524B52"
|
android:textColor="#524B52"
|
||||||
android:textSize="12dp"
|
android:textSize="12dp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/vv"
|
app:layout_constraintBottom_toTopOf="@+id/pb_intimacy"
|
||||||
app:layout_constraintStart_toEndOf="@+id/rl_user_head"
|
app:layout_constraintStart_toEndOf="@+id/rl_user_head"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_nick_name" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_nick_name" />
|
||||||
|
|
||||||
<View
|
<ProgressBar
|
||||||
android:id="@+id/vv"
|
android:id="@+id/pb_intimacy"
|
||||||
|
style="@style/progressBar_level"
|
||||||
android:layout_width="@dimen/dp120"
|
android:layout_width="@dimen/dp120"
|
||||||
android:layout_height="@dimen/dp4"
|
android:layout_height="4dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="@dimen/dp6"
|
android:layout_marginTop="@dimen/dp6"
|
||||||
android:background="#33999999"
|
android:max="100"
|
||||||
|
android:progress="50"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/tv_qingyu_id"
|
app:layout_constraintBottom_toBottomOf="@+id/tv_qingyu_id"
|
||||||
app:layout_constraintStart_toEndOf="@+id/rl_user_head"
|
app:layout_constraintStart_toEndOf="@+id/rl_user_head"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_qingyu_id" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_qingyu_id"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_jy_level"
|
android:id="@+id/tv_jy_level"
|
||||||
|
|||||||
@@ -81,10 +81,10 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:id="@+id/iv_member_sign"
|
android:id="@+id/iv_member_sign"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="16dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="16dp"
|
||||||
android:layout_marginLeft="@dimen/dp8"
|
android:layout_marginLeft="@dimen/dp8"
|
||||||
android:src="@drawable/ic_pvip" />
|
android:src="@mipmap/ic_model_v" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -61,13 +61,27 @@
|
|||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_dynamic_level"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_toRightOf="@+id/dynamic_list_name"
|
||||||
|
android:background="@drawable/shape_main_color_line_oval_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingHorizontal="6dp"
|
||||||
|
android:text="LV.100"
|
||||||
|
android:textColor="@color/yellow_ffd33e"
|
||||||
|
android:textSize="10dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/dynamic_list_age"
|
android:id="@+id/dynamic_list_age"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="14dp"
|
android:layout_height="14dp"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="6dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:layout_toRightOf="@+id/dynamic_list_name"
|
android:layout_toRightOf="@+id/tv_dynamic_level"
|
||||||
android:background="@drawable/shape_dynamic_age"
|
android:background="@drawable/shape_dynamic_age"
|
||||||
android:drawableLeft="@mipmap/sex_men"
|
android:drawableLeft="@mipmap/sex_men"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
@@ -79,6 +93,7 @@
|
|||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toRightOf="@id/dynamic_list_age"
|
android:layout_toRightOf="@id/dynamic_list_age"
|
||||||
|
|||||||
@@ -8,22 +8,24 @@
|
|||||||
tools:viewBindingIgnore="true">
|
tools:viewBindingIgnore="true">
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
android:padding="12dp"
|
||||||
android:id="@+id/edit_post"
|
android:id="@+id/edit_post"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="120dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginTop="21.5dp"
|
android:layout_marginTop="21.5dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:background="@null"
|
android:background="@drawable/shape_efecec_r14_bg"
|
||||||
android:gravity="top|left"
|
android:gravity="top|left"
|
||||||
android:hint="展示你的技能..."
|
android:hint="请输入动态标题"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine"
|
||||||
android:maxLength="300"
|
android:maxLength="300"
|
||||||
android:minLines="6"
|
android:minLines="3"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/edit_char_count"
|
android:id="@+id/edit_char_count"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
@@ -76,6 +77,38 @@
|
|||||||
android:layout_marginLeft="@dimen/dp8"
|
android:layout_marginLeft="@dimen/dp8"
|
||||||
android:src="@drawable/ic_pvip" />
|
android:src="@drawable/ic_pvip" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_level"
|
||||||
|
android:layout_width="42dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:background="@mipmap/ic_modle_bg1">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="4dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_level"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:src="@mipmap/ic_modle_1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_level"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="22"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="10dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- <TextView-->
|
<!-- <TextView-->
|
||||||
@@ -99,7 +132,7 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="16dp"
|
android:layout_height="16dp"
|
||||||
android:src="@drawable/ic_guard_love"/>
|
android:src="@mipmap/ic_qmb_xin"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_intimacy"
|
android:id="@+id/tv_intimacy"
|
||||||
@@ -113,73 +146,45 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- <LinearLayout-->
|
<RelativeLayout
|
||||||
<!-- android:id="@+id/ll_visit_time"-->
|
android:layout_width="wrap_content"
|
||||||
<!-- android:layout_width="wrap_content"-->
|
android:layout_height="wrap_content"
|
||||||
<!-- android:layout_height="wrap_content"-->
|
android:layout_alignParentRight="true"
|
||||||
<!-- android:layout_alignParentRight="true"-->
|
android:layout_centerVertical="true"
|
||||||
<!-- android:layout_centerVertical="true"-->
|
android:layout_marginRight="16dp">
|
||||||
<!-- android:layout_marginRight="16dp"-->
|
|
||||||
<!-- android:orientation="vertical"-->
|
|
||||||
<!-- android:visibility="gone">-->
|
|
||||||
|
|
||||||
<!-- <TextView-->
|
<LinearLayout
|
||||||
<!-- android:layout_gravity="end|right"-->
|
android:id="@+id/ll_unlock"
|
||||||
<!-- android:id="@+id/tv_add_time"-->
|
android:layout_width="wrap_content"
|
||||||
<!-- android:layout_marginTop="@dimen/dp6"-->
|
android:layout_height="wrap_content"
|
||||||
<!-- android:layout_width="wrap_content"-->
|
android:orientation="vertical">
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:text="01/25访问"-->
|
|
||||||
<!-- android:textColor="@color/three_text"-->
|
|
||||||
<!-- android:textSize="12sp" />-->
|
|
||||||
|
|
||||||
<!-- <LinearLayout-->
|
<TextView
|
||||||
<!-- android:layout_marginTop="@dimen/dp6"-->
|
android:layout_width="wrap_content"
|
||||||
<!-- android:layout_gravity="center_vertical"-->
|
android:layout_height="wrap_content"
|
||||||
<!-- android:layout_width="wrap_content"-->
|
android:layout_gravity="right"
|
||||||
<!-- android:layout_height="wrap_content"-->
|
android:text="未解锁"
|
||||||
<!-- android:orientation="horizontal">-->
|
android:textColor="@color/two_text"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<!-- <TextView-->
|
<TextView
|
||||||
<!-- android:layout_width="wrap_content"-->
|
android:id="@+id/tv_unlock_desc"
|
||||||
<!-- android:layout_height="wrap_content"-->
|
android:textColor="@color/three_text"
|
||||||
<!-- android:text="共 "-->
|
android:textSize="12sp"
|
||||||
<!-- android:textColor="@color/three_text"-->
|
android:layout_width="wrap_content"
|
||||||
<!-- android:textSize="14sp"-->
|
android:layout_height="wrap_content"
|
||||||
<!-- />-->
|
android:text="还差18888"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- <TextView-->
|
<TextView
|
||||||
<!-- android:id="@+id/tv_visit_number"-->
|
android:id="@+id/tv_lock"
|
||||||
<!-- android:layout_width="wrap_content"-->
|
android:visibility="gone"
|
||||||
<!-- android:layout_height="wrap_content"-->
|
android:textColor="@color/yellow_ffd33e"
|
||||||
<!-- android:text="1次"-->
|
android:textSize="14sp"
|
||||||
<!-- android:textColor="@color/yellow_ffd33e"-->
|
android:layout_width="wrap_content"
|
||||||
<!-- android:textSize="14sp"-->
|
android:layout_height="wrap_content"
|
||||||
<!-- />-->
|
android:text="已解锁"/>
|
||||||
|
</RelativeLayout>
|
||||||
<!-- <TextView-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:text=" 访问"-->
|
|
||||||
<!-- android:textColor="@color/three_text"-->
|
|
||||||
<!-- android:textSize="14sp"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </LinearLayout>-->
|
|
||||||
<!-- </LinearLayout>-->
|
|
||||||
|
|
||||||
<!-- <TextView-->
|
|
||||||
<!-- android:visibility="gone"-->
|
|
||||||
<!-- android:id="@+id/tv_chat"-->
|
|
||||||
<!-- android:layout_width="60dp"-->
|
|
||||||
<!-- android:layout_height="30dp"-->
|
|
||||||
<!-- android:layout_alignParentRight="true"-->
|
|
||||||
<!-- android:layout_centerVertical="true"-->
|
|
||||||
<!-- android:layout_marginRight="16dp"-->
|
|
||||||
<!-- android:background="@drawable/shape_button_enable"-->
|
|
||||||
<!-- android:gravity="center"-->
|
|
||||||
<!-- android:text="发消息"-->
|
|
||||||
<!-- android:textColor="@color/white"-->
|
|
||||||
<!-- android:textSize="12sp" />-->
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -81,10 +81,42 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:id="@+id/iv_member_sign"
|
android:id="@+id/iv_member_sign"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="16dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="16dp"
|
||||||
android:layout_marginLeft="@dimen/dp8"
|
android:layout_marginLeft="10dp"
|
||||||
android:src="@drawable/ic_pvip" />
|
android:src="@mipmap/ic_model_v" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_level"
|
||||||
|
android:layout_width="42dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:background="@mipmap/ic_modle_bg1">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="4dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_level"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:src="@mipmap/ic_modle_1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_level"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="22"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="10dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -132,7 +164,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="共 "
|
android:text="共"
|
||||||
android:textColor="@color/three_text"
|
android:textColor="@color/three_text"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
/>
|
/>
|
||||||
@@ -149,7 +181,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text=" 访问"
|
android:text="访问"
|
||||||
android:textColor="@color/three_text"
|
android:textColor="@color/three_text"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -42,18 +42,38 @@
|
|||||||
android:textColor="@color/one_text"
|
android:textColor="@color/one_text"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
<TextView
|
<RelativeLayout
|
||||||
android:id="@+id/tv_level"
|
|
||||||
android:paddingHorizontal="6dp"
|
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:gravity="center"
|
android:layout_toEndOf="@+id/tagVipImageView"
|
||||||
android:background="@drawable/shape_level_1_20_bg"
|
android:id="@+id/rl_level"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="42dp"
|
||||||
android:layout_height="16dp"
|
android:layout_height="16dp"
|
||||||
android:text="LV.100"
|
android:background="@mipmap/ic_modle_bg1">
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="8dp"
|
<LinearLayout
|
||||||
/>
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="4dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_level"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:src="@mipmap/ic_modle_1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_level"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="22"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="10dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -12,14 +12,13 @@
|
|||||||
android:id="@+id/post_image_ready_logo"
|
android:id="@+id/post_image_ready_logo"
|
||||||
android:layout_width="110.5dp"
|
android:layout_width="110.5dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/shape_retangle_frame_white"
|
android:background="@drawable/shape_f9fafc_r4_bg"
|
||||||
android:gravity="center"
|
android:gravity="center">
|
||||||
android:visibility="gone">
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/post_image_ready_logo_inner"
|
android:id="@+id/post_image_ready_logo_inner"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="36dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="30dp"
|
||||||
android:src="@drawable/ic_dynamic_add"/>
|
android:src="@mipmap/ic_renzheng_sctp"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|||||||
@@ -35,21 +35,22 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/search_list_name"
|
android:textStyle="bold"
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/search_list_name"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:text="醉红颜"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="17sp"
|
android:text="醉红颜"
|
||||||
android:textColor="@android:color/black"/>
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:visibility="gone"
|
|
||||||
android:id="@+id/iv_member_sign"
|
android:id="@+id/iv_member_sign"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/dp8"
|
android:layout_marginLeft="@dimen/dp8"
|
||||||
android:src="@drawable/ic_pvip" />
|
android:src="@drawable/ic_pvip"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -58,13 +59,14 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:text="深圳 | 18岁"
|
android:text="心动至上"
|
||||||
android:textSize="14sp"
|
android:textSize="12sp"
|
||||||
android:textColor="@color/infoEditTextColor2"/>
|
android:textColor="@color/infoEditTextColor2"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:visibility="gone"
|
||||||
android:id="@+id/search_list_time"
|
android:id="@+id/search_list_time"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -78,6 +80,7 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:layout_marginLeft="60dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="2px"
|
android:layout_height="2px"
|
||||||
android:background="@color/bottomCuttingLine"/>
|
android:background="@color/bottomCuttingLine"/>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
android:layout_height="@dimen/dp50"
|
android:layout_height="@dimen/dp50"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:layout_marginLeft="@dimen/dp16"
|
android:layout_marginLeft="@dimen/dp16"
|
||||||
android:src="@drawable/ic_return" />
|
android:src="@mipmap/ic_black_back" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<!-- <EditText
|
<!-- <EditText
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
android:layout_height="@dimen/dp56">
|
android:layout_height="@dimen/dp56">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_close"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_width="@dimen/dp44"
|
android:layout_width="@dimen/dp44"
|
||||||
android:layout_height="@dimen/dp44">
|
android:layout_height="@dimen/dp44">
|
||||||
|
|||||||
BIN
app/src/main/res/mipmap-xhdpi/ic_do_not_disturb.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_model_v.png
Normal file
|
After Width: | Height: | Size: 917 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_1.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_2.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_3.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_4.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_5.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_6.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_bg1.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_bg2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_bg3.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_bg4.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_bg5.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_modle_bg6.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_qmb_xin.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_renzheng_sctp.png
Normal file
|
After Width: | Height: | Size: 659 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_1.png
Normal file
|
After Width: | Height: | Size: 1008 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_2.png
Normal file
|
After Width: | Height: | Size: 903 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_3.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_4.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_5.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_6.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_bg1.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_bg2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_bg3.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_bg4.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_bg5.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_use_bg6.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_wurao_tip.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_xintiao.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
@@ -81,6 +81,16 @@
|
|||||||
<item name="android:progressDrawable">@drawable/progressbar_voice</item>
|
<item name="android:progressDrawable">@drawable/progressbar_voice</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="progressBar_level" parent="@android:style/Widget.ProgressBar.Horizontal">
|
||||||
|
<!-- 最大高度50dp,最小高度10dp,进度值确定,Drawable样式文件引用 -->
|
||||||
|
<item name="android:progress">0</item>
|
||||||
|
<item name="android:indeterminateOnly">false</item>
|
||||||
|
<item name="android:indeterminateDrawable">
|
||||||
|
@android:drawable/progress_indeterminate_horizontal
|
||||||
|
</item>
|
||||||
|
<item name="android:progressDrawable">@drawable/progressbar_level</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="activity_dialog" parent="Theme.AppCompat.Dialog">
|
<style name="activity_dialog" parent="Theme.AppCompat.Dialog">
|
||||||
<item name="android:windowIsFloating">true</item>
|
<item name="android:windowIsFloating">true</item>
|
||||||
<!-- <item name="android:windowFrame">@null</item>-->
|
<!-- <item name="android:windowFrame">@null</item>-->
|
||||||
|
|||||||