修改首页UI和tab图标
@@ -400,3 +400,9 @@ android {
|
|||||||
implementation 'com.github.Dimezis:BlurView:version-3.1.0'
|
implementation 'com.github.Dimezis:BlurView:version-3.1.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||||
|
implementation 'com.google.android.material:material:1.2.1'
|
||||||
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
|
||||||
|
}
|
||||||
@@ -228,6 +228,10 @@ public class DynamicsAdapter1 extends BaseAdapter {
|
|||||||
holder.years.setText(bean.getAge() + "");
|
holder.years.setText(bean.getAge() + "");
|
||||||
holder.location.setText(bean.getCity() + " | " + bean.getCreate_time());
|
holder.location.setText(bean.getCity() + " | " + bean.getCreate_time());
|
||||||
// holder.info.setText(bean.getContent());
|
// holder.info.setText(bean.getContent());
|
||||||
|
|
||||||
|
//TODO 显示浏览次数
|
||||||
|
holder.tv_see_count.setText("已有0次浏览");
|
||||||
|
|
||||||
holder.info.setText(bean.getContent(), bean.getExpand(), new ExpandLayout.OnExpandListener() {
|
holder.info.setText(bean.getContent(), bean.getExpand(), new ExpandLayout.OnExpandListener() {
|
||||||
@Override
|
@Override
|
||||||
public void expandChange() {
|
public void expandChange() {
|
||||||
@@ -277,6 +281,14 @@ public class DynamicsAdapter1 extends BaseAdapter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
holder.giftLayout.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if(null != mGiftListener){
|
||||||
|
mGiftListener.onSend(bean,bean.getReward_count());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
addImageView(holder, bean.getImages());
|
addImageView(holder, bean.getImages());
|
||||||
|
|
||||||
|
|
||||||
@@ -514,6 +526,7 @@ public class DynamicsAdapter1 extends BaseAdapter {
|
|||||||
holder.iv_sex = v.findViewById(R.id.iv_sex);
|
holder.iv_sex = v.findViewById(R.id.iv_sex);
|
||||||
holder.info = v.findViewById(R.id.dynamic_list_message);
|
holder.info = v.findViewById(R.id.dynamic_list_message);
|
||||||
holder.giftLayout = v.findViewById(R.id.item_dynamic_gift_layout);
|
holder.giftLayout = v.findViewById(R.id.item_dynamic_gift_layout);
|
||||||
|
holder.tv_see_count = v.findViewById(R.id.tv_see_count);
|
||||||
holder.getMenu = v.findViewById(R.id.dynamic_list_menu);
|
holder.getMenu = v.findViewById(R.id.dynamic_list_menu);
|
||||||
holder.imageListView1 = v.findViewById(R.id.dynamic_list_image_list_1);
|
holder.imageListView1 = v.findViewById(R.id.dynamic_list_image_list_1);
|
||||||
holder.imageListView2 = v.findViewById(R.id.dynamic_list_image_list_2);
|
holder.imageListView2 = v.findViewById(R.id.dynamic_list_image_list_2);
|
||||||
@@ -551,6 +564,7 @@ public class DynamicsAdapter1 extends BaseAdapter {
|
|||||||
TextView dynamic_image_num;
|
TextView dynamic_image_num;
|
||||||
LinearLayout imageListView3;
|
LinearLayout imageListView3;
|
||||||
View giftLayout;
|
View giftLayout;
|
||||||
|
TextView tv_see_count;
|
||||||
ImageView getMenu;
|
ImageView getMenu;
|
||||||
ImageView msgBtn;
|
ImageView msgBtn;
|
||||||
ImageView likeImageView;
|
ImageView likeImageView;
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ class MainChannelAdapter1(private val mContext: Context, val key: String) :
|
|||||||
val mPhoto = holder.getView<SimpleDraweeView>(R.id.channel_anchor_id_photo_1)
|
val mPhoto = holder.getView<SimpleDraweeView>(R.id.channel_anchor_id_photo_1)
|
||||||
val mCost = holder.getView<TextView>(R.id.channel_anchor_id_cost_1)
|
val mCost = holder.getView<TextView>(R.id.channel_anchor_id_cost_1)
|
||||||
val mScore = holder.getView<TextView>(R.id.channel_anchor_id_score_1)
|
val mScore = holder.getView<TextView>(R.id.channel_anchor_id_score_1)
|
||||||
|
val nmpp = holder.getView<TextView>(R.id.iv_anchor_nm_img)
|
||||||
|
val online = holder.getView<TextView>(R.id.iv_anchor_online)
|
||||||
val mLocation = holder.getView<TextView>(R.id.channel_anchor_location_1)
|
val mLocation = holder.getView<TextView>(R.id.channel_anchor_location_1)
|
||||||
val newPeopleImageView = holder.getView<ImageView>(R.id.newPeopleImageView)
|
val newPeopleImageView = holder.getView<ImageView>(R.id.newPeopleImageView)
|
||||||
val iv_anchor_tag = holder.getView<ImageView>(R.id.iv_anchor_tag)
|
val iv_anchor_tag = holder.getView<ImageView>(R.id.iv_anchor_tag)
|
||||||
|
|||||||
@@ -0,0 +1,152 @@
|
|||||||
|
package com.fengliyan.tianlesue.controller.main.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.facebook.drawee.view.SimpleDraweeView;
|
||||||
|
import com.fengliyan.tianlesue.R;
|
||||||
|
import com.fengliyan.tianlesue.im.uikit.api.NimUIKit;
|
||||||
|
import com.fengliyan.tianlesue.model.main.AnchorBean;
|
||||||
|
import com.fengliyan.tianlesue.utils.StrU;
|
||||||
|
import com.fengliyan.tianlesue.view.main.MainPageActivity;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by zhangbin on 2018/12/7.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class MainChannelDefaultAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||||
|
|
||||||
|
private List<AnchorBean> anchorBeans = new ArrayList<>();
|
||||||
|
|
||||||
|
private Context context;
|
||||||
|
// private int[] mImage_bg;
|
||||||
|
|
||||||
|
public boolean isShowNewPeople() {
|
||||||
|
return showNewPeople;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShowNewPeople(boolean showNewPeople) {
|
||||||
|
this.showNewPeople = showNewPeople;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean showNewPeople;
|
||||||
|
|
||||||
|
public MainChannelDefaultAdapter(Context context) {
|
||||||
|
this.context = context;
|
||||||
|
// this.mImage_bg = mImage_bg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnchorListBeans(List<AnchorBean> beans) {
|
||||||
|
anchorBeans = beans;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
View view = View.inflate(context, R.layout.item_channel_anchor_default, null);
|
||||||
|
RecyclerView.ViewHolder holder = new ChannelHolder(view);
|
||||||
|
return holder;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
|
||||||
|
if (holder instanceof ChannelHolder) {
|
||||||
|
setMainChannel((ChannelHolder) holder, position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setMainChannel(ChannelHolder holder, int position) {
|
||||||
|
final AnchorBean bean = anchorBeans.get(position);
|
||||||
|
|
||||||
|
int x = (int) (Math.random() * 6);
|
||||||
|
// holder.mPhoto.setBackgroundColor(mImage_bg[x]);
|
||||||
|
holder.mPhoto.setImageURI(StrU.getResourcePath(bean.getCover(), context));
|
||||||
|
|
||||||
|
// RequestOptions requestOptions = new RequestOptions();
|
||||||
|
// requestOptions
|
||||||
|
// .placeholder(mImage_bg[x])
|
||||||
|
// .transform(new GlideRoundTransform2(context, 32));
|
||||||
|
// Glide.with(context).load(ConstUrl.IMAGE_URL + bean.getCover())
|
||||||
|
// .apply(requestOptions)
|
||||||
|
// .into(holder.mPhoto);
|
||||||
|
holder.mCost.setText(bean.getNickname());
|
||||||
|
holder.mScore.setText("评分:" + bean.getGive_score());
|
||||||
|
// holder.mScore.setText(bean.getAge() + "岁");
|
||||||
|
holder.mLocation.setText(bean.getCity());
|
||||||
|
if (bean.getAnchor_tag() == 1) {
|
||||||
|
holder.iv_anchor_tag.setVisibility(View.VISIBLE);
|
||||||
|
holder.iv_anchor_tag.setImageResource(R.drawable.ic_anchor_tag1);
|
||||||
|
holder.newPeopleImageView.setVisibility(View.INVISIBLE);
|
||||||
|
} else if (bean.getAnchor_tag() == 2) {
|
||||||
|
holder.iv_anchor_tag.setVisibility(View.VISIBLE);
|
||||||
|
holder.iv_anchor_tag.setImageResource(R.drawable.ic_anchor_tag2);
|
||||||
|
holder.newPeopleImageView.setVisibility(View.INVISIBLE);
|
||||||
|
} else {
|
||||||
|
holder.iv_anchor_tag.setVisibility(View.GONE);
|
||||||
|
if (showNewPeople) {
|
||||||
|
if (bean.getMark() == 2) {
|
||||||
|
holder.newPeopleImageView.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
holder.newPeopleImageView.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
holder.mThisView.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent(context, MainPageActivity.class);
|
||||||
|
intent.putExtra("userId", bean.getUserid());
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
holder.tv_chat.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
NimUIKit.startP2PSession(context, bean.getUserid() + "");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return anchorBeans.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemViewType(int position) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChannelHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
SimpleDraweeView mPhoto;
|
||||||
|
ImageView newPeopleImageView;
|
||||||
|
TextView mCost;
|
||||||
|
TextView mScore;
|
||||||
|
TextView mLocation;
|
||||||
|
ImageView iv_anchor_tag;
|
||||||
|
View mThisView;
|
||||||
|
TextView tv_chat;
|
||||||
|
|
||||||
|
public ChannelHolder(View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
mPhoto = itemView.findViewById(R.id.channel_anchor_id_photo_1);
|
||||||
|
mCost = itemView.findViewById(R.id.channel_anchor_id_cost_1);
|
||||||
|
mScore = itemView.findViewById(R.id.channel_anchor_id_score_1);
|
||||||
|
mLocation = itemView.findViewById(R.id.channel_anchor_location_1);
|
||||||
|
newPeopleImageView = itemView.findViewById(R.id.newPeopleImageView);
|
||||||
|
iv_anchor_tag = itemView.findViewById(R.id.iv_anchor_tag);
|
||||||
|
tv_chat = itemView.findViewById(R.id.tv_chat);
|
||||||
|
mThisView = itemView;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,4 +17,5 @@ public class Constans {
|
|||||||
public final static String CUSTOMER_TAG_STICKY = "CUSTOMER_TAG_STICKY";//取消默认客服置顶
|
public final static String CUSTOMER_TAG_STICKY = "CUSTOMER_TAG_STICKY";//取消默认客服置顶
|
||||||
public final static String USER_MOBILE = "USER_MOBILE";
|
public final static String USER_MOBILE = "USER_MOBILE";
|
||||||
public final static String IS_FIRST_RECHARGE = "IS_FIRST_RECHARGE";
|
public final static String IS_FIRST_RECHARGE = "IS_FIRST_RECHARGE";
|
||||||
|
public final static String IS_SET_HOME_ACTIVITY = "IS_SET_HOME_ACTIVITY";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,484 @@
|
|||||||
|
package com.fengliyan.tianlesue.view.main;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
|
||||||
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
import com.facebook.drawee.view.SimpleDraweeView;
|
||||||
|
import com.fengliyan.tianlesue.R;
|
||||||
|
import com.fengliyan.tianlesue.controller.constant.ConstUrl;
|
||||||
|
import com.fengliyan.tianlesue.controller.main.adapter.MainChannelAdapter1;
|
||||||
|
import com.fengliyan.tianlesue.controller.main.adapter.MainChannelDefaultAdapter;
|
||||||
|
import com.fengliyan.tianlesue.controller.main.manager.MainManager;
|
||||||
|
import com.fengliyan.tianlesue.model.main.AnchorBean;
|
||||||
|
import com.fengliyan.tianlesue.model.main.BannerBean;
|
||||||
|
import com.fengliyan.tianlesue.model.main.ChannelAnchorBean;
|
||||||
|
import com.fengliyan.tianlesue.utils.BaseUtils;
|
||||||
|
import com.fengliyan.tianlesue.utils.GlideImageLoader;
|
||||||
|
import com.fengliyan.tianlesue.utils.StrU;
|
||||||
|
import com.fengliyan.tianlesue.view.base.BaseActivity;
|
||||||
|
import com.fengliyan.tianlesue.view.base.utils.HttpUiCallBack;
|
||||||
|
import com.fengliyan.tianlesue.view.main.utils.JumpUtils;
|
||||||
|
import com.fengliyan.tianlesue.view.rank.ZhiRankActivity;
|
||||||
|
import com.fengliyan.uikit.adboard.AdPagesManager;
|
||||||
|
import com.google.android.material.appbar.AppBarLayout;
|
||||||
|
import com.youth.banner.Banner;
|
||||||
|
import com.youth.banner.listener.OnBannerListener;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by zhangbin on 2019/1/11.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class DefaultRecommendFragment extends Fragment implements View.OnClickListener {
|
||||||
|
|
||||||
|
private RecyclerView mRvMainChannel;
|
||||||
|
// private MainChannelAdapter mAdapter;
|
||||||
|
private MainChannelDefaultAdapter mAdapter;
|
||||||
|
|
||||||
|
private List<AnchorBean> mChannelAnchors = new ArrayList<>();
|
||||||
|
private int[] mImage_bg;
|
||||||
|
private SwipeRefreshLayout mChannelRefresh;
|
||||||
|
private Banner mImageBanner;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
View v = inflater.inflate(R.layout.fragment_recommend1, container, false);
|
||||||
|
mImage_bg = new int[]{getColor("#e5c9c9"), getColor("#c9d8e5"), getColor("#c9d3c1"), getColor("#cbcbc8"), getColor("#d3cbe4"), getColor("#cdd1d6")};
|
||||||
|
// mImage_bg = new int[]{R.drawable.shape_bg_1, R.drawable.shape_bg_2, R.drawable.shape_bg_3, R.drawable.shape_bg_4, R.drawable.shape_bg_5, R.drawable.shape_bg_6};
|
||||||
|
initView(v);
|
||||||
|
mPage = 1;
|
||||||
|
getChannelData(mPage);
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getColor(String color) {
|
||||||
|
return Color.parseColor(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
private View mPageView;
|
||||||
|
private ViewPager mViewPager;
|
||||||
|
private ViewGroup mGroup;
|
||||||
|
private AdPagesManager mManager;
|
||||||
|
private List<BannerBean> mBanners = new ArrayList<>();
|
||||||
|
private SimpleDraweeView mLoveRank1;
|
||||||
|
private SimpleDraweeView mLoveRank2;
|
||||||
|
private SimpleDraweeView mLoveRank3;
|
||||||
|
private View mLoveRankLayout;
|
||||||
|
private SimpleDraweeView mWealthRank1;
|
||||||
|
private SimpleDraweeView mWealthRank2;
|
||||||
|
private SimpleDraweeView mWealthRank3;
|
||||||
|
private View mWealthRankLayout;
|
||||||
|
|
||||||
|
private void initView(View v) {
|
||||||
|
|
||||||
|
|
||||||
|
mLoveRank1 = v.findViewById(R.id.recommend_love_1);
|
||||||
|
mLoveRank2 = v.findViewById(R.id.recommend_love_2);
|
||||||
|
mLoveRank3 = v.findViewById(R.id.recommend_love_3);
|
||||||
|
mLoveRankLayout = v.findViewById(R.id.recommend_love_rank);
|
||||||
|
mWealthRank1 = v.findViewById(R.id.recommend_wealth_1);
|
||||||
|
mWealthRank2 = v.findViewById(R.id.recommend_wealth_2);
|
||||||
|
mWealthRank3 = v.findViewById(R.id.recommend_wealth_3);
|
||||||
|
mWealthRankLayout = v.findViewById(R.id.recommend_wealth_rank);
|
||||||
|
|
||||||
|
mLoveRankLayout.setOnClickListener(this);
|
||||||
|
mWealthRankLayout.setOnClickListener(this);
|
||||||
|
|
||||||
|
mRvMainChannel = v.findViewById(R.id.rv_recommend_channel);
|
||||||
|
mRvMainChannel.setLayoutManager(new WrapStaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL) {
|
||||||
|
@Override
|
||||||
|
public boolean canScrollVertically() {
|
||||||
|
|
||||||
|
RecyclerView.LayoutManager mLayoutManager = mRvMainChannel.getLayoutManager();
|
||||||
|
int[] into = new int[((StaggeredGridLayoutManager) mLayoutManager).getSpanCount()];
|
||||||
|
int[] lastVisibleItemPositions = ((StaggeredGridLayoutManager) mLayoutManager).findLastVisibleItemPositions(into);
|
||||||
|
|
||||||
|
int lastVisibleItemPosition = lastVisibleItemPositions[1] + 1;
|
||||||
|
if (mChannelAnchors.size() != 0 && newPage < mPage && !isNodata && lastVisibleItemPosition > mChannelAnchors.size() - 2) {
|
||||||
|
getChannelData(mPage);
|
||||||
|
}
|
||||||
|
return super.canScrollVertically();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// mAdapter = new MainChannelAdapter(getActivity(), mImage_bg);
|
||||||
|
mAdapter = new MainChannelDefaultAdapter(getActivity());
|
||||||
|
mAdapter.setShowNewPeople(true);
|
||||||
|
/* mAdapter.setOnPlay(new MainChannelAdapter1.OnPlay() {
|
||||||
|
@Override
|
||||||
|
public void goPlayVideoList() {
|
||||||
|
if (beanList != null && beanList.size() > 0) {
|
||||||
|
Intent intent = new Intent(getContext(), PlayVideoActivity.class);
|
||||||
|
intent.putExtra("videoUrlList", (Serializable) beanList);
|
||||||
|
intent.putExtra("position", videoPosition - 1);
|
||||||
|
intent.putExtra("page", page);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getVideo(@NonNull AnchorBean data) {
|
||||||
|
isPlay = true;
|
||||||
|
if (isResume) {
|
||||||
|
setVideoBean();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});*/
|
||||||
|
// mAdapter.setAnchorListBeans(mChannelAnchors);
|
||||||
|
mRvMainChannel.setAdapter(mAdapter);
|
||||||
|
|
||||||
|
mChannelRefresh = v.findViewById(R.id.channel_refresh);
|
||||||
|
|
||||||
|
mChannelRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||||
|
@Override
|
||||||
|
public void onRefresh() {
|
||||||
|
mPage = 1;
|
||||||
|
page = 1;
|
||||||
|
videoPosition = 0;
|
||||||
|
beanList.clear();
|
||||||
|
//mAdapter.setPlay(false);
|
||||||
|
getChannelData(mPage);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
AppBarLayout appBarLayout = v.findViewById(R.id.channel_app_bar);
|
||||||
|
appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
|
||||||
|
if (verticalOffset == 0) {
|
||||||
|
mChannelRefresh.setEnabled(true);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
mChannelRefresh.setEnabled(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mBanners.clear();
|
||||||
|
mImageBanner = v.findViewById(R.id.image_banner);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChannelRefresh() {
|
||||||
|
mChannelRefresh.post(new Runnable() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
mChannelRefresh.setRefreshing(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> images = new ArrayList<>();
|
||||||
|
|
||||||
|
private void addBanner() {
|
||||||
|
// Iterator<BannerBean> bannerBeanIterator = mBanners.iterator();
|
||||||
|
// mManager.clear();
|
||||||
|
// while (bannerBeanIterator.hasNext()) {
|
||||||
|
// BannerBean bannerBean = bannerBeanIterator.next();
|
||||||
|
// mManager.addImageViewByUrl(ConstUrl.IMAGE_URL + bannerBean.getImage());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// mManager.manage();
|
||||||
|
images.clear();
|
||||||
|
if (null != mBanners) {
|
||||||
|
if (mBanners.size() != 0) {
|
||||||
|
for (int i = 0; i < mBanners.size(); i++) {
|
||||||
|
images.add(StrU.getResourcePath(mBanners.get(i).getImage(), getActivity()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//简单使用
|
||||||
|
BaseUtils.setBannerLayoutParams(mImageBanner).setImages(images)
|
||||||
|
.setImageLoader(new GlideImageLoader())
|
||||||
|
.setOnBannerListener(new OnBannerListener() {
|
||||||
|
@Override
|
||||||
|
public void OnBannerClick(int position) {
|
||||||
|
if (null != mBanners) {
|
||||||
|
int size = mBanners.size();
|
||||||
|
if (size != 0) {
|
||||||
|
int i = position % size;
|
||||||
|
JumpUtils.jump(mBanners.get(i).getLink_type(),
|
||||||
|
mBanners.get(i).getLink_url(), getActivity());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setDelayTime(3000)
|
||||||
|
.start()
|
||||||
|
.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageSelected(int position) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageScrollStateChanged(int state) {
|
||||||
|
if (state == 1) {
|
||||||
|
mChannelRefresh.setEnabled(false);//设置不可触发
|
||||||
|
} else if (state == 2) {
|
||||||
|
mChannelRefresh.setEnabled(true);//设置可触发
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
isResume = true;
|
||||||
|
if (isPlay) {
|
||||||
|
// setVideoBean();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
isResume = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
super.onDestroyView();
|
||||||
|
isResume = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isPlay;
|
||||||
|
private boolean isResume;
|
||||||
|
private int mPage = 1;
|
||||||
|
private int newPage = 1;
|
||||||
|
private boolean isNodata;
|
||||||
|
|
||||||
|
private void getChannelData(int page) {
|
||||||
|
newPage = page;
|
||||||
|
MainManager.getRecommendAnchors((BaseActivity) getActivity(), mPage, new HttpUiCallBack<ChannelAnchorBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, ChannelAnchorBean result, String message) {
|
||||||
|
if (null != result) {
|
||||||
|
if (null != result.getList()) {
|
||||||
|
if (null != result.getList().getList()) {
|
||||||
|
if (result.getList().getList().size() == 0) {
|
||||||
|
isNodata = true;
|
||||||
|
} else {
|
||||||
|
isNodata = false;
|
||||||
|
if (mPage == 1) {
|
||||||
|
mChannelAnchors.clear();
|
||||||
|
mChannelAnchors.addAll(result.getList().getList());
|
||||||
|
mAdapter.setAnchorListBeans(result.getList().getList());
|
||||||
|
} else {
|
||||||
|
List<AnchorBean> list = result.getList().getList();
|
||||||
|
// 创建一个临时列表存储去重后的数据
|
||||||
|
List<AnchorBean> filteredList = new ArrayList<>();
|
||||||
|
for (AnchorBean newAnchor : list) {
|
||||||
|
boolean duplicate = false;
|
||||||
|
// 检查是否在mChannelAnchors中已存在
|
||||||
|
for (AnchorBean existingAnchor : mChannelAnchors) {
|
||||||
|
if (newAnchor.getUserid() == existingAnchor.getUserid()) {
|
||||||
|
duplicate = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 如果不是重复数据,则添加到过滤列表
|
||||||
|
if (!duplicate) {
|
||||||
|
filteredList.add(newAnchor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 添加去重后的数据
|
||||||
|
mChannelAnchors.addAll(filteredList);
|
||||||
|
mAdapter.setAnchorListBeans(filteredList);
|
||||||
|
}
|
||||||
|
// if (mPage == 1 && result.getVideo_list() != null) {
|
||||||
|
// getCoverVideo();
|
||||||
|
//// result.getVideo_list().setVideo(true);
|
||||||
|
//// beanList.add(result.getVideo_list());
|
||||||
|
//// mChannelAnchors.add(3, result.getVideo_list());
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mPage == 1) {
|
||||||
|
if (null != mBanners && mBanners.size() == 0) {
|
||||||
|
mBanners = result.getBanner();
|
||||||
|
// addBanner();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null != result.getRank()) {
|
||||||
|
if (null != result.getRank().getLove_rank()) {
|
||||||
|
int size = result.getRank().getLove_rank().size();
|
||||||
|
if (size == 1) {
|
||||||
|
mLoveRank1.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getLove_rank().get(0).getAvatar());
|
||||||
|
} else if (size == 2) {
|
||||||
|
mLoveRank1.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getLove_rank().get(0).getAvatar());
|
||||||
|
mLoveRank2.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getLove_rank().get(1).getAvatar());
|
||||||
|
} else if (size == 3) {
|
||||||
|
mLoveRank1.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getLove_rank().get(0).getAvatar());
|
||||||
|
mLoveRank2.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getLove_rank().get(1).getAvatar());
|
||||||
|
mLoveRank3.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getLove_rank().get(2).getAvatar());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null != result.getRank().getWealth_rank()) {
|
||||||
|
int size = result.getRank().getWealth_rank().size();
|
||||||
|
if (size == 1) {
|
||||||
|
mWealthRank1.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getWealth_rank().get(0).getAvatar());
|
||||||
|
} else if (size == 2) {
|
||||||
|
mWealthRank1.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getWealth_rank().get(0).getAvatar());
|
||||||
|
mWealthRank2.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getWealth_rank().get(1).getAvatar());
|
||||||
|
} else if (size == 3) {
|
||||||
|
mWealthRank1.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getWealth_rank().get(0).getAvatar());
|
||||||
|
mWealthRank2.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getWealth_rank().get(1).getAvatar());
|
||||||
|
mWealthRank3.setImageURI(ConstUrl.IMAGE_URL +
|
||||||
|
result.getRank().getWealth_rank().get(2).getAvatar());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mPage++;
|
||||||
|
mChannelRefresh.setRefreshing(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
mChannelRefresh.setRefreshing(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
mChannelRefresh.setRefreshing(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<AnchorBean> beanList = new ArrayList<>();
|
||||||
|
private int videoPosition = 0;
|
||||||
|
private int page = 1;
|
||||||
|
private boolean canRemove;
|
||||||
|
|
||||||
|
/*private void setVideoBean() {
|
||||||
|
if (beanList.size() > videoPosition) {
|
||||||
|
AnchorBean bean = beanList.get(videoPosition);
|
||||||
|
bean.setVideo(true);
|
||||||
|
if (videoPosition == 0) {
|
||||||
|
mAdapter.setAnchorListBeans(3, bean);
|
||||||
|
mChannelAnchors.add(3, bean);
|
||||||
|
} else {
|
||||||
|
mAdapter.setData(3, bean);
|
||||||
|
mChannelAnchors.set(3, bean);
|
||||||
|
}
|
||||||
|
canRemove = true;
|
||||||
|
isPlay = false;
|
||||||
|
videoPosition++;
|
||||||
|
} else {
|
||||||
|
getCoverVideo();
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
private void getCoverVideo() {
|
||||||
|
MainManager.getCoverVideo((BaseActivity) getActivity(), page, new HttpUiCallBack<ChannelAnchorBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, ChannelAnchorBean result, String message) {
|
||||||
|
if (null != result) {
|
||||||
|
if (null != result.getList()) {
|
||||||
|
if (null != result.getList().getList() && result.getList().getList().size() > 0) {
|
||||||
|
if (mAdapter.getItemCount() > 3) {
|
||||||
|
beanList.addAll(result.getList().getList());
|
||||||
|
// if (page == 1) {
|
||||||
|
// beanList.remove(0);
|
||||||
|
// }
|
||||||
|
//setVideoBean();
|
||||||
|
// AnchorBean bean = result.getList().getList().get(0);
|
||||||
|
// bean.setVideo(true);
|
||||||
|
// mAdapter.setData(3, bean);
|
||||||
|
// isPlay = false;
|
||||||
|
}
|
||||||
|
page++;
|
||||||
|
} else {
|
||||||
|
if (canRemove) {
|
||||||
|
// mAdapter.removeAt(3);
|
||||||
|
canRemove = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
mChannelRefresh.setRefreshing(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
mChannelRefresh.setRefreshing(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if (mLoveRankLayout == view) {
|
||||||
|
Intent intent = new Intent(getActivity(), ZhiRankActivity.class);
|
||||||
|
intent.putExtra("rankType", 0);
|
||||||
|
getActivity().startActivity(intent);
|
||||||
|
} else if (mWealthRankLayout == view) {
|
||||||
|
Intent intent = new Intent(getActivity(), ZhiRankActivity.class);
|
||||||
|
intent.putExtra("rankType", 1);
|
||||||
|
getActivity().startActivity(intent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void refresh() {
|
||||||
|
mPage = 1;
|
||||||
|
page = 1;
|
||||||
|
videoPosition = 0;
|
||||||
|
beanList.clear();
|
||||||
|
if (getActivity() != null) {
|
||||||
|
/*if (mAdapter != null) {
|
||||||
|
mAdapter.setPlay(false);
|
||||||
|
}*/
|
||||||
|
getChannelData(mPage);
|
||||||
|
}
|
||||||
|
if (null != mRvMainChannel) {
|
||||||
|
mRvMainChannel.scrollToPosition(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -888,6 +888,9 @@ public class MainActivity extends BaseActivity implements DemoHelper.AppIdsUpdat
|
|||||||
}
|
}
|
||||||
} else if (position == 0) { //重新点击回来,检测版本更新
|
} else if (position == 0) { //重新点击回来,检测版本更新
|
||||||
checkUpdate();
|
checkUpdate();
|
||||||
|
if (null != mMainRecommendFragment) {
|
||||||
|
mMainRecommendFragment.RefreshFragment();
|
||||||
|
}
|
||||||
} else if (position == 3) {
|
} else if (position == 3) {
|
||||||
// MaleToast.showMessage(MainActivity.this,"点击了消息");
|
// MaleToast.showMessage(MainActivity.this,"点击了消息");
|
||||||
getGreet();
|
getGreet();
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import com.fengliyan.tianlesue.controller.main.manager.MainManager;
|
|||||||
import com.fengliyan.tianlesue.controller.settings.manager.SettingManager;
|
import com.fengliyan.tianlesue.controller.settings.manager.SettingManager;
|
||||||
import com.fengliyan.tianlesue.controller.user.manager.UserManager;
|
import com.fengliyan.tianlesue.controller.user.manager.UserManager;
|
||||||
import com.fengliyan.tianlesue.im.uikit.common.Constans;
|
import com.fengliyan.tianlesue.im.uikit.common.Constans;
|
||||||
|
import com.fengliyan.tianlesue.im.uikit.common.ToastHelper;
|
||||||
import com.fengliyan.tianlesue.model.settings.RechargeListBean;
|
import com.fengliyan.tianlesue.model.settings.RechargeListBean;
|
||||||
import com.fengliyan.tianlesue.utils.NoClearSPUtils;
|
import com.fengliyan.tianlesue.utils.NoClearSPUtils;
|
||||||
import com.fengliyan.tianlesue.utils.SPUtils;
|
import com.fengliyan.tianlesue.utils.SPUtils;
|
||||||
@@ -38,6 +39,8 @@ import com.fengliyan.tianlesue.view.base.BaseActivity;
|
|||||||
import com.fengliyan.tianlesue.view.base.utils.HttpUiCallBack;
|
import com.fengliyan.tianlesue.view.base.utils.HttpUiCallBack;
|
||||||
import com.fengliyan.tianlesue.view.base.utils.view.LuckWheelDialog;
|
import com.fengliyan.tianlesue.view.base.utils.view.LuckWheelDialog;
|
||||||
import com.fengliyan.tianlesue.view.main.dialog.CustomAlertDialog;
|
import com.fengliyan.tianlesue.view.main.dialog.CustomAlertDialog;
|
||||||
|
import com.fengliyan.tianlesue.view.main.dialog.NiMingPiPeiDialog;
|
||||||
|
import com.fengliyan.tianlesue.view.main.dialog.ShaiXuanDialog;
|
||||||
import com.fengliyan.tianlesue.view.rank.ZhiRankActivity;
|
import com.fengliyan.tianlesue.view.rank.ZhiRankActivity;
|
||||||
import com.fengliyan.tianlesue.view.settings.InvitationActivity;
|
import com.fengliyan.tianlesue.view.settings.InvitationActivity;
|
||||||
import com.fengliyan.tianlesue.view.settings.dialog.GirlAuthDialog;
|
import com.fengliyan.tianlesue.view.settings.dialog.GirlAuthDialog;
|
||||||
@@ -78,13 +81,22 @@ public class MainRecommendFragment extends Fragment implements View.OnClickListe
|
|||||||
private ImageView mIvTitleSearch;
|
private ImageView mIvTitleSearch;
|
||||||
private View mVyaoqingLayout;
|
private View mVyaoqingLayout;
|
||||||
private LinearLayout main_turntable;
|
private LinearLayout main_turntable;
|
||||||
|
private LinearLayout main_first_chong_layout;
|
||||||
private ImageView main_turntable_end, iv_main_turntable;
|
private ImageView main_turntable_end, iv_main_turntable;
|
||||||
|
private ImageView main_first_chong_end, main_first_chong;
|
||||||
|
private LinearLayout ll_main_home_title;
|
||||||
|
private RelativeLayout rl_video_pp;
|
||||||
|
private RelativeLayout rl_audio_pp;
|
||||||
|
private NiMingPiPeiDialog niMingPiPeiDialog;
|
||||||
|
private TextView tv_suaixuan;
|
||||||
|
private DefaultRecommendFragment defaultRecommendFragment;
|
||||||
|
private ShaiXuanDialog shaiXuanDialog;
|
||||||
|
|
||||||
@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_main_recommend, container, false);
|
View v = inflater.inflate(R.layout.fragment_main_recommend, container, false);
|
||||||
|
ll_main_home_title = v.findViewById(R.id.ll_main_home_title);
|
||||||
initTitle();
|
initTitle();
|
||||||
initView(v);
|
initView(v);
|
||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
@@ -97,18 +109,34 @@ public class MainRecommendFragment extends Fragment implements View.OnClickListe
|
|||||||
private ImageView iv_title_rank;
|
private ImageView iv_title_rank;
|
||||||
|
|
||||||
private void initTitle() {
|
private void initTitle() {
|
||||||
Title title = ((BaseActivity) getActivity()).getCustomTitle();
|
/*Title title = ((BaseActivity) getActivity()).getCustomTitle();
|
||||||
title.setVisibility(View.VISIBLE);
|
title.setVisibility(View.VISIBLE);
|
||||||
title.findViewById(R.id.title_bg).setBackgroundColor(Color.WHITE);
|
title.findViewById(R.id.title_bg).setBackgroundColor(Color.WHITE);
|
||||||
title.dismissBottomLine();
|
title.dismissBottomLine();
|
||||||
title.dimissRight();
|
title.dimissRight();
|
||||||
title.dismissLeft();
|
title.dismissLeft();
|
||||||
title.setTitle("");
|
title.setTitle("");*/
|
||||||
mSearchView = View.inflate(getActivity(), R.layout.item_main_home_page_layout, null);
|
|
||||||
mIvTitleSearch = mSearchView.findViewById(R.id.iv_title_search);
|
|
||||||
mGenderView = mSearchView.findViewById(R.id.iv_title_gender);
|
|
||||||
iv_title_rank = mSearchView.findViewById(R.id.iv_title_rank);
|
|
||||||
|
|
||||||
|
int isSetHome = StorageManager.getInstance(getActivity()).getInt(Constans.IS_SET_HOME_ACTIVITY);
|
||||||
|
if(isSetHome == 0){//未设置成为主页
|
||||||
|
mSearchView = View.inflate(getActivity(), R.layout.item_main_home_page_layout_1, null);
|
||||||
|
tv_suaixuan = mSearchView.findViewById(R.id.tv_suaixuan);
|
||||||
|
tv_suaixuan.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
//TODO 筛选
|
||||||
|
shaiXuanDialog = new ShaiXuanDialog(getActivity(), R.style.SelectiveDialog);
|
||||||
|
shaiXuanDialog.show();
|
||||||
|
shaiXuanDialog.setRightOnClickListener(new ShaiXuanDialog.OnDialogRightClickListener() {
|
||||||
|
@Override
|
||||||
|
public void rightClick(int isSelect) {
|
||||||
|
ToastHelper.showToast(getContext(),"选择了 " + isSelect);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else { //设置成为主页
|
||||||
|
mSearchView = View.inflate(getActivity(), R.layout.item_main_home_page_layout, null);
|
||||||
mRecommend_recommend = mSearchView.findViewById(R.id.title_view_1);
|
mRecommend_recommend = mSearchView.findViewById(R.id.title_view_1);
|
||||||
mRecommend_active = mSearchView.findViewById(R.id.title_view_2);
|
mRecommend_active = mSearchView.findViewById(R.id.title_view_2);
|
||||||
mRecommend_people = mSearchView.findViewById(R.id.title_view_3);
|
mRecommend_people = mSearchView.findViewById(R.id.title_view_3);
|
||||||
@@ -144,7 +172,11 @@ public class MainRecommendFragment extends Fragment implements View.OnClickListe
|
|||||||
mRecommend_recommend.setOnClickListener(this);
|
mRecommend_recommend.setOnClickListener(this);
|
||||||
mRecommend_active.setOnClickListener(this);
|
mRecommend_active.setOnClickListener(this);
|
||||||
mRecommend_people.setOnClickListener(this);
|
mRecommend_people.setOnClickListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
mIvTitleSearch = mSearchView.findViewById(R.id.iv_title_search);
|
||||||
|
mGenderView = mSearchView.findViewById(R.id.iv_title_gender);
|
||||||
|
iv_title_rank = mSearchView.findViewById(R.id.iv_title_rank);
|
||||||
|
|
||||||
// if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 2) {
|
// if (SPUtils.getInt(getActivity(), ConsUser.GENDER) == 2) {
|
||||||
// mGenderView.setText("女生");
|
// mGenderView.setText("女生");
|
||||||
@@ -152,7 +184,8 @@ public class MainRecommendFragment extends Fragment implements View.OnClickListe
|
|||||||
// mGenderView.setText("男生");
|
// mGenderView.setText("男生");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
title.addViewTo(mSearchView, POSTION_CENTER);
|
//title.addViewTo(mSearchView, POSTION_CENTER);
|
||||||
|
ll_main_home_title.addView(mSearchView);
|
||||||
|
|
||||||
iv_title_rank.setOnClickListener(new View.OnClickListener() {
|
iv_title_rank.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -233,25 +266,43 @@ public class MainRecommendFragment extends Fragment implements View.OnClickListe
|
|||||||
mIvAd.setOnClickListener(this);
|
mIvAd.setOnClickListener(this);
|
||||||
v.findViewById(R.id.main_yaoqing_end).setOnClickListener(this);
|
v.findViewById(R.id.main_yaoqing_end).setOnClickListener(this);
|
||||||
|
|
||||||
|
rl_video_pp = v.findViewById(R.id.rl_video_pp);
|
||||||
|
rl_audio_pp = v.findViewById(R.id.rl_audio_pp);
|
||||||
|
|
||||||
mMainViewPager = v.findViewById(R.id.main_view_pager);
|
mMainViewPager = v.findViewById(R.id.main_view_pager);
|
||||||
|
|
||||||
main_turntable = v.findViewById(R.id.main_turntable);
|
main_turntable = v.findViewById(R.id.main_turntable);
|
||||||
|
main_first_chong_layout = v.findViewById(R.id.main_first_chong_layout);
|
||||||
main_turntable_end = v.findViewById(R.id.main_turntable_end);
|
main_turntable_end = v.findViewById(R.id.main_turntable_end);
|
||||||
|
main_first_chong_end = v.findViewById(R.id.main_first_chong_end);
|
||||||
iv_main_turntable = v.findViewById(R.id.iv_main_turntable);
|
iv_main_turntable = v.findViewById(R.id.iv_main_turntable);
|
||||||
|
main_first_chong = v.findViewById(R.id.main_first_chong);
|
||||||
main_turntable.setOnClickListener(this);
|
main_turntable.setOnClickListener(this);
|
||||||
|
main_first_chong_layout.setOnClickListener(this);
|
||||||
main_turntable_end.setOnClickListener(this);
|
main_turntable_end.setOnClickListener(this);
|
||||||
|
main_first_chong_end.setOnClickListener(this);
|
||||||
|
rl_video_pp.setOnClickListener(this);
|
||||||
|
rl_audio_pp.setOnClickListener(this);
|
||||||
|
|
||||||
if (NoClearSPUtils.getInt(getContext(), Constans.MARKET_STATUS) == 0 || SPUtils.getInt(getContext(), ConsUser.TYPE) == 2) {
|
if (NoClearSPUtils.getInt(getContext(), Constans.MARKET_STATUS) == 0 || SPUtils.getInt(getContext(), ConsUser.TYPE) == 2) {
|
||||||
main_turntable.setVisibility(View.GONE);
|
main_turntable.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
main_turntable.setVisibility(View.VISIBLE);
|
main_turntable.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defaultRecommendFragment = new DefaultRecommendFragment();
|
||||||
mRecommendFragment1 = new RecommendFragment1();
|
mRecommendFragment1 = new RecommendFragment1();
|
||||||
mMainRecommendActiveFragment = new MainRecommendActiveFragment();
|
mMainRecommendActiveFragment = new MainRecommendActiveFragment();
|
||||||
mMainRecommendPeopleFragment = new MainRecommendPeopleFragment();
|
mMainRecommendPeopleFragment = new MainRecommendPeopleFragment();
|
||||||
mMainRecommendCityFragment = new MainRecommendCityFragment();
|
mMainRecommendCityFragment = new MainRecommendCityFragment();
|
||||||
|
|
||||||
|
int isSetHome = StorageManager.getInstance(getActivity()).getInt(Constans.IS_SET_HOME_ACTIVITY);
|
||||||
|
if(isSetHome == 0){ //未设置成为主页
|
||||||
|
mChannelFragments.add(defaultRecommendFragment);
|
||||||
|
}else {
|
||||||
mChannelFragments.add(mRecommendFragment1);
|
mChannelFragments.add(mRecommendFragment1);
|
||||||
|
}
|
||||||
|
|
||||||
mChannelFragments.add(mMainRecommendActiveFragment);
|
mChannelFragments.add(mMainRecommendActiveFragment);
|
||||||
mChannelFragments.add(mMainRecommendPeopleFragment);
|
mChannelFragments.add(mMainRecommendPeopleFragment);
|
||||||
if (NoClearSPUtils.getInt(getContext(), Constans.MARKET_STATUS) != 0 && SPUtils.getInt(getContext(), ConsUser.TYPE) != 2) {
|
if (NoClearSPUtils.getInt(getContext(), Constans.MARKET_STATUS) != 0 && SPUtils.getInt(getContext(), ConsUser.TYPE) != 2) {
|
||||||
@@ -263,7 +314,10 @@ public class MainRecommendFragment extends Fragment implements View.OnClickListe
|
|||||||
|
|
||||||
mMainViewPager.setAdapter(mViewPagerAdapter);
|
mMainViewPager.setAdapter(mViewPagerAdapter);
|
||||||
mMainViewPager.setOffscreenPageLimit(3);
|
mMainViewPager.setOffscreenPageLimit(3);
|
||||||
|
|
||||||
|
if(isSetHome != 0) { //未设置成为主页
|
||||||
viewPagerChange(1);
|
viewPagerChange(1);
|
||||||
|
}
|
||||||
|
|
||||||
mMainViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
mMainViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -278,8 +332,67 @@ public class MainRecommendFragment extends Fragment implements View.OnClickListe
|
|||||||
} else {
|
} else {
|
||||||
isReClick = false;
|
isReClick = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int isSetHome = StorageManager.getInstance(getActivity()).getInt(Constans.IS_SET_HOME_ACTIVITY);
|
||||||
|
if(isSetHome != 0) {
|
||||||
viewPagerChange(position);
|
viewPagerChange(position);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageScrollStateChanged(int state) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mViewPagerAdapter.notifyDataSetChanged();
|
||||||
|
mMainViewPager.setCurrentItem(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RefreshFragment(){
|
||||||
|
mChannelFragments.clear();
|
||||||
|
int isSetHome = StorageManager.getInstance(getActivity()).getInt(Constans.IS_SET_HOME_ACTIVITY);
|
||||||
|
if(isSetHome == 0){ //未设置成为主页
|
||||||
|
mChannelFragments.add(defaultRecommendFragment);
|
||||||
|
}else {
|
||||||
|
mChannelFragments.add(mRecommendFragment1);
|
||||||
|
}
|
||||||
|
|
||||||
|
mChannelFragments.add(mMainRecommendActiveFragment);
|
||||||
|
mChannelFragments.add(mMainRecommendPeopleFragment);
|
||||||
|
if (NoClearSPUtils.getInt(getContext(), Constans.MARKET_STATUS) != 0 && SPUtils.getInt(getContext(), ConsUser.TYPE) != 2) {
|
||||||
|
mChannelFragments.add(mMainRecommendCityFragment);
|
||||||
|
}
|
||||||
|
|
||||||
|
mViewPagerAdapter = new MainViewPagerAdapter(getChildFragmentManager(),
|
||||||
|
mChannelFragments);
|
||||||
|
|
||||||
|
mMainViewPager.setAdapter(mViewPagerAdapter);
|
||||||
|
mMainViewPager.setOffscreenPageLimit(3);
|
||||||
|
|
||||||
|
if(isSetHome != 0) { //未设置成为主页
|
||||||
|
viewPagerChange(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
mMainViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPageSelected(int position) {
|
||||||
|
if (position == 3) {
|
||||||
|
isReClick = true;
|
||||||
|
} else {
|
||||||
|
isReClick = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int isSetHome = StorageManager.getInstance(getActivity()).getInt(Constans.IS_SET_HOME_ACTIVITY);
|
||||||
|
if(isSetHome != 0) {
|
||||||
|
viewPagerChange(position);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageScrollStateChanged(int state) {
|
public void onPageScrollStateChanged(int state) {
|
||||||
@@ -295,7 +408,10 @@ public class MainRecommendFragment extends Fragment implements View.OnClickListe
|
|||||||
public void onHiddenChanged(boolean hidden) {
|
public void onHiddenChanged(boolean hidden) {
|
||||||
if (!hidden) {
|
if (!hidden) {
|
||||||
initTitle();
|
initTitle();
|
||||||
|
int isSetHome = StorageManager.getInstance(getActivity()).getInt(Constans.IS_SET_HOME_ACTIVITY);
|
||||||
|
if(isSetHome != 0) {
|
||||||
viewPagerChange(mIndex);
|
viewPagerChange(mIndex);
|
||||||
|
}
|
||||||
// if (UserManager.getUserInfo().getGender() == 2) {
|
// if (UserManager.getUserInfo().getGender() == 2) {
|
||||||
// getRechargeInfo();
|
// getRechargeInfo();
|
||||||
// }
|
// }
|
||||||
@@ -471,6 +587,28 @@ public class MainRecommendFragment extends Fragment implements View.OnClickListe
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
} else if (view.getId() == R.id.main_turntable_end) {
|
} else if (view.getId() == R.id.main_turntable_end) {
|
||||||
main_turntable.setVisibility(View.GONE);
|
main_turntable.setVisibility(View.GONE);
|
||||||
|
} else if (view.getId() == R.id.main_first_chong_layout) {
|
||||||
|
//TODO 首充特惠
|
||||||
|
} else if (view.getId() == R.id.main_first_chong_end) {
|
||||||
|
main_first_chong_layout.setVisibility(View.GONE);
|
||||||
|
}else if (view.getId() == R.id.rl_video_pp) {
|
||||||
|
//TODO 视频匹配
|
||||||
|
}else if (view.getId() == R.id.rl_audio_pp) {
|
||||||
|
//TODO 匿名匹配
|
||||||
|
niMingPiPeiDialog = new NiMingPiPeiDialog(getActivity(), R.style.SelectiveDialog);
|
||||||
|
niMingPiPeiDialog.show();
|
||||||
|
niMingPiPeiDialog.setOnDialogClickListener(new NiMingPiPeiDialog.OnDialogLeftClickListener() {
|
||||||
|
@Override
|
||||||
|
public void leftClick() {
|
||||||
|
ToastHelper.showToast(getActivity(),"语音匿名匹配");
|
||||||
|
}
|
||||||
|
}, new NiMingPiPeiDialog.OnDialogRightClickListener() {
|
||||||
|
@Override
|
||||||
|
public void rightClick() {
|
||||||
|
ToastHelper.showToast(getActivity(),"视频匿名匹配");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,6 +638,9 @@ public class MainRecommendFragment extends Fragment implements View.OnClickListe
|
|||||||
if (null != mRecommendFragment1) {
|
if (null != mRecommendFragment1) {
|
||||||
mRecommendFragment1.refresh();
|
mRecommendFragment1.refresh();
|
||||||
}
|
}
|
||||||
|
if(null != defaultRecommendFragment) {
|
||||||
|
defaultRecommendFragment.refresh();
|
||||||
|
}
|
||||||
} else if (mIndex == 1) {
|
} else if (mIndex == 1) {
|
||||||
if (null != mMainRecommendActiveFragment) {
|
if (null != mMainRecommendActiveFragment) {
|
||||||
mMainRecommendActiveFragment.refresh();
|
mMainRecommendActiveFragment.refresh();
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package com.fengliyan.tianlesue.view.main;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.fengliyan.storage.StorageManager;
|
||||||
|
import com.fengliyan.tianlesue.R;
|
||||||
|
import com.fengliyan.tianlesue.im.uikit.common.Constans;
|
||||||
|
import com.fengliyan.tianlesue.view.base.BaseActivity;
|
||||||
|
|
||||||
|
public class VideoFriendActivity extends BaseActivity {
|
||||||
|
|
||||||
|
private TextView tv_set_home;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_video_friend);
|
||||||
|
|
||||||
|
hideTitleBar();
|
||||||
|
|
||||||
|
initView();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
findViewById(R.id.rl_back).setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
tv_set_home = findViewById(R.id.tv_set_home);
|
||||||
|
|
||||||
|
tv_set_home.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if(StorageManager.getInstance(VideoFriendActivity.this).getInt(Constans.IS_SET_HOME_ACTIVITY) == 0) {
|
||||||
|
StorageManager.getInstance(VideoFriendActivity.this).putInt(Constans.IS_SET_HOME_ACTIVITY, 1);
|
||||||
|
tv_set_home.setText("取消首页");
|
||||||
|
}else {
|
||||||
|
StorageManager.getInstance(VideoFriendActivity.this).putInt(Constans.IS_SET_HOME_ACTIVITY, 0);
|
||||||
|
tv_set_home.setText("设为首页");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
RecommendFragment1 fragment = new RecommendFragment1();
|
||||||
|
setFragment(fragment);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setFragment(Fragment fragment) {
|
||||||
|
FragmentActivity fragmentActivity = (FragmentActivity) this;
|
||||||
|
try {
|
||||||
|
if (!fragment.isAdded()) {
|
||||||
|
fragmentActivity.getSupportFragmentManager().
|
||||||
|
beginTransaction().
|
||||||
|
add(R.id.content_frame_layout, fragment).
|
||||||
|
show(fragment).
|
||||||
|
commitAllowingStateLoss();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
fragmentActivity.getSupportFragmentManager().
|
||||||
|
beginTransaction().
|
||||||
|
show(fragment).
|
||||||
|
commitAllowingStateLoss();
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (IllegalStateException e) {
|
||||||
|
fragmentActivity.getSupportFragmentManager().
|
||||||
|
beginTransaction().
|
||||||
|
show(fragment).
|
||||||
|
commit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
package com.fengliyan.tianlesue.view.main.dialog;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.Typeface;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.fengliyan.tianlesue.R;
|
||||||
|
|
||||||
|
|
||||||
|
public class NiMingPiPeiDialog extends Dialog implements View.OnClickListener {
|
||||||
|
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
private OnDialogLeftClickListener leftOnClickListener;
|
||||||
|
private OnDialogRightClickListener rightOnClickListener;
|
||||||
|
private TextView tv_content;
|
||||||
|
private LinearLayout ll_nm_audio_call;
|
||||||
|
private LinearLayout ll_nm_video_call;
|
||||||
|
|
||||||
|
public NiMingPiPeiDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NiMingPiPeiDialog(Context context, boolean isBold) {
|
||||||
|
super(context);
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NiMingPiPeiDialog(@NonNull Context context, int themeResId) {
|
||||||
|
super(context, themeResId);
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected NiMingPiPeiDialog(@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.layout_nmpp_dialog);
|
||||||
|
initView();
|
||||||
|
|
||||||
|
Window window = this.getWindow();
|
||||||
|
window.setGravity(Gravity.BOTTOM);
|
||||||
|
WindowManager.LayoutParams lp = window.getAttributes();
|
||||||
|
DisplayMetrics dm = new DisplayMetrics();
|
||||||
|
dm = mContext.getResources().getDisplayMetrics();
|
||||||
|
lp.width = (int) ((dm.widthPixels) * 0.8);
|
||||||
|
lp.height = LinearLayout.LayoutParams.WRAP_CONTENT;
|
||||||
|
window.setAttributes(lp);
|
||||||
|
getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
tv_content = findViewById(R.id.tv_content);
|
||||||
|
ll_nm_audio_call = findViewById(R.id.ll_nm_audio_call);
|
||||||
|
ll_nm_video_call = findViewById(R.id.ll_nm_video_call);
|
||||||
|
|
||||||
|
findViewById(R.id.iv_close).setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
ll_nm_audio_call.setOnClickListener(this);
|
||||||
|
ll_nm_video_call.setOnClickListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
switch (v.getId()) {
|
||||||
|
case R.id.ll_nm_video_call:
|
||||||
|
if(rightOnClickListener != null) {
|
||||||
|
rightOnClickListener.rightClick();
|
||||||
|
}
|
||||||
|
dismiss();
|
||||||
|
break;
|
||||||
|
case R.id.ll_nm_audio_call:
|
||||||
|
if(leftOnClickListener != null){
|
||||||
|
leftOnClickListener.leftClick();
|
||||||
|
}
|
||||||
|
dismiss();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setOnDialogClickListener(OnDialogLeftClickListener leftOnClickListener, OnDialogRightClickListener rightOnClickListener) {
|
||||||
|
this.leftOnClickListener = leftOnClickListener;
|
||||||
|
this.rightOnClickListener = rightOnClickListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRightOnClickListener(OnDialogRightClickListener rightOnClickListener) {
|
||||||
|
this.rightOnClickListener = rightOnClickListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnDialogLeftClickListener {
|
||||||
|
void leftClick();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnDialogRightClickListener {
|
||||||
|
void rightClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
package com.fengliyan.tianlesue.view.main.dialog;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.DisplayMetrics;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.fengliyan.tianlesue.R;
|
||||||
|
|
||||||
|
|
||||||
|
public class ShaiXuanDialog extends Dialog implements View.OnClickListener {
|
||||||
|
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
private OnDialogLeftClickListener leftOnClickListener;
|
||||||
|
private OnDialogRightClickListener rightOnClickListener;
|
||||||
|
private TextView tv_all;
|
||||||
|
private TextView tv_boy;
|
||||||
|
private TextView tv_girl;
|
||||||
|
private LinearLayout ll_nm_video_call;
|
||||||
|
|
||||||
|
public ShaiXuanDialog(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShaiXuanDialog(Context context, boolean isBold) {
|
||||||
|
super(context);
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShaiXuanDialog(@NonNull Context context, int themeResId) {
|
||||||
|
super(context, themeResId);
|
||||||
|
mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ShaiXuanDialog(@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.layout_shaixuan_dialog);
|
||||||
|
initView();
|
||||||
|
|
||||||
|
Window window = this.getWindow();
|
||||||
|
window.setGravity(Gravity.BOTTOM);
|
||||||
|
WindowManager.LayoutParams lp = window.getAttributes();
|
||||||
|
DisplayMetrics dm = new DisplayMetrics();
|
||||||
|
dm = mContext.getResources().getDisplayMetrics();
|
||||||
|
lp.width = (int) ((dm.widthPixels) * 0.8);
|
||||||
|
lp.height = LinearLayout.LayoutParams.WRAP_CONTENT;
|
||||||
|
window.setAttributes(lp);
|
||||||
|
getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
}
|
||||||
|
|
||||||
|
public int isSelect = 0; // 0全部,1男,2女
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
tv_all = findViewById(R.id.tv_all);
|
||||||
|
tv_boy = findViewById(R.id.tv_boy);
|
||||||
|
tv_girl = findViewById(R.id.tv_girl);
|
||||||
|
|
||||||
|
setTxtStyle(tv_all,tv_boy,tv_girl);
|
||||||
|
|
||||||
|
ll_nm_video_call = findViewById(R.id.ll_nm_video_call);
|
||||||
|
|
||||||
|
findViewById(R.id.iv_close).setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
ll_nm_video_call.setOnClickListener(this);
|
||||||
|
|
||||||
|
tv_all.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
isSelect = 0;
|
||||||
|
setTxtStyle(tv_all,tv_boy,tv_girl);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tv_boy.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
isSelect = 1;
|
||||||
|
setTxtStyle(tv_boy,tv_all,tv_girl);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
tv_girl.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
isSelect = 2;
|
||||||
|
setTxtStyle(tv_girl,tv_boy,tv_all);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtStyle(TextView textView1,TextView textView2,TextView textView3){
|
||||||
|
textView1.setTextColor(Color.parseColor("#ffffff"));
|
||||||
|
textView1.setBackground(mContext.getResources().getDrawable(R.drawable.bg_fb65fd));
|
||||||
|
textView2.setTextColor(Color.parseColor("#999999"));
|
||||||
|
textView2.setBackground(mContext.getResources().getDrawable(R.drawable.bg_999999_t10));
|
||||||
|
textView3.setTextColor(Color.parseColor("#999999"));
|
||||||
|
textView3.setBackground(mContext.getResources().getDrawable(R.drawable.bg_999999_t10));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
switch (v.getId()) {
|
||||||
|
case R.id.ll_nm_video_call:
|
||||||
|
if(rightOnClickListener != null) {
|
||||||
|
rightOnClickListener.rightClick(isSelect);
|
||||||
|
}
|
||||||
|
dismiss();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setOnDialogClickListener(OnDialogLeftClickListener leftOnClickListener, OnDialogRightClickListener rightOnClickListener) {
|
||||||
|
this.leftOnClickListener = leftOnClickListener;
|
||||||
|
this.rightOnClickListener = rightOnClickListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRightOnClickListener(OnDialogRightClickListener rightOnClickListener) {
|
||||||
|
this.rightOnClickListener = rightOnClickListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnDialogLeftClickListener {
|
||||||
|
void leftClick();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnDialogRightClickListener {
|
||||||
|
void rightClick(int isSelect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 719 B |
BIN
app/src/main/res/drawable-xhdpi/ic_home_top_audio.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_home_top_audio_bg.png
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_home_top_bg.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_home_top_video.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_home_top_video_bg.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-xhdpi/iv_first_chong.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
6
app/src/main/res/drawable/bg_000_t50.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient android:endColor="#80000000"
|
||||||
|
android:startColor="#80000000"/>
|
||||||
|
<corners android:radius="50dp"/>
|
||||||
|
</shape>
|
||||||
6
app/src/main/res/drawable/bg_999999_t10.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient android:endColor="#1A999999"
|
||||||
|
android:startColor="#1A999999"/>
|
||||||
|
<corners android:radius="50dp"/>
|
||||||
|
</shape>
|
||||||
6
app/src/main/res/drawable/bg_fb65fd.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient android:endColor="#FB65FD"
|
||||||
|
android:startColor="#FB65FD"/>
|
||||||
|
<corners android:radius="50dp"/>
|
||||||
|
</shape>
|
||||||
6
app/src/main/res/drawable/bg_nmpp_audio.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient android:endColor="#D07BF7"
|
||||||
|
android:startColor="#AC38F3"/>
|
||||||
|
<corners android:radius="50dp"/>
|
||||||
|
</shape>
|
||||||
5
app/src/main/res/drawable/bg_nmpp_txt.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#1AFC3C39" />
|
||||||
|
<corners android:radius="@dimen/dp5"/>
|
||||||
|
</shape>
|
||||||
6
app/src/main/res/drawable/bg_nmpp_video.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient android:endColor="#EB6969"
|
||||||
|
android:startColor="#EA6FEE"/>
|
||||||
|
<corners android:radius="50dp"/>
|
||||||
|
</shape>
|
||||||
8
app/src/main/res/drawable/online_img.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="oval">
|
||||||
|
|
||||||
|
<solid android:color="#6CE4B7"/>
|
||||||
|
<stroke android:color="@color/white" android:width="@dimen/dp1"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
9
app/src/main/res/drawable/shape_button_e472ed_border.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
|
||||||
|
<stroke android:color="#EA6FEE" android:width="@dimen/dp1"/>
|
||||||
|
<solid android:color="@color/white"/>
|
||||||
|
<corners android:radius="@dimen/dp45"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
7
app/src/main/res/drawable/shape_white_dialog_bottom.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:topLeftRadius="@dimen/dp15" android:topRightRadius="@dimen/dp15"/>
|
||||||
|
<solid android:color="@android:color/white"/>
|
||||||
|
|
||||||
|
</shape>
|
||||||
67
app/src/main/res/layout/activity_video_friend.xml
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<?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"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:context=".view.main.VideoFriendActivity">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp45"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp24"
|
||||||
|
android:layout_marginTop="@dimen/dp30"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_back"
|
||||||
|
android:layout_width="@dimen/dp60"
|
||||||
|
android:layout_height="@dimen/dp45">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp14"
|
||||||
|
android:layout_height="@dimen/dp12"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:src="@mipmap/ic_black_back"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:textSize="@dimen/dp18"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="视频交友"/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="@dimen/dp60"
|
||||||
|
android:layout_height="@dimen/dp45">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_set_home"
|
||||||
|
android:layout_width="@dimen/dp60"
|
||||||
|
android:layout_height="@dimen/dp24"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="@drawable/shape_button_enable"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="设为首页"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/content_frame_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -34,12 +34,12 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/title_bottom_line_0"
|
android:id="@+id/title_bottom_line_0"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
android:layout_alignTop="@+id/tv_0"
|
android:layout_below="@+id/tv_0"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:layout_marginTop="@dimen/dp5"
|
||||||
android:src="@drawable/icon_tab_point_bg" />
|
android:src="@drawable/shape_button_enable" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_0"
|
android:id="@+id/tv_0"
|
||||||
@@ -61,13 +61,13 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/title_bottom_line_1"
|
android:id="@+id/title_bottom_line_1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
android:layout_alignTop="@+id/tv_1"
|
android:layout_below="@+id/tv_1"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:layout_marginTop="@dimen/dp5"
|
||||||
android:src="@drawable/icon_tab_point_bg"
|
android:visibility="gone"
|
||||||
android:visibility="gone" />
|
android:src="@drawable/shape_button_enable" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_1"
|
android:id="@+id/tv_1"
|
||||||
@@ -88,11 +88,12 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/title_bottom_line_2"
|
android:id="@+id/title_bottom_line_2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
|
android:layout_below="@+id/tv_2"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:layout_marginTop="@dimen/dp5"
|
||||||
android:src="@drawable/icon_tab_point_bg"
|
android:src="@drawable/shape_button_enable"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/tv_2"
|
app:layout_constraintBottom_toBottomOf="@+id/tv_2"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/tv_2"
|
app:layout_constraintEnd_toEndOf="@+id/tv_2"
|
||||||
|
|||||||
@@ -1,16 +1,178 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:background="#F6F7FB"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:viewBindingIgnore="true">
|
tools:viewBindingIgnore="true">
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@android:color/white">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:id="@+id/channel_app_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@android:color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||||
|
android:id="@+id/ctl_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end|bottom"
|
||||||
|
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp20"
|
||||||
|
android:layout_marginTop="@dimen/dp20"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_video_pp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="@dimen/dp8"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp65"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@drawable/ic_home_top_video_bg" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp85"
|
||||||
|
android:layout_height="@dimen/dp85"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@drawable/ic_home_top_video" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp65"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp10"
|
||||||
|
android:layout_marginTop="@dimen/dp10"
|
||||||
|
android:text="视频互动"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/dp18"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp10"
|
||||||
|
android:layout_marginTop="@dimen/dp2"
|
||||||
|
android:text="1v1倾诉陪伴"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/dp12" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_audio_pp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp8"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp65"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@drawable/ic_home_top_audio_bg" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp85"
|
||||||
|
android:layout_height="@dimen/dp85"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@drawable/ic_home_top_audio" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp65"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp10"
|
||||||
|
android:layout_marginTop="@dimen/dp10"
|
||||||
|
android:text="匿名匹配"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/dp18"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp10"
|
||||||
|
android:layout_marginTop="@dimen/dp2"
|
||||||
|
android:text="遇见合适的灵魂"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/dp12" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_main_home_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp45"
|
||||||
|
android:layout_marginTop="@dimen/dp20"
|
||||||
|
android:orientation="vertical"/>
|
||||||
|
<!--<include
|
||||||
|
layout="@layout/item_main_home_page_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp45"
|
||||||
|
android:layout_marginTop="@dimen/dp20"/>-->
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
|
||||||
<androidx.viewpager.widget.ViewPager
|
<androidx.viewpager.widget.ViewPager
|
||||||
android:id="@+id/main_view_pager"
|
android:id="@+id/main_view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp240"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@drawable/ic_home_top_bg" />
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/main_turntable"
|
android:id="@+id/main_turntable"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -61,4 +223,29 @@
|
|||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:src="@drawable/ic_video_endw" />
|
android:src="@drawable/ic_video_endw" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/main_first_chong_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginBottom="@dimen/dp80"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/main_first_chong"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/iv_first_chong" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/main_first_chong_end"
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_alignRight="@id/main_first_chong"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:src="@drawable/ic_video_endw" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -78,6 +78,16 @@
|
|||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_anchor_nm_img"
|
||||||
|
android:layout_width="@dimen/dp81"
|
||||||
|
android:layout_height="@dimen/dp49"
|
||||||
|
android:layout_marginBottom="@dimen/dp8"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:layout_above="@+id/channel_anchor_id_cost_1"
|
||||||
|
android:src="@mipmap/ic_hom_nm_img"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_anchor_tag"
|
android:id="@+id/iv_anchor_tag"
|
||||||
android:layout_width="58dp"
|
android:layout_width="58dp"
|
||||||
@@ -89,6 +99,33 @@
|
|||||||
android:src="@drawable/ic_anchor_tag1"
|
android:src="@drawable/ic_anchor_tag1"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/iv_anchor_online"
|
||||||
|
android:layout_width="58dp"
|
||||||
|
android:layout_height="23dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginRight="@dimen/dp15"
|
||||||
|
android:layout_marginTop="@dimen/dp10"
|
||||||
|
android:background="@drawable/bg_000_t50"
|
||||||
|
>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp10"
|
||||||
|
android:layout_height="@dimen/dp10"
|
||||||
|
android:src="@drawable/online_img"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="在线"
|
||||||
|
android:layout_marginLeft="@dimen/dp3"
|
||||||
|
android:textSize="@dimen/dp10"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/channel_anchor_id_score_1"
|
android:id="@+id/channel_anchor_id_score_1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|||||||
115
app/src/main/res/layout/item_channel_anchor_default.xml
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:fresco="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/transparent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
tools:viewBindingIgnore="true">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/channel_anchor_id_1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp80"
|
||||||
|
android:layout_marginLeft="@dimen/dp20"
|
||||||
|
android:layout_marginTop="@dimen/dp12"
|
||||||
|
android:layout_marginRight="@dimen/dp20"
|
||||||
|
android:background="@drawable/shape_white_bg_r14">
|
||||||
|
|
||||||
|
<!--<View-->
|
||||||
|
<!--android:id="@+id/view_bg"-->
|
||||||
|
<!--android:layout_width="match_parent"-->
|
||||||
|
<!--android:layout_height="match_parent" />-->
|
||||||
|
|
||||||
|
|
||||||
|
<com.facebook.drawee.view.SimpleDraweeView
|
||||||
|
android:id="@+id/channel_anchor_id_photo_1"
|
||||||
|
android:layout_width="@dimen/dp50"
|
||||||
|
android:layout_height="@dimen/dp50"
|
||||||
|
android:layout_marginLeft="@dimen/dp15"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
fresco:roundedCornerRadius="12dp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/newPeopleImageView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/home_newpeople"
|
||||||
|
android:layout_marginTop="@dimen/dp18"
|
||||||
|
android:layout_marginLeft="@dimen/dp5"
|
||||||
|
android:layout_toRightOf="@+id/channel_anchor_id_cost_1"
|
||||||
|
android:visibility="invisible" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/channel_anchor_id_cost_1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toRightOf="@+id/channel_anchor_id_photo_1"
|
||||||
|
android:layout_marginTop="@dimen/dp20"
|
||||||
|
android:layout_marginLeft="12dp"
|
||||||
|
android:text="4金币/分"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/channel_anchor_location_1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toRightOf="@+id/channel_anchor_id_score_1"
|
||||||
|
android:layout_below="@+id/channel_anchor_id_cost_1"
|
||||||
|
android:layout_marginLeft="@dimen/dp5"
|
||||||
|
android:layout_marginTop="@dimen/dp5"
|
||||||
|
android:text=""
|
||||||
|
android:textColor="#999999"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_anchor_tag"
|
||||||
|
android:layout_width="58dp"
|
||||||
|
android:layout_height="23dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginBottom="2dp"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@drawable/ic_anchor_tag1"
|
||||||
|
android:layout_marginTop="@dimen/dp18"
|
||||||
|
android:layout_marginLeft="@dimen/dp5"
|
||||||
|
android:layout_toRightOf="@+id/channel_anchor_id_cost_1"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/channel_anchor_id_score_1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="评分:4.5"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_below="@+id/channel_anchor_id_cost_1"
|
||||||
|
android:layout_marginTop="@dimen/dp4"
|
||||||
|
android:layout_marginLeft="12dp"
|
||||||
|
android:layout_toRightOf="@+id/channel_anchor_id_photo_1"
|
||||||
|
android:background="@drawable/shape_button_enable"
|
||||||
|
android:paddingLeft="@dimen/dp5"
|
||||||
|
android:paddingRight="@dimen/dp5"
|
||||||
|
android:paddingVertical="@dimen/dp2"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_chat"
|
||||||
|
android:layout_width="@dimen/dp60"
|
||||||
|
android:layout_height="@dimen/dp30"
|
||||||
|
android:textSize="@dimen/dp12"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="#E472ED"
|
||||||
|
android:background="@drawable/shape_button_e472ed_border"
|
||||||
|
android:layout_marginRight="@dimen/dp15"
|
||||||
|
android:text="聊一聊"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
@@ -120,7 +120,19 @@
|
|||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:src="@mipmap/feed_msg" />
|
android:src="@mipmap/feed_msg"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/dynamic_list_menu"
|
||||||
|
android:layout_width="@dimen/dp20"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:scaleType="center"
|
||||||
|
android:src="@mipmap/feed_more"
|
||||||
|
android:visibility="visible" />
|
||||||
|
|
||||||
<com.zld.expandlayout.ExpandLayout
|
<com.zld.expandlayout.ExpandLayout
|
||||||
android:id="@+id/dynamic_list_message"
|
android:id="@+id/dynamic_list_message"
|
||||||
@@ -246,7 +258,54 @@
|
|||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:weightSum="3" />
|
android:weightSum="3" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/dynamic_list_image_list_3"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:layout_marginRight="@dimen/dp16"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_see_count"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:textSize="@dimen/dp12"
|
||||||
|
android:text="已有0次浏览"
|
||||||
|
android:textColor="#E472ED"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/item_dynamic_gift_layout"
|
||||||
|
android:layout_width="@dimen/dp60"
|
||||||
|
android:layout_height="@dimen/dp26"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_below="@+id/tv_see_count"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginTop="@dimen/dp15"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="@drawable/shape_button_enable"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/ic_dynamic_gift_img" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="打赏"
|
||||||
|
android:layout_marginLeft="@dimen/dp5"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/dp12"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!--<LinearLayout
|
||||||
android:id="@+id/item_dynamic_gift_layout"
|
android:id="@+id/item_dynamic_gift_layout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -293,15 +352,7 @@
|
|||||||
android:textColor="@color/grey_text"
|
android:textColor="@color/grey_text"
|
||||||
android:textSize="10sp" />
|
android:textSize="10sp" />
|
||||||
|
|
||||||
<ImageView
|
</LinearLayout>-->
|
||||||
android:id="@+id/dynamic_list_menu"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:scaleType="center"
|
|
||||||
android:src="@mipmap/feed_more"
|
|
||||||
android:visibility="gone" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
|||||||
@@ -17,12 +17,11 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/dynamic_title_bottom_line_1"
|
android:id="@+id/dynamic_title_bottom_line_1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
android:layout_alignTop="@+id/dynamic_title_name_1"
|
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:layout_below="@+id/dynamic_title_name_1"
|
||||||
android:src="@drawable/icon_tab_point_bg" />
|
android:src="@drawable/shape_button_enable" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/dynamic_title_name_1"
|
android:id="@+id/dynamic_title_name_1"
|
||||||
@@ -42,12 +41,11 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/dynamic_title_bottom_line_2"
|
android:id="@+id/dynamic_title_bottom_line_2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
android:layout_alignTop="@+id/dynamic_title_name_2"
|
android:layout_below="@+id/dynamic_title_name_2"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:src="@drawable/shape_button_enable" />
|
||||||
android:src="@drawable/icon_tab_point_bg" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/dynamic_title_name_2"
|
android:id="@+id/dynamic_title_name_2"
|
||||||
@@ -82,12 +80,11 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/dynamic_title_bottom_line_3"
|
android:id="@+id/dynamic_title_bottom_line_3"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
android:layout_alignTop="@+id/dynamic_title_name_3"
|
android:layout_below="@+id/dynamic_title_name_3"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:src="@drawable/shape_button_enable" />
|
||||||
android:src="@drawable/icon_tab_point_bg" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/dynamic_title_name_3"
|
android:id="@+id/dynamic_title_name_3"
|
||||||
|
|||||||
@@ -23,12 +23,11 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/title_bottom_line_1"
|
android:id="@+id/title_bottom_line_1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
android:layout_alignTop="@+id/title_name_1"
|
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:layout_below="@+id/title_name_1"
|
||||||
android:src="@drawable/icon_tab_point_bg" />
|
android:src="@drawable/shape_button_enable" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_name_1"
|
android:id="@+id/title_name_1"
|
||||||
@@ -48,12 +47,11 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/title_bottom_line_2"
|
android:id="@+id/title_bottom_line_2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
android:layout_alignTop="@+id/title_name_2"
|
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:layout_below="@+id/title_name_2"
|
||||||
android:src="@drawable/icon_tab_point_bg" />
|
android:src="@drawable/shape_button_enable" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_name_2"
|
android:id="@+id/title_name_2"
|
||||||
@@ -72,12 +70,11 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/title_bottom_line_3"
|
android:id="@+id/title_bottom_line_3"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
android:layout_alignTop="@+id/title_name_3"
|
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:layout_below="@+id/title_name_3"
|
||||||
android:src="@drawable/icon_tab_point_bg" />
|
android:src="@drawable/shape_button_enable" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_name_3"
|
android:id="@+id/title_name_3"
|
||||||
@@ -110,12 +107,11 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/title_bottom_line_4"
|
android:id="@+id/title_bottom_line_4"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
android:layout_alignTop="@+id/title_name_4"
|
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:layout_below="@+id/title_name_4"
|
||||||
android:src="@drawable/icon_tab_point_bg" />
|
android:src="@drawable/shape_button_enable" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_name_4"
|
android:id="@+id/title_name_4"
|
||||||
|
|||||||
75
app/src/main/res/layout/item_main_home_page_layout_1.xml
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
tools:viewBindingIgnore="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_toStartOf="@+id/iv_title_rank"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/title_view_1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginEnd="20dp">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title_name_1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:text="全部"
|
||||||
|
android:textColor="@color/one_text"
|
||||||
|
android:textSize="20dp" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_suaixuan"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#E472ED"
|
||||||
|
android:textSize="@dimen/dp13"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:drawableRight="@mipmap/ic_sx_img"
|
||||||
|
android:layout_toStartOf="@+id/iv_title_rank"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:text="筛选"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_title_rank"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:layout_toStartOf="@+id/iv_title_gender"
|
||||||
|
android:src="@drawable/ic_home_rank" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_title_gender"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_toStartOf="@+id/iv_title_search"
|
||||||
|
android:src="@drawable/ic_home_hi" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_title_search"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:src="@drawable/ic_home_search" />
|
||||||
|
</RelativeLayout>
|
||||||
@@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/title_bottom_line_1"
|
android:id="@+id/title_bottom_line_1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
android:layout_alignTop="@+id/title_name_1"
|
android:layout_below="@+id/title_name_1"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:layout_marginTop="@dimen/dp5"
|
||||||
android:src="@drawable/icon_tab_point_bg" />
|
android:src="@drawable/shape_button_enable" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_name_1"
|
android:id="@+id/title_name_1"
|
||||||
@@ -46,12 +46,13 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/title_bottom_line_2"
|
android:id="@+id/title_bottom_line_2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp20"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp5"
|
||||||
android:layout_alignTop="@+id/title_name_2"
|
android:layout_below="@+id/title_name_2"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="13dp"
|
android:layout_marginTop="@dimen/dp5"
|
||||||
android:src="@drawable/icon_tab_point_bg" />
|
android:visibility="gone"
|
||||||
|
android:src="@drawable/shape_button_enable" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_name_2"
|
android:id="@+id/title_name_2"
|
||||||
|
|||||||
134
app/src/main/res/layout/layout_nmpp_dialog.xml
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/shape_white_dialog_bottom"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_close"
|
||||||
|
android:layout_width="@dimen/dp12"
|
||||||
|
android:layout_height="@dimen/dp12"
|
||||||
|
android:tint="@color/black"
|
||||||
|
android:layout_marginTop="@dimen/dp33"
|
||||||
|
android:layout_marginRight="@dimen/dp25"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:src="@mipmap/feed_close" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp64"
|
||||||
|
android:layout_height="@dimen/dp37"
|
||||||
|
android:layout_toRightOf="@+id/tv_title"
|
||||||
|
android:layout_marginLeft="-30dp"
|
||||||
|
android:layout_marginTop="@dimen/dp8"
|
||||||
|
android:src="@mipmap/ic_home_nmpp_img"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="匿名匹配"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/dp25"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="@dimen/dp25"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:textSize="@dimen/dp13"
|
||||||
|
android:text="@string/s_nm_content"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp30"
|
||||||
|
android:layout_below="@+id/tv_title"
|
||||||
|
android:layout_marginTop="@dimen/dp20"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_tip"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/tv_content"
|
||||||
|
android:layout_marginTop="@dimen/dp18"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:background="@drawable/bg_nmpp_txt"
|
||||||
|
android:paddingHorizontal="@dimen/dp10"
|
||||||
|
android:paddingVertical="@dimen/dp3"
|
||||||
|
android:textColor="#FC3C39"
|
||||||
|
android:textSize="@dimen/dp10"
|
||||||
|
android:text="严禁任何涉及色情、淫秽、赌博、暴力等违反国家法律法规的内容"/>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/tv_tip"
|
||||||
|
android:layout_marginTop="@dimen/dp32"
|
||||||
|
android:layout_marginBottom="@dimen/dp35"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp37"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_nm_audio_call"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp40"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginRight="@dimen/dp12"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="@drawable/bg_nmpp_audio">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp13"
|
||||||
|
android:layout_height="@dimen/dp19"
|
||||||
|
android:src="@mipmap/ic_nmpp_audio_s"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/dp13"
|
||||||
|
android:text="匿名语音"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_marginLeft="@dimen/dp12"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_nm_video_call"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp40"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginLeft="@dimen/dp12"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="@drawable/bg_nmpp_video">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="@dimen/dp15"
|
||||||
|
android:layout_height="@dimen/dp12"
|
||||||
|
android:src="@mipmap/ic_nmpp_video_s"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/dp13"
|
||||||
|
android:text="匿名视频"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:layout_marginLeft="@dimen/dp12"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
119
app/src/main/res/layout/layout_shaixuan_dialog.xml
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/shape_white_dialog_bottom"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_close"
|
||||||
|
android:layout_width="@dimen/dp12"
|
||||||
|
android:layout_height="@dimen/dp12"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginTop="@dimen/dp33"
|
||||||
|
android:layout_marginRight="@dimen/dp25"
|
||||||
|
android:src="@mipmap/feed_close"
|
||||||
|
android:tint="@color/black" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_marginTop="@dimen/dp25"
|
||||||
|
android:text="筛选"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/dp25"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_jjph"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_below="@+id/tv_title"
|
||||||
|
android:layout_marginTop="@dimen/dp25"
|
||||||
|
android:layout_marginLeft="@dimen/dp20"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="交友偏好"
|
||||||
|
android:textSize="@dimen/dp17"
|
||||||
|
android:textColor="@color/black"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/tv_jjph"
|
||||||
|
android:layout_marginTop="@dimen/dp15"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp18"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_all"
|
||||||
|
android:layout_width="@dimen/dp100"
|
||||||
|
android:layout_height="@dimen/dp45"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="@dimen/dp17"
|
||||||
|
android:text="全部"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginRight="@dimen/dp6"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="@drawable/bg_fb65fd"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_boy"
|
||||||
|
android:layout_width="@dimen/dp100"
|
||||||
|
android:layout_height="@dimen/dp45"
|
||||||
|
android:textColor="#999999"
|
||||||
|
android:textSize="@dimen/dp17"
|
||||||
|
android:text="男up"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="@dimen/dp6"
|
||||||
|
android:layout_marginRight="@dimen/dp6"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="@drawable/bg_999999_t10"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_girl"
|
||||||
|
android:layout_width="@dimen/dp100"
|
||||||
|
android:layout_height="@dimen/dp45"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="@dimen/dp17"
|
||||||
|
android:layout_marginLeft="@dimen/dp6"
|
||||||
|
android:text="女up"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:gravity="center"
|
||||||
|
android:background="@drawable/bg_fb65fd"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_nm_video_call"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp40"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="@dimen/dp40"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp25"
|
||||||
|
android:layout_below="@+id/ll_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@drawable/bg_nmpp_video"
|
||||||
|
android:layout_marginBottom="@dimen/dp20"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="@dimen/dp12"
|
||||||
|
android:text="确定"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/dp13"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 237 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_black_back.png
Normal file
|
After Width: | Height: | Size: 437 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_dynamic_gift_img.png
Normal file
|
After Width: | Height: | Size: 497 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_hom_nm_img.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_home_nmpp_img.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_nmpp_audio_s.png
Normal file
|
After Width: | Height: | Size: 570 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_nmpp_video_s.png
Normal file
|
After Width: | Height: | Size: 345 B |
BIN
app/src/main/res/mipmap-xhdpi/ic_sx_img.png
Normal file
|
After Width: | Height: | Size: 277 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 503 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 635 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 815 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 968 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 645 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 628 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 986 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 1007 B |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 1013 B |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -102,7 +102,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="2dp"
|
android:layout_marginBottom="2dp"
|
||||||
android:text="视频"
|
android:text="FU圈"
|
||||||
android:textColor="@color/zhimi_bottom_text"
|
android:textColor="@color/zhimi_bottom_text"
|
||||||
android:textSize="10dp"
|
android:textSize="10dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
|||||||
@@ -54,6 +54,6 @@
|
|||||||
<color name="crop_shadow_wp_color">#4F000000</color>
|
<color name="crop_shadow_wp_color">#4F000000</color>
|
||||||
<color name="crop_wp_markers">#7FFFFFFF</color>
|
<color name="crop_wp_markers">#7FFFFFFF</color>
|
||||||
|
|
||||||
<color name="zhimi_bottom_text">#ADADAD</color>
|
<color name="zhimi_bottom_text">#999999</color>
|
||||||
<color name="zhimi_bottom_text_selected">#8A4EF7</color>
|
<color name="zhimi_bottom_text_selected">#E472ED</color>
|
||||||
</resources>
|
</resources>
|
||||||