Commit 300a4ebb authored by linfeng's avatar linfeng

短视频

parent 47e56a4b
package com.frame.base.bus;
public class SendVideoEvent extends Event {
}
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
<color name="gray_ffff4444">#ffff4444</color> <color name="gray_ffff4444">#ffff4444</color>
<color name="gray_F1F1F1">#F1F1F1</color> <color name="gray_F1F1F1">#F1F1F1</color>
<color name="gray_FFF3E2">#FFF3E2</color> <color name="gray_FFF3E2">#FFF3E2</color>
<color name="gray_313131">#313131</color>
<color name="gray_171413">#171413</color>
<!--end--> <!--end-->
</resources> </resources>
...@@ -31,6 +31,8 @@ import com.ruiwenliu.wrapper.weight.horizontal.GallerySnapHelper; ...@@ -31,6 +31,8 @@ import com.ruiwenliu.wrapper.weight.horizontal.GallerySnapHelper;
import com.ruiwenliu.wrapper.weight.horizontal.SpaceItemDecoration; import com.ruiwenliu.wrapper.weight.horizontal.SpaceItemDecoration;
import com.xxfc.discovery.adapter.DiscoveryMenuAdapter; import com.xxfc.discovery.adapter.DiscoveryMenuAdapter;
import com.xxfc.discovery.event.DiscoveryAddEvent; import com.xxfc.discovery.event.DiscoveryAddEvent;
import com.xxfc.discovery.event.PostPatEvent;
import com.xxfc.discovery.event.PostVideoEvent;
import com.xxfc.discovery.fragment.PatFragment; import com.xxfc.discovery.fragment.PatFragment;
import com.xxfc.discovery.fragment.QuestionAndAnswerFragment; import com.xxfc.discovery.fragment.QuestionAndAnswerFragment;
import com.xxfc.discovery.fragment.RecommendFragment; import com.xxfc.discovery.fragment.RecommendFragment;
...@@ -97,19 +99,23 @@ public class DiscoveryFragment extends BaseFragment<DiscoveryPresenter> { ...@@ -97,19 +99,23 @@ public class DiscoveryFragment extends BaseFragment<DiscoveryPresenter> {
} }
private void initRxbus() { private void initRxbus() {
RxBus.tObservable(DiscoveryAddEvent.class) RxBus.tObservable(PostVideoEvent.class)
.observeOn(Schedulers.newThread()) .observeOn(Schedulers.newThread())
.subscribe(new Observer<DiscoveryAddEvent>(disposable) { .subscribe(new Observer<PostVideoEvent>(disposable) {
@Override @Override
public void onNext(DiscoveryAddEvent event) { public void onNext(PostVideoEvent event) {
if (1 == event.getType()) { menuAdapter.setSelectItem(2);
mViewPager.setCurrentItem(2);
} else if (2 == event.getType()) { }
});
} else if (3 == event.getType()) { RxBus.tObservable(PostPatEvent.class)
// menuAdapter.setSelectItem(3); .observeOn(Schedulers.newThread())
// mViewPager.setCurrentItem(3); .subscribe(new Observer<PostPatEvent>(disposable) {
} @Override
public void onNext(PostPatEvent event) {
menuAdapter.setSelectItem(1);
mViewPager.setCurrentItem(1);
} }
}); });
} }
......
...@@ -80,14 +80,12 @@ public class DiscoveryRecommendAdapter extends BaseQuickAdapter<DiscoveryRecomme ...@@ -80,14 +80,12 @@ public class DiscoveryRecommendAdapter extends BaseQuickAdapter<DiscoveryRecomme
helper.setText(R.id.tv_user_name, item.getNickname()); helper.setText(R.id.tv_user_name, item.getNickname());
GlideManager.getInstance(mContext).loadImage(item.getPicUrl(), (ImageView) helper.getView(R.id.iv_user_icon)); GlideManager.getInstance(mContext).loadImage(item.getPicUrl(), (ImageView) helper.getView(R.id.iv_user_icon));
if (item.getCount() != null) { if (item.getCount() != null) {
helper.setText(R.id.iv_like_number, item.getCount().getPraise()); helper.setText(R.id.iv_like_number, "点赞数 " + item.getCount().getPraise());
} }
if ("1".equals(item.getIsPraise())) { //0:未点赞 1:已点赞 if (1 == item.getIsPraise()) { //0:未点赞 1:已点赞
helper.setImageResource(R.id.iv_like, R.drawable.icon_discovery_ask_like); helper.setTextColor(R.id.iv_like_number, mContext.getResources().getColor(R.color.gray_FFB74B));
} else { } else {
helper.setImageResource(R.id.iv_like, R.drawable.icon_discovery_ask_unlike); helper.setTextColor(R.id.iv_like_number, mContext.getResources().getColor(R.color.textGray));
} }
helper.addOnClickListener(R.id.ll_item_islike);
} }
} }
...@@ -14,7 +14,7 @@ import com.xxfc.discovery.R; ...@@ -14,7 +14,7 @@ import com.xxfc.discovery.R;
import com.xxrv.video.bean.circle.DiscoveryVideoBean; import com.xxrv.video.bean.circle.DiscoveryVideoBean;
/** /**
* 短视频 * 短视频
*/ */
public class DiscoveryShortVideoAdapter extends BaseQuickAdapter<DiscoveryVideoBean.DataBeanX.DataBean, BaseViewHolder> { public class DiscoveryShortVideoAdapter extends BaseQuickAdapter<DiscoveryVideoBean.DataBeanX.DataBean, BaseViewHolder> {
...@@ -60,14 +60,12 @@ public class DiscoveryShortVideoAdapter extends BaseQuickAdapter<DiscoveryVideoB ...@@ -60,14 +60,12 @@ public class DiscoveryShortVideoAdapter extends BaseQuickAdapter<DiscoveryVideoB
helper.setText(R.id.tv_user_name, item.getNickname()); helper.setText(R.id.tv_user_name, item.getNickname());
GlideManager.getInstance(mContext).loadImage(item.getPicUrl(), (ImageView) helper.getView(R.id.iv_user_icon)); GlideManager.getInstance(mContext).loadImage(item.getPicUrl(), (ImageView) helper.getView(R.id.iv_user_icon));
if (item.getCount() != null) { if (item.getCount() != null) {
helper.setText(R.id.iv_like_number, item.getCount().getPraise()); helper.setText(R.id.iv_like_number, "点赞数 " + item.getCount().getPraise());
} }
if ("1".equals(item.getIsPraise())) { //0:未点赞 1:已点赞 if (1 == item.getIsPraise()) { //0:未点赞 1:已点赞
helper.setImageResource(R.id.iv_like, R.drawable.icon_discovery_ask_like); helper.setTextColor(R.id.iv_like_number, mContext.getResources().getColor(R.color.gray_FFB74B));
} else { } else {
helper.setImageResource(R.id.iv_like, R.drawable.icon_discovery_ask_unlike); helper.setTextColor(R.id.iv_like_number, mContext.getResources().getColor(R.color.textGray));
} }
helper.addOnClickListener(R.id.ll_item_islike);
} }
} }
...@@ -223,7 +223,7 @@ public class DiscoveryRecommendBean extends BaseBean { ...@@ -223,7 +223,7 @@ public class DiscoveryRecommendBean extends BaseBean {
private String time; private String time;
private String userId; private String userId;
private String visible; private String visible;
private String isPraise; //0:未点赞 1:已点赞 private int isPraise; //0:未点赞 1:已点赞
private String isCollect; private String isCollect;
private String state; private String state;
private String isAllowComment; private String isAllowComment;
...@@ -331,11 +331,11 @@ public class DiscoveryRecommendBean extends BaseBean { ...@@ -331,11 +331,11 @@ public class DiscoveryRecommendBean extends BaseBean {
this.visible = visible; this.visible = visible;
} }
public String getIsPraise() { public int getIsPraise() {
return isPraise; return isPraise;
} }
public void setIsPraise(String isPraise) { public void setIsPraise(int isPraise) {
this.isPraise = isPraise; this.isPraise = isPraise;
} }
......
...@@ -6,6 +6,7 @@ import android.support.v7.widget.RecyclerView; ...@@ -6,6 +6,7 @@ import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager; import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.Display; import android.view.Display;
import android.view.View; import android.view.View;
import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.android.arouter.launcher.ARouter;
import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseQuickAdapter;
import com.frame.base.bus.Observer; import com.frame.base.bus.Observer;
...@@ -25,8 +26,10 @@ import com.xxfc.discovery.bean.DiscoveryRecommendBean; ...@@ -25,8 +26,10 @@ import com.xxfc.discovery.bean.DiscoveryRecommendBean;
import com.xxfc.discovery.event.PostPatEvent; import com.xxfc.discovery.event.PostPatEvent;
import com.xxfc.discovery.presenter.DiscoveryPresenter; import com.xxfc.discovery.presenter.DiscoveryPresenter;
import com.yuyife.okgo.OkGoUtil; import com.yuyife.okgo.OkGoUtil;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import butterknife.BindView; import butterknife.BindView;
import io.reactivex.schedulers.Schedulers; import io.reactivex.schedulers.Schedulers;
...@@ -101,10 +104,10 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Sim ...@@ -101,10 +104,10 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Sim
ARouter.getInstance() ARouter.getInstance()
.build(Constance.ACTIVITY_URL_DETAILPAT) .build(Constance.ACTIVITY_URL_DETAILPAT)
.withString("id", item.getMsgId()) .withString("id", item.getMsgId())
.withString("title",item.getBody().getText()) .withString("title", item.getBody().getText())
.withString("iconUrl",item.getBody().getImages().get(0).getOurl()) .withString("iconUrl", item.getBody().getImages().get(0).getOurl())
.withString("userName",item.getNickname()) .withString("userName", item.getNickname())
.withString("userUrl",item.getPicUrl()) .withString("userUrl", item.getPicUrl())
.navigation(); .navigation();
} }
} }
...@@ -128,18 +131,6 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Sim ...@@ -128,18 +131,6 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Sim
} }
} }
}, rvContent); }, rvContent);
mAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
itemDatabean = (DiscoveryRecommendBean.DataBeanX.DataBean) adapter.getItem(position);
int id = view.getId();
if (id == R.id.ll_item_islike) {
// isLike();
}
}
});
} }
private void isLike() { private void isLike() {
...@@ -147,7 +138,7 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Sim ...@@ -147,7 +138,7 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Sim
Map<String, Object> headMap = new LinkedHashMap<>(); Map<String, Object> headMap = new LinkedHashMap<>();
headMap.put("Authorization", OkGoUtil.getToken()); headMap.put("Authorization", OkGoUtil.getToken());
mPresenter.postData(RvFrameConfig.HOST, 2, DiscoveryApi.DISCOVERY_IM_LOGIN, DiscoveryIMTokenBean.class, headMap, headMap, true); mPresenter.postData(RvFrameConfig.HOST, 2, DiscoveryApi.DISCOVERY_IM_LOGIN, DiscoveryIMTokenBean.class, headMap, headMap, true);
}else { } else {
ARouter.getInstance().build(Constance.ACTIVITY_URL_LOGINRV).navigation(); ARouter.getInstance().build(Constance.ACTIVITY_URL_LOGINRV).navigation();
} }
} }
...@@ -248,7 +239,6 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Sim ...@@ -248,7 +239,6 @@ public class PatFragment extends BaseFragment<DiscoveryPresenter> implements Sim
} }
@Override @Override
public void onRefresh() { public void onRefresh() {
onFresh(); onFresh();
......
...@@ -81,7 +81,7 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen ...@@ -81,7 +81,7 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
}); });
rvContent.setLayoutManager(staggeredGridLayoutManager); rvContent.setLayoutManager(staggeredGridLayoutManager);
rvContent.addItemDecoration(new AbSpacesItemDecoration(20,10));// 分割线。 rvContent.addItemDecoration(new AbSpacesItemDecoration(20, 10));// 分割线。
rvContent.setAdapter(mRecommendAdapter); rvContent.setAdapter(mRecommendAdapter);
mRecommendAdapter.bindToRecyclerView(rvContent); mRecommendAdapter.bindToRecyclerView(rvContent);
mRecommendAdapter.setEnableLoadMore(true); mRecommendAdapter.setEnableLoadMore(true);
...@@ -91,25 +91,26 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen ...@@ -91,25 +91,26 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
@Override @Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) { public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
DiscoveryRecommendBean.DataBeanX.DataBean item = (DiscoveryRecommendBean.DataBeanX.DataBean) adapter.getItem(position); DiscoveryRecommendBean.DataBeanX.DataBean item = (DiscoveryRecommendBean.DataBeanX.DataBean) adapter.getItem(position);
if (item !=null){ if (item != null) {
if ("2".equals(item.getBody().getType())){ if ("2".equals(item.getBody().getType())) {
ARouter.getInstance() ARouter.getInstance()
.build(Constance.ACTIVITY_URL_DETAILPAT) .build(Constance.ACTIVITY_URL_DETAILPAT)
.withString("id", item.getMsgId()) .withString("id", item.getMsgId())
.withString("title",item.getBody().getText()) .withString("title", item.getBody().getText())
.withString("iconUrl",item.getBody().getImages().get(0).getOurl()) .withString("iconUrl", item.getBody().getImages().get(0).getOurl())
.withString("userName",item.getNickname()) .withString("userName", item.getNickname())
.withString("userUrl",item.getPicUrl()) .withString("userUrl", item.getPicUrl())
.navigation(); .navigation();
}else if ("4".equals(item.getBody().getType())){ } else if ("4".equals(item.getBody().getType())) {
showToast("亲,该功能还在开发中。。。"); showToast("亲,该功能还在开发中。。。");
} }
} }
} }
}); });
mRecommendAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() { mRecommendAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override public void onLoadMoreRequested() { @Override
public void onLoadMoreRequested() {
if (rvContent != null) { if (rvContent != null) {
rvContent.postDelayed(new Runnable() { rvContent.postDelayed(new Runnable() {
@Override @Override
...@@ -125,27 +126,14 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen ...@@ -125,27 +126,14 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
} }
} }
}, rvContent); }, rvContent);
mRecommendAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
itemDatabean = (DiscoveryRecommendBean.DataBeanX.DataBean) adapter.getItem(position);
int id = view.getId();
if (id == R.id.ll_item_islike){
// isLike();
}
}
});
} }
private void isLike() { private void isLike() {
if (OkGoUtil.getToken() != null) { if (OkGoUtil.getToken() != null) {
Map<String, Object> headMap = new LinkedHashMap<>(); Map<String, Object> headMap = new LinkedHashMap<>();
headMap.put("Authorization",OkGoUtil.getToken()); headMap.put("Authorization", OkGoUtil.getToken());
mPresenter.postData(RvFrameConfig.HOST,2, DiscoveryApi.DISCOVERY_IM_LOGIN, DiscoveryIMTokenBean.class,headMap, headMap,true); mPresenter.postData(RvFrameConfig.HOST, 2, DiscoveryApi.DISCOVERY_IM_LOGIN, DiscoveryIMTokenBean.class, headMap, headMap, true);
} }
} }
...@@ -181,7 +169,7 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen ...@@ -181,7 +169,7 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
@Override @Override
public void onShowResult(int requestType, BaseBean result) { public void onShowResult(int requestType, BaseBean result) {
mSimpleRefreshLayout.onRefreshComplete(); mSimpleRefreshLayout.onRefreshComplete();
switch (requestType){ switch (requestType) {
case 0: case 0:
processData((DiscoveryRecommendBean) result); processData((DiscoveryRecommendBean) result);
break; break;
...@@ -207,14 +195,14 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen ...@@ -207,14 +195,14 @@ public class RecommendFragment extends BaseFragment<DiscoveryPresenter> implemen
private void setIMData(DiscoveryIMTokenBean bean) { private void setIMData(DiscoveryIMTokenBean bean) {
if ("0".equals(itemDatabean.getIsPraise())) {//0:未点赞 1:已点赞 if ("0".equals(itemDatabean.getIsPraise())) {//0:未点赞 1:已点赞
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
map.put("access_token",bean.getData()); map.put("access_token", bean.getData());
map.put("messageId",itemDatabean.getMsgId()); map.put("messageId", itemDatabean.getMsgId());
mPresenter.postData(3, DiscoveryApi.DISCOVERY_PRAISE_ADD, BaseBean.class, map,true); mPresenter.postData(3, DiscoveryApi.DISCOVERY_PRAISE_ADD, BaseBean.class, map, true);
} else { } else {
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
map.put("access_token",bean.getData()); map.put("access_token", bean.getData());
map.put("messageId",itemDatabean.getMsgId()); map.put("messageId", itemDatabean.getMsgId());
mPresenter.postData(4, DiscoveryApi.DISCOVERY_PRAISE_DELETE, BaseBean.class, map,true); mPresenter.postData(4, DiscoveryApi.DISCOVERY_PRAISE_DELETE, BaseBean.class, map, true);
} }
} }
......
...@@ -234,6 +234,7 @@ public class PostPatActivity extends BaseStatusActivity<DiscoveryPresenter> { ...@@ -234,6 +234,7 @@ public class PostPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
break; break;
case 2: case 2:
RxBus.post(new PostPatEvent()); RxBus.post(new PostPatEvent());
showToast("发布成功!");
finish(); finish();
break; break;
} }
...@@ -261,6 +262,7 @@ public class PostPatActivity extends BaseStatusActivity<DiscoveryPresenter> { ...@@ -261,6 +262,7 @@ public class PostPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
// 位置 // 位置
map.put("location", address); map.put("location", address);
} }
map.put("source", "2");
map.put("cityId", "0"); map.put("cityId", "0");
map.put("time", DateUtils.getCurTimeMillis()); map.put("time", DateUtils.getCurTimeMillis());
mPresenter.postData(2, DiscoveryApi.DISCOVERY_MSG_ADD, BaseBean.class, map, true); mPresenter.postData(2, DiscoveryApi.DISCOVERY_MSG_ADD, BaseBean.class, map, true);
......
...@@ -128,6 +128,7 @@ public class SendVideoActivity extends BaseStatusActivity<DiscoveryPresenter> { ...@@ -128,6 +128,7 @@ public class SendVideoActivity extends BaseStatusActivity<DiscoveryPresenter> {
break; break;
case 2: case 2:
RxBus.post(new PostVideoEvent()); RxBus.post(new PostVideoEvent());
showToast("发布成功!");
finish(); finish();
break; break;
} }
...@@ -177,6 +178,7 @@ public class SendVideoActivity extends BaseStatusActivity<DiscoveryPresenter> { ...@@ -177,6 +178,7 @@ public class SendVideoActivity extends BaseStatusActivity<DiscoveryPresenter> {
map.put("musicId", mCurrBgmId); map.put("musicId", mCurrBgmId);
} }
map.put("cityId", "0"); map.put("cityId", "0");
map.put("source", "2");
map.put("time", DateUtils.getCurTimeMillis()); map.put("time", DateUtils.getCurTimeMillis());
mPresenter.postData(2, DiscoveryApi.DISCOVERY_MSG_ADD, BaseBean.class, map, true); mPresenter.postData(2, DiscoveryApi.DISCOVERY_MSG_ADD, BaseBean.class, map, true);
} }
......
...@@ -140,8 +140,6 @@ public class ShortVideoActivity extends BaseStatusActivity<DiscoveryPresenter> i ...@@ -140,8 +140,6 @@ public class ShortVideoActivity extends BaseStatusActivity<DiscoveryPresenter> i
dataBeanList = new ArrayList(); dataBeanList = new ArrayList();
commentAdapter = new DiscoveryVideoCommentAdapter(); commentAdapter = new DiscoveryVideoCommentAdapter();
rvVideoComment.setLayoutManager(new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false)); rvVideoComment.setLayoutManager(new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false));
rvVideoComment.setNestedScrollingEnabled(false); rvVideoComment.setNestedScrollingEnabled(false);
...@@ -186,12 +184,12 @@ public class ShortVideoActivity extends BaseStatusActivity<DiscoveryPresenter> i ...@@ -186,12 +184,12 @@ public class ShortVideoActivity extends BaseStatusActivity<DiscoveryPresenter> i
tvVideoCommentNumber.setText(dataBean.getCount().getComment()); tvVideoCommentNumber.setText(dataBean.getCount().getComment());
tvVideoShareNumber.setText(dataBean.getCount().getShare()); tvVideoShareNumber.setText(dataBean.getCount().getShare());
} }
isPraise = dataBean.getIsPraise(); // isPraise = dataBean.getIsPraise();
if ("1".equals(dataBean.getIsPraise())) { //0:未点赞 1:已点赞 // if ("1".equals(dataBean.getIsPraise())) { //0:未点赞 1:已点赞
ivVideoIslike.setImageResource(R.drawable.icon_discover_video_like); // ivVideoIslike.setImageResource(R.drawable.icon_discover_video_like);
} else { // } else {
ivVideoIslike.setImageResource(R.drawable.icon_discover_video_likeun); // ivVideoIslike.setImageResource(R.drawable.icon_discover_video_likeun);
} // }
} }
......
...@@ -37,8 +37,15 @@ ...@@ -37,8 +37,15 @@
android:id="@+id/iv_video_hint" android:id="@+id/iv_video_hint"
android:layout_width="@dimen/size_100" android:layout_width="@dimen/size_100"
android:layout_height="@dimen/size_100" android:layout_height="@dimen/size_100"
android:scaleType="centerCrop" android:scaleType="centerCrop" />
android:src="@drawable/icon_send_video_button_hint"/>
<ImageView
android:id="@+id/iv_isvideo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/icon_fragment_video_hint" />
</RelativeLayout> </RelativeLayout>
<LinearLayout <LinearLayout
...@@ -72,8 +79,8 @@ ...@@ -72,8 +79,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/size_8" android:padding="@dimen/size_8"
android:visibility="gone" android:src="@drawable/common_icon_circle_delete"
android:src="@drawable/common_icon_circle_delete" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
......
...@@ -76,35 +76,17 @@ ...@@ -76,35 +76,17 @@
android:textSize="@dimen/text_8" /> android:textSize="@dimen/text_8" />
</LinearLayout> </LinearLayout>
<LinearLayout <TextView
android:id="@+id/ll_item_islike" android:id="@+id/iv_like_number"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginLeft="@dimen/size_20" android:layout_centerVertical="true"
android:gravity="center_vertical" android:layout_marginLeft="@dimen/size_3"
android:orientation="horizontal" android:layout_marginRight="@dimen/size_5"
android:paddingLeft="@dimen/size_15" android:text=""
android:paddingTop="@dimen/size_5" android:textColor="@color/textGray"
android:paddingRight="@dimen/size_15" android:textSize="@dimen/text_10" />
android:paddingBottom="@dimen/size_5">
<ImageView
android:id="@+id/iv_like"
android:layout_width="@dimen/size_15"
android:layout_height="@dimen/size_15"
android:padding="@dimen/size_1"
android:src="@drawable/icon_discovery_ask_unlike" />
<TextView
android:id="@+id/iv_like_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text=""
android:textColor="@color/textGray"
android:textSize="@dimen/text_8" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:src="@drawable/icon_fragment_video_hint"/> android:src="@drawable/icon_fragment_video_hint" />
</RelativeLayout> </RelativeLayout>
...@@ -35,11 +35,11 @@ ...@@ -35,11 +35,11 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5" android:layout_marginTop="@dimen/size_5"
android:ellipsize="end"
android:maxLines="2"
android:paddingLeft="@dimen/size_5" android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5" android:paddingRight="@dimen/size_5"
android:maxLines="2" android:text=""
android:ellipsize="end"
android:text="行摄川西邂逅生命中未知的精彩"
android:textColor="@color/colorMain" android:textColor="@color/colorMain"
android:textSize="@dimen/text_14" /> android:textSize="@dimen/text_14" />
...@@ -67,38 +67,25 @@ ...@@ -67,38 +67,25 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3" android:layout_marginLeft="@dimen/size_3"
android:text="房车旅行家Rose" android:ellipsize="end"
android:maxEms="8"
android:singleLine="true"
android:text=""
android:textSize="@dimen/text_8" /> android:textSize="@dimen/text_8" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/ll_item_islike" <TextView
android:id="@+id/iv_like_number"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="@dimen/size_15"
android:paddingTop="@dimen/size_5"
android:paddingBottom="@dimen/size_5"
android:paddingRight="@dimen/size_15"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:gravity="center_vertical" android:layout_centerVertical="true"
android:orientation="horizontal"> android:layout_marginLeft="@dimen/size_3"
android:layout_marginRight="@dimen/size_5"
<ImageView android:text=""
android:id="@+id/iv_like" android:textColor="@color/textGray"
android:layout_width="@dimen/size_15" android:textSize="@dimen/text_10" />
android:layout_height="@dimen/size_15"
android:padding="@dimen/size_1"
android:src="@drawable/icon_discovery_ask_unlike" />
<TextView
android:id="@+id/iv_like_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text="10589"
android:textColor="@color/textGray"
android:textSize="@dimen/text_8" />
</LinearLayout>
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -591,9 +591,13 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa ...@@ -591,9 +591,13 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
* 房车发烧友 * 房车发烧友
*/ */
private void loadDisCovery(int page) { private void loadDisCovery(int page) {
Map<String, Object> headMap = new LinkedHashMap<>();
if (OkGoUtil.getToken() != null) {
headMap.put("Authorization", OkGoUtil.getToken());
}
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
map.put("page", page); map.put("page", page);
mPresenter.postData(5, ApiConfig.RVENTHUSIAST_HOTMSG_LIST, HomeRecommendBean.class, map, false); mPresenter.postData(RvFrameConfig.HOST, 5, ApiConfig.RVENTHUSIAST_HOTMSG_LIST, HomeRecommendBean.class, map, headMap, false);
} }
/** /**
...@@ -664,7 +668,7 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa ...@@ -664,7 +668,7 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
private void setRecommend(HomeRecommendBean bean) { private void setRecommend(HomeRecommendBean bean) {
if (mPage == 1) { if (mPage == 1) {
countPage = bean.getData().getTotalPage(); countPage = bean.getData().getPageSize();
mRvEnthusiast.setNewData(bean.getData().getList()); mRvEnthusiast.setNewData(bean.getData().getList());
if (bean.getData().getTotalCount() == 0) { if (bean.getData().getTotalCount() == 0) {
// mRvEnthusiast.setEmptyView(getEmptyView(rvContent, -1, "暂无推荐数据")); // mRvEnthusiast.setEmptyView(getEmptyView(rvContent, -1, "暂无推荐数据"));
......
package com.rv.home.rv.module.ui.main.home.adapter; package com.rv.home.rv.module.ui.main.home.adapter;
import android.widget.ImageView; import android.widget.ImageView;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners; import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
...@@ -48,14 +49,12 @@ public class RVEnthusiastAdapter extends BaseQuickAdapter<HomeRecommendBean.Data ...@@ -48,14 +49,12 @@ public class RVEnthusiastAdapter extends BaseQuickAdapter<HomeRecommendBean.Data
helper.setText(R.id.tv_user_name, item.getNickname()); helper.setText(R.id.tv_user_name, item.getNickname());
GlideManager.getInstance(mContext).loadImage(item.getPicUrl(), (ImageView) helper.getView(R.id.iv_user_icon)); GlideManager.getInstance(mContext).loadImage(item.getPicUrl(), (ImageView) helper.getView(R.id.iv_user_icon));
if (item.getCount() != null) { if (item.getCount() != null) {
helper.setText(R.id.iv_like_number, item.getCount().getPraise()); helper.setText(R.id.iv_like_number, "点赞数 " + item.getCount().getPraise());
} }
if ("1".equals(item.getIsPraise())) { //0:未点赞 1:已点赞 if (1 == item.getIsPraise()) { //0:未点赞 1:已点赞
helper.setImageResource(R.id.iv_like, R.drawable.icon_discovery_ask_like); helper.setTextColor(R.id.iv_like_number, mContext.getResources().getColor(R.color.gray_FFB74B));
} else { } else {
helper.setImageResource(R.id.iv_like, R.drawable.icon_discovery_ask_unlike); helper.setTextColor(R.id.iv_like_number, mContext.getResources().getColor(R.color.textGray));
} }
helper.addOnClickListener(R.id.ll_item_islike);
} }
} }
...@@ -222,7 +222,7 @@ public class HomeRecommendBean extends BaseBean { ...@@ -222,7 +222,7 @@ public class HomeRecommendBean extends BaseBean {
private String time; private String time;
private String userId; private String userId;
private String visible; private String visible;
private String isPraise; //0:未点赞 1:已点赞 private int isPraise; //0:未点赞 1:已点赞
private String isCollect; private String isCollect;
private String state; private String state;
private String isAllowComment; private String isAllowComment;
...@@ -321,11 +321,11 @@ public class HomeRecommendBean extends BaseBean { ...@@ -321,11 +321,11 @@ public class HomeRecommendBean extends BaseBean {
this.visible = visible; this.visible = visible;
} }
public String getIsPraise() { public int getIsPraise() {
return isPraise; return isPraise;
} }
public void setIsPraise(String isPraise) { public void setIsPraise(int isPraise) {
this.isPraise = isPraise; this.isPraise = isPraise;
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:src="@drawable/icon_fragment_video_hint"/> android:src="@drawable/icon_fragment_video_hint" />
</RelativeLayout> </RelativeLayout>
...@@ -35,10 +35,10 @@ ...@@ -35,10 +35,10 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5" android:layout_marginTop="@dimen/size_5"
android:ellipsize="end"
android:maxLines="2"
android:paddingLeft="@dimen/size_5" android:paddingLeft="@dimen/size_5"
android:paddingRight="@dimen/size_5" android:paddingRight="@dimen/size_5"
android:maxLines="2"
android:ellipsize="end"
android:text="行摄川西邂逅生命中未知的精彩" android:text="行摄川西邂逅生命中未知的精彩"
android:textColor="@color/colorMain" android:textColor="@color/colorMain"
android:textSize="@dimen/text_14" /> android:textSize="@dimen/text_14" />
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
...@@ -70,33 +71,17 @@ ...@@ -70,33 +71,17 @@
android:textSize="@dimen/text_8" /> android:textSize="@dimen/text_8" />
</LinearLayout> </LinearLayout>
<LinearLayout <TextView
android:id="@+id/ll_item_islike" android:id="@+id/iv_like_number"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="@dimen/size_15"
android:paddingTop="@dimen/size_5"
android:paddingBottom="@dimen/size_5"
android:paddingRight="@dimen/size_15"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:gravity="center_vertical" android:layout_centerVertical="true"
android:orientation="horizontal"> android:layout_marginLeft="@dimen/size_3"
android:layout_marginRight="@dimen/size_5"
<ImageView android:text=""
android:id="@+id/iv_like" android:textColor="@color/textGray"
android:layout_width="@dimen/size_15" android:textSize="@dimen/text_10" />
android:layout_height="@dimen/size_15"
android:padding="@dimen/size_1" />
<TextView
android:id="@+id/iv_like_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text="10589"
android:textColor="@color/textGray"
android:textSize="@dimen/text_8" />
</LinearLayout>
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
android:background="@color/colorLine" android:background="@color/colorLine"
android:orientation="vertical"> android:orientation="vertical">
<com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" <com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/refresh" android:id="@+id/refresh"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
......
...@@ -18,11 +18,11 @@ import android.widget.RelativeLayout; ...@@ -18,11 +18,11 @@ import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.android.arouter.launcher.ARouter;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.frame.base.bus.RxBus;
import com.frame.base.bus.SendVideoEvent;
import com.frame.base.url.Constance; import com.frame.base.url.Constance;
import com.makeramen.roundedimageview.RoundedImageView;
import com.ruiwenliu.wrapper.base.BaseBean; import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity; import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.statusbar.StatusBarUtil; import com.ruiwenliu.wrapper.statusbar.StatusBarUtil;
...@@ -35,7 +35,6 @@ import com.xxrv.video.presenter.VideoPresenter; ...@@ -35,7 +35,6 @@ import com.xxrv.video.presenter.VideoPresenter;
import com.xxrv.video.util.AsyncUtils; import com.xxrv.video.util.AsyncUtils;
import com.xxrv.video.util.FileUtils; import com.xxrv.video.util.FileUtils;
import com.xxrv.video.util.RecorderUtils; import com.xxrv.video.util.RecorderUtils;
import com.xxrv.video.weight.MarqueTextView;
import com.xxrv.video.weight.Xcoverbar; import com.xxrv.video.weight.Xcoverbar;
import com.xxrv.video.weight.Xpreprogressbar; import com.xxrv.video.weight.Xpreprogressbar;
import com.xxrv.video.weight.Xspeedbar; import com.xxrv.video.weight.Xspeedbar;
...@@ -57,38 +56,14 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -57,38 +56,14 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
@BindView(R2.id.x_video) @BindView(R2.id.x_video)
JCVideoViewbyXuan mVideoView; JCVideoViewbyXuan mVideoView;
@BindView(R2.id.vCutoutHolder)
View vCutoutHolder;
@BindView(R2.id.iv_thumb) @BindView(R2.id.iv_thumb)
ImageView iv_thumb; ImageView iv_thumb;
@BindView(R2.id.iv_back) @BindView(R2.id.iv_back)
ImageView ivBack; ImageView ivBack;
@BindView(R2.id.ll_back) @BindView(R2.id.ll_back)
LinearLayout llBack; LinearLayout llBack;
@BindView(R2.id.iv_disc)
RoundedImageView ivDisc;
@BindView(R2.id.rl_disc)
RelativeLayout rlDisc;
@BindView(R2.id.tv_bgname)
MarqueTextView mTvBgmName;
@BindView(R2.id.ll_disc)
LinearLayout llDisc;
@BindView(R2.id.ll_volume)
LinearLayout llVolume;
@BindView(R2.id.ll_music)
LinearLayout llMusic;
@BindView(R2.id.rl_control_top)
RelativeLayout mRlTop;
@BindView(R2.id.ll_effect)
LinearLayout llEffect;
@BindView(R2.id.ll_cover)
LinearLayout llCover;
@BindView(R2.id.ll_filter)
LinearLayout llFilter;
@BindView(R2.id.ll_next)
LinearLayout llNext;
@BindView(R2.id.rl_control_bottom)
RelativeLayout mRlBottom;
@BindView(R2.id.bar_change) @BindView(R2.id.bar_change)
Xspeedbar mSpeedBar; Xspeedbar mSpeedBar;
@BindView(R2.id.bar_volume) @BindView(R2.id.bar_volume)
...@@ -99,6 +74,26 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -99,6 +74,26 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
LinearLayout mWaitDialog; LinearLayout mWaitDialog;
@BindView(R2.id.xpb_pro) @BindView(R2.id.xpb_pro)
Xpreprogressbar progressbar; Xpreprogressbar progressbar;
@BindView(R2.id.ll_select_volume)
LinearLayout llSelectVolume;
@BindView(R2.id.ll_select_show)
LinearLayout rlSelectShow;
@BindView(R2.id.xcover_bar)
Xcoverbar xcoverBar;
@BindView(R2.id.iv_hint1)
ImageView ivHint1;
@BindView(R2.id.iv_hint2)
ImageView ivHint2;
@BindView(R2.id.iv_hint3)
ImageView ivHint3;
@BindView(R2.id.ll_item_hint)
LinearLayout llItemHint;
@BindView(R2.id.tv_item_video_speed)
TextView tvItemVideoSpeed;
@BindView(R2.id.tv_item_volume)
TextView tvItemVolume;
@BindView(R2.id.tv_item_cover)
TextView tvItemCover;
private String mCurrPath; // 当前的视屏 private String mCurrPath; // 当前的视屏
...@@ -150,7 +145,9 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -150,7 +145,9 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
case RecorderUtils.COVER_SUCCESS: case RecorderUtils.COVER_SUCCESS:
// 获取封面成功 // 获取封面成功
if (loadCover == RecorderUtils.COVER_SUCCESS) { if (loadCover == RecorderUtils.COVER_SUCCESS) {
coverDialog.show(mCoverPath); xcoverBar.setCoverBackground(mCoverPath);
rlSelectShow.setVisibility(rlSelectShow.getVisibility() == View.VISIBLE && xcoverBar.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
xcoverBar.setVisibility(xcoverBar.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
mVideoView.pause(); mVideoView.pause();
iv_thumb.setVisibility(View.VISIBLE); iv_thumb.setVisibility(View.VISIBLE);
} }
...@@ -158,7 +155,8 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -158,7 +155,8 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
loadCover = RecorderUtils.COVER_SUCCESS; loadCover = RecorderUtils.COVER_SUCCESS;
break; break;
case RecorderUtils.COVER_FAILURE: // 获取封面失败 case RecorderUtils.COVER_FAILURE: // 获取封面失败
findViewById(R.id.ll_cover).setVisibility(View.GONE); // findViewById(R.id.ll_cover).setVisibility(View.GONE);
// TODO: 2019/11/14
break; break;
case RecorderUtils.SPEED_SUCCESS: // 变速成功 case RecorderUtils.SPEED_SUCCESS: // 变速成功
case RecorderUtils.VOLUME_SUCCESS: // 修改音量成功 case RecorderUtils.VOLUME_SUCCESS: // 修改音量成功
...@@ -287,8 +285,6 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -287,8 +285,6 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
mVideoView.play(mVideoPath); mVideoView.play(mVideoPath);
mTvBgmName.setText(TextUtils.isEmpty(mCurrBgmName) ? getString(R.string.Original_Sound) : mCurrBgmName);
mSpeedBar.addOnChangeListener(select -> { mSpeedBar.addOnChangeListener(select -> {
float speed = 0.5f + select * 0.25f; float speed = 0.5f + select * 0.25f;
Log.e("xuan", "init: 选择速度" + speed); Log.e("xuan", "init: 选择速度" + speed);
...@@ -302,38 +298,14 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -302,38 +298,14 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
changeVolume(vol); changeVolume(vol);
}); });
mSelectDialog = new SelectMusicDialog(this, info -> { xcoverBar.addOnChangeListener(new Xcoverbar.OnChangeListener() {
if (!info.path.equals(mCurrBgmPath)) {
mCurrBgmPath = info.path;
mCurrBgmName = info.getName();
mTvBgmName.setText(info.getName() + " " + info.getName() + " " + info.getName());
changeMusic(mCurrBgmPath);
}
});
coverDialog = new SelectCoverDialog(this, new Xcoverbar.OnChangeListener() {
@Override @Override
public void change(String curr) { public void change(String curr) {
Glide.with(PreviewxActivity.this).load(curr).into(iv_thumb); Glide.with(PreviewxActivity.this).load(curr).into(iv_thumb);
}
@Override
public void confirm(String curr) {
thumbPath = curr; thumbPath = curr;
Log.e("xuan", "init: 选择封面" + curr); Log.e("xuan", "init: 选择封面" + curr);
iv_thumb.setVisibility(View.GONE);
mVideoView.play("");
}
@Override
public void cancel() {
iv_thumb.setVisibility(View.GONE);
mVideoView.play("");
} }
}); });
mVolumeBar.setVisibility(View.GONE);
mSpeedBar.setVisibility(View.GONE);
} }
@Override @Override
...@@ -341,40 +313,97 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -341,40 +313,97 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
} }
@OnClick({R2.id.ll_back, R2.id.ll_music, R2.id.ll_effect, R2.id.ll_cover, R2.id.ll_filter, R2.id.ll_next, R2.id.ll_volume}) @OnClick({R2.id.ll_back, R2.id.tv_item_video_speed, R2.id.tv_item_cover, R2.id.tv_item_next, R2.id.tv_item_volume, R2.id.v_show})
public void onViewClicked(View view) { public void onViewClicked(View view) {
int id = view.getId(); int id = view.getId();
if (id == R.id.ll_back) { if (id == R.id.ll_back) {
finish(); finish();
} else if (id == R.id.ll_music) { } else if (id == R.id.tv_item_video_speed) {
mSelectDialog.show(); //视频速度
xcoverBar.setVisibility(View.GONE);
} else if (id == R.id.ll_effect) { llSelectVolume.setVisibility(View.GONE);
mVolumeBar.setVisibility(View.GONE); rlSelectShow.setVisibility(rlSelectShow.getVisibility() == View.VISIBLE && mSpeedBar.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
mSpeedBar.setVisibility(mSpeedBar.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE); mSpeedBar.setVisibility(mSpeedBar.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
ivHint1.setVisibility(View.VISIBLE);
ivHint2.setVisibility(View.INVISIBLE);
ivHint3.setVisibility(View.INVISIBLE);
iv_thumb.setVisibility(View.GONE);
mVideoView.play("");
tvItemVolume.setTextColor(getResources().getColor(R.color.colorWrite));
tvItemCover.setTextColor(getResources().getColor(R.color.colorWrite));
if (mSpeedBar.getVisibility() == View.VISIBLE) {
tvItemVideoSpeed.setTextColor(getResources().getColor(R.color.gray_FFB74B));
} else {
tvItemVideoSpeed.setTextColor(getResources().getColor(R.color.colorWrite));
}
} else if (id == R.id.ll_cover) { } else if (id == R.id.tv_item_cover) {
//封面图
if (loadCover == RecorderUtils.COVER_SUCCESS) { if (loadCover == RecorderUtils.COVER_SUCCESS) {
coverDialog.show(mCoverPath); xcoverBar.setCoverBackground(mCoverPath);
mVideoView.pause(); rlSelectShow.setVisibility(rlSelectShow.getVisibility() == View.VISIBLE && xcoverBar.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
iv_thumb.setVisibility(View.VISIBLE); xcoverBar.setVisibility(xcoverBar.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
mSpeedBar.setVisibility(View.GONE);
llSelectVolume.setVisibility(View.GONE);
ivHint1.setVisibility(View.INVISIBLE);
ivHint2.setVisibility(View.INVISIBLE);
ivHint3.setVisibility(View.VISIBLE);
tvItemVolume.setTextColor(getResources().getColor(R.color.colorWrite));
tvItemVideoSpeed.setTextColor(getResources().getColor(R.color.colorWrite));
if (xcoverBar.getVisibility() == View.GONE) {
iv_thumb.setVisibility(View.GONE);
mVideoView.play("");
tvItemCover.setTextColor(getResources().getColor(R.color.colorWrite));
} else {
mVideoView.pause();
iv_thumb.setVisibility(View.VISIBLE);
tvItemCover.setTextColor(getResources().getColor(R.color.gray_FFB74B));
}
} else if (loadCover == RecorderUtils.COVER_LOADING) { } else if (loadCover == RecorderUtils.COVER_LOADING) {
// loadCover = RecorderUtils.COVER_AUTOOPEN; // loadCover = RecorderUtils.COVER_AUTOOPEN;
showToast(getString(R.string.tip_load_cover)); showToast(getString(R.string.tip_load_cover));
} }
} else if (id == R.id.ll_filter) { } else if (id == R.id.tv_item_next) {
// mFilterDialog.show();
showToast(getString(R.string.tip_functional_development));
} else if (id == R.id.ll_next) {
onNext(); onNext();
} else if (id == R.id.ll_volume) { } else if (id == R.id.tv_item_volume) {
//音量
xcoverBar.setVisibility(View.GONE);
mSpeedBar.setVisibility(View.GONE);
rlSelectShow.setVisibility(rlSelectShow.getVisibility() == View.VISIBLE && llSelectVolume.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
llSelectVolume.setVisibility(llSelectVolume.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);
ivHint1.setVisibility(View.INVISIBLE);
ivHint2.setVisibility(View.VISIBLE);
ivHint3.setVisibility(View.INVISIBLE);
tvItemVideoSpeed.setTextColor(getResources().getColor(R.color.colorWrite));
tvItemCover.setTextColor(getResources().getColor(R.color.colorWrite));
if (llSelectVolume.getVisibility() == View.VISIBLE) {
tvItemVolume.setTextColor(getResources().getColor(R.color.gray_FFB74B));
} else {
tvItemVolume.setTextColor(getResources().getColor(R.color.colorWrite));
}
iv_thumb.setVisibility(View.GONE);
mVideoView.play("");
} else if (id == R.id.v_show) {
rlSelectShow.setVisibility(View.GONE);
xcoverBar.setVisibility(View.GONE);
mSpeedBar.setVisibility(View.GONE); mSpeedBar.setVisibility(View.GONE);
mVolumeBar.setVisibility(mVolumeBar.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE); llSelectVolume.setVisibility(View.GONE);
iv_thumb.setVisibility(View.GONE);
mVideoView.play("");
tvItemVideoSpeed.setTextColor(getResources().getColor(R.color.colorWrite));
tvItemVolume.setTextColor(getResources().getColor(R.color.colorWrite));
tvItemCover.setTextColor(getResources().getColor(R.color.colorWrite));
} }
} }
...@@ -573,7 +602,7 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -573,7 +602,7 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
long length = mVideoView.getDuration(); long length = mVideoView.getDuration();
ARouter.getInstance() ARouter.getInstance()
.build(Constance.ACTIVITY_URL_SENDVIDEO) .build(Constance.ACTIVITY_URL_SENDVIDEO)
.withString("mVideoFilePath", filePath) .withString("mVideoFilePath", filePath)
.withLong("mTimeLen", length) .withLong("mTimeLen", length)
...@@ -581,22 +610,10 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -581,22 +610,10 @@ public class PreviewxActivity extends BaseStatusActivity<VideoPresenter> {
.withString("mCurrBgmId", mCurrBgmId) .withString("mCurrBgmId", mCurrBgmId)
.navigation(); .navigation();
RxBus.post(new SendVideoEvent());
finish(); finish();
} }
/**
* 功能按钮的显示和隐藏
*
* @param show
*/
public void setControlVisible(boolean show) {
int visible = show ? View.VISIBLE : View.INVISIBLE;
mRlBottom.setVisibility(visible);
mRlBottom.setVisibility(visible);
mRlTop.setVisibility(visible);
mRlTop.setVisibility(visible);
}
public void showWaitDialog(boolean show, String hit) { public void showWaitDialog(boolean show, String hit) {
mWaitDialog.setVisibility(show ? View.VISIBLE : View.INVISIBLE); mWaitDialog.setVisibility(show ? View.VISIBLE : View.INVISIBLE);
......
...@@ -26,6 +26,10 @@ import android.widget.RelativeLayout; ...@@ -26,6 +26,10 @@ import android.widget.RelativeLayout;
import android.widget.Toast; import android.widget.Toast;
import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.android.arouter.facade.annotation.Route;
import com.frame.base.bus.Observer;
import com.frame.base.bus.PaymentSuccessfulEvent;
import com.frame.base.bus.RxBus;
import com.frame.base.bus.SendVideoEvent;
import com.frame.base.url.Constance; import com.frame.base.url.Constance;
import com.frame.rv.config.RvFrameConfig; import com.frame.rv.config.RvFrameConfig;
import com.joe.camera2recorddemo.View.CameraRecordView; import com.joe.camera2recorddemo.View.CameraRecordView;
...@@ -67,6 +71,7 @@ import VideoHandle.OnEditorListener; ...@@ -67,6 +71,7 @@ import VideoHandle.OnEditorListener;
import butterknife.BindView; import butterknife.BindView;
import butterknife.OnClick; import butterknife.OnClick;
import io.reactivex.functions.Consumer; import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import pub.devrel.easypermissions.AppSettingsDialog; import pub.devrel.easypermissions.AppSettingsDialog;
/** /**
...@@ -77,8 +82,6 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -77,8 +82,6 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> {
@BindView(R2.id.surfaceView) @BindView(R2.id.surfaceView)
CameraRecordView mRecordView; CameraRecordView mRecordView;
@BindView(R2.id.vCutoutHolder)
View vCutoutHolder;
@BindView(R2.id.xpbar) @BindView(R2.id.xpbar)
Xrecprogressbar xbar; Xrecprogressbar xbar;
@BindView(R2.id.tv_bgname) @BindView(R2.id.tv_bgname)
...@@ -179,6 +182,8 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -179,6 +182,8 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> {
videos = new ArrayList<>(); videos = new ArrayList<>();
mDialog = new FilterPreviewDialog(this, listener); mDialog = new FilterPreviewDialog(this, listener);
initRxBus();
xbar.addOnComptListener(new Xrecprogressbar.OnCompteListener() { xbar.addOnComptListener(new Xrecprogressbar.OnCompteListener() {
@Override @Override
public void onCompte() { public void onCompte() {
...@@ -196,6 +201,17 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -196,6 +201,17 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> {
mRecordView.post(() -> handleFocus(ScreenUtil.getScreenWidth(mActivity) / 2, ScreenUtil.getScreenHeight(mActivity) / 2)); mRecordView.post(() -> handleFocus(ScreenUtil.getScreenWidth(mActivity) / 2, ScreenUtil.getScreenHeight(mActivity) / 2));
} }
private void initRxBus() {
RxBus.tObservable(SendVideoEvent.class)
.observeOn(Schedulers.newThread())
.subscribe(new Observer<SendVideoEvent>(disposable) {
@Override
public void onNext(SendVideoEvent event) {
finish();
}
});
}
@Override @Override
public void onShowResult(int requestType, BaseBean result) { public void onShowResult(int requestType, BaseBean result) {
...@@ -366,7 +382,7 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -366,7 +382,7 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> {
} }
if (videos.size() == 0) { if (videos.size() == 0) {
llMusic.setVisibility(View.VISIBLE); llMusic.setVisibility(View.GONE);
} }
xbar.popTask(); xbar.popTask();
...@@ -451,7 +467,8 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -451,7 +467,8 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> {
handler.sendEmptyMessageDelayed(RecorderUtils.ACTIVATE_BTN, 1000); handler.sendEmptyMessageDelayed(RecorderUtils.ACTIVATE_BTN, 1000);
mRecordBtn.record(); mRecordBtn.record();
rlMore.setVisibility(View.GONE); rlMore.setVisibility(View.GONE);
llMusic.setVisibility(View.INVISIBLE); llMusic.setVisibility(View.GONE);
ivComp.setVisibility(View.GONE);
xbar.record(); xbar.record();
} else if (mRecorderState == STATE_INIT) { } else if (mRecorderState == STATE_INIT) {
mRecordBtn.pause(); mRecordBtn.pause();
...@@ -460,9 +477,11 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -460,9 +477,11 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> {
if (videos.size() == 0) { if (videos.size() == 0) {
ivDel.setVisibility(View.GONE); ivDel.setVisibility(View.GONE);
ivLocal.setVisibility(View.VISIBLE); ivLocal.setVisibility(View.VISIBLE);
ivComp.setVisibility(View.GONE);
} else { } else {
ivDel.setVisibility(View.VISIBLE); ivDel.setVisibility(View.VISIBLE);
ivLocal.setVisibility(View.GONE); ivLocal.setVisibility(View.GONE);
ivComp.setVisibility(View.VISIBLE);
} }
} }
} }
...@@ -475,7 +494,10 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -475,7 +494,10 @@ public class RecordxActivity extends BaseStatusActivity<VideoPresenter> {
videos.clear(); videos.clear();
xbar.reset(); xbar.reset();
llMusic.setVisibility(View.VISIBLE); llMusic.setVisibility(View.GONE);
ivComp.setVisibility(View.GONE);
ivDel.setVisibility(View.GONE);
ivLocal.setVisibility(View.VISIBLE);
Intent intent = new Intent(this, PreviewxActivity.class); Intent intent = new Intent(this, PreviewxActivity.class);
intent.putExtra("file_path", filePath); intent.putExtra("file_path", filePath);
......
...@@ -54,6 +54,7 @@ public class TriListActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -54,6 +54,7 @@ public class TriListActivity extends BaseStatusActivity<VideoPresenter> {
private boolean isLoad; private boolean isLoad;
private int pagerIndex; private int pagerIndex;
boolean shareBack; boolean shareBack;
private VideoIMTokenBean ImTokenBean;
Handler handler = new Handler(new Handler.Callback() { Handler handler = new Handler(new Handler.Callback() {
@Override @Override
...@@ -111,6 +112,8 @@ public class TriListActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -111,6 +112,8 @@ public class TriListActivity extends BaseStatusActivity<VideoPresenter> {
if (cur != position) { if (cur != position) {
position = cur; position = cur;
// TrillStatisticsHelper.play(mContext, coreManager, urlList.get(cur)); //观看数量统计 // TrillStatisticsHelper.play(mContext, coreManager, urlList.get(cur)); //观看数量统计
loadImToken();
} }
} }
}); });
...@@ -124,6 +127,10 @@ public class TriListActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -124,6 +127,10 @@ public class TriListActivity extends BaseStatusActivity<VideoPresenter> {
case 1: case 1:
processData((DiscoveryVideoBean) result); processData((DiscoveryVideoBean) result);
break; break;
case 2:
ImTokenBean = (VideoIMTokenBean) result;
playAmount();
break;
} }
} }
...@@ -260,4 +267,23 @@ public class TriListActivity extends BaseStatusActivity<VideoPresenter> { ...@@ -260,4 +267,23 @@ public class TriListActivity extends BaseStatusActivity<VideoPresenter> {
mPresenter.postData(1, VideoApi.DISCOVERY_UNAUTH_LIST, DiscoveryVideoBean.class, map, false); mPresenter.postData(1, VideoApi.DISCOVERY_UNAUTH_LIST, DiscoveryVideoBean.class, map, false);
} }
private void loadImToken() {
if (OkGoUtil.getToken() != null) {
Map<String, Object> headMap = new LinkedHashMap<>();
headMap.put("Authorization", OkGoUtil.getToken());
mPresenter.postData(RvFrameConfig.HOST, 2, VideoApi.DISCOVERY_IM_LOGIN, VideoIMTokenBean.class, headMap, headMap, false);
}
}
private void playAmount() {
if (urlList != null && urlList.size() >= position) {
DiscoveryVideoBean.DataBeanX.DataBean dataBean = urlList.get(position);
Map<String, Object> map = new LinkedHashMap<>();
map.put("access_token", ImTokenBean.getData());
map.put("messageId", dataBean.getMsgId());
mPresenter.getData(3, VideoApi.DISCOVERY_PLAYAMOUNT_ADD, VideoIMTokenBean.class, map, false);
}
}
} }
...@@ -24,4 +24,7 @@ public interface VideoApi extends RvFrameConfig { ...@@ -24,4 +24,7 @@ public interface VideoApi extends RvFrameConfig {
// 增加一条评论 // 增加一条评论
String DISCOVERY_COMMENT_ADD = IMA_BASEUSRL + "/b/circle/msg/comment/add"; String DISCOVERY_COMMENT_ADD = IMA_BASEUSRL + "/b/circle/msg/comment/add";
//添加播放量
String DISCOVERY_PLAYAMOUNT_ADD = IMA_BASEUSRL + "/b/circle/msg/playAmount/add";
} }
...@@ -20,6 +20,7 @@ public class Comment implements Serializable { ...@@ -20,6 +20,7 @@ public class Comment implements Serializable {
private String body;// 评论内容 private String body;// 评论内容
private String toBody;// 被评论内容 private String toBody;// 被评论内容
private long time; private long time;
private String picUrl;
public String getCommentId() { public String getCommentId() {
return commentId; return commentId;
...@@ -106,4 +107,13 @@ public class Comment implements Serializable { ...@@ -106,4 +107,13 @@ public class Comment implements Serializable {
c.setTime(this.getTime()); c.setTime(this.getTime());
return c; return c;
} }
public String getPicUrl() {
return picUrl;
}
public void setPicUrl(String picUrl) {
this.picUrl = picUrl;
}
} }
\ No newline at end of file
...@@ -130,9 +130,11 @@ public class FilterPreviewDialog extends Dialog { ...@@ -130,9 +130,11 @@ public class FilterPreviewDialog extends Dialog {
if (currt == position) { if (currt == position) {
holder.iv_select_bg.setVisibility(View.VISIBLE); holder.iv_select_bg.setVisibility(View.VISIBLE);
holder.ivSelect.setVisibility(View.VISIBLE); holder.ivSelect.setVisibility(View.VISIBLE);
holder.tvName.setTextColor(mContext.getResources().getColor(R.color.gray_FFB74B));
} else { } else {
holder.iv_select_bg.setVisibility(View.GONE); holder.iv_select_bg.setVisibility(View.GONE);
holder.ivSelect.setVisibility(View.GONE); holder.ivSelect.setVisibility(View.GONE);
holder.tvName.setTextColor(mContext.getResources().getColor(R.color.colorWrite));
} }
Log.e("xuan", "onBindViewHolder: " + mdatas.get(position).getRid()); Log.e("xuan", "onBindViewHolder: " + mdatas.get(position).getRid());
} }
......
...@@ -50,16 +50,6 @@ public class SelectCoverDialog extends Dialog implements View.OnClickListener { ...@@ -50,16 +50,6 @@ public class SelectCoverDialog extends Dialog implements View.OnClickListener {
mListener.change(curr); mListener.change(curr);
} }
} }
@Override
public void confirm(String curr) {
}
@Override
public void cancel() {
}
}); });
Window o = getWindow(); Window o = getWindow();
WindowManager.LayoutParams lp = o.getAttributes(); WindowManager.LayoutParams lp = o.getAttributes();
...@@ -82,11 +72,11 @@ public class SelectCoverDialog extends Dialog implements View.OnClickListener { ...@@ -82,11 +72,11 @@ public class SelectCoverDialog extends Dialog implements View.OnClickListener {
public void hideCover(boolean sure) { public void hideCover(boolean sure) {
super.dismiss(); super.dismiss();
if (mListener != null) { if (mListener != null) {
if (sure) { // if (sure) {
mListener.confirm(musicListUrl); // mListener.confirm(musicListUrl);
} else { // } else {
mListener.cancel(); // mListener.cancel();
} // }
} }
} }
......
...@@ -28,6 +28,7 @@ import com.ruiwenliu.wrapper.SPConstance; ...@@ -28,6 +28,7 @@ import com.ruiwenliu.wrapper.SPConstance;
import com.ruiwenliu.wrapper.base.BaseBean; import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseView; import com.ruiwenliu.wrapper.base.BaseView;
import com.ruiwenliu.wrapper.presenter.WrapperPresenter; import com.ruiwenliu.wrapper.presenter.WrapperPresenter;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.rv.component.utils.Cookie; import com.rv.component.utils.Cookie;
import com.rv.component.utils.DateUtils; import com.rv.component.utils.DateUtils;
import com.xxrv.video.R; import com.xxrv.video.R;
...@@ -400,7 +401,7 @@ public class TrillCommDialog extends BottomSheetDialogFragment implements BaseVi ...@@ -400,7 +401,7 @@ public class TrillCommDialog extends BottomSheetDialogFragment implements BaseVi
holder.tvName.setText(title); holder.tvName.setText(title);
holder.tvContent.setText(bean.getBody()); holder.tvContent.setText(bean.getBody());
holder.tvTime.setText(DateUtils.getFriendlyTimeDesc(mContent, bean.getTime()));// 这种转换更人性化一点 holder.tvTime.setText(DateUtils.getFriendlyTimeDesc(mContent, bean.getTime()));// 这种转换更人性化一点
// AvatarHelper.getInstance().displayAvatar(bean.getUserId(), holder.ivAvatar, false); GlideManager.getInstance(mContent).loadCircleImage(bean.getPicUrl(), holder.ivAvatar);
} }
@Override @Override
......
...@@ -28,6 +28,7 @@ import com.ruiwenliu.wrapper.base.BaseView; ...@@ -28,6 +28,7 @@ import com.ruiwenliu.wrapper.base.BaseView;
import com.ruiwenliu.wrapper.presenter.MvpPresenter; import com.ruiwenliu.wrapper.presenter.MvpPresenter;
import com.ruiwenliu.wrapper.presenter.WrapperPresenter; import com.ruiwenliu.wrapper.presenter.WrapperPresenter;
import com.ruiwenliu.wrapper.util.glide.GlideApp; import com.ruiwenliu.wrapper.util.glide.GlideApp;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.xxrv.video.R; import com.xxrv.video.R;
import com.xxrv.video.activity.TriListActivity; import com.xxrv.video.activity.TriListActivity;
import com.xxrv.video.api.VideoApi; import com.xxrv.video.api.VideoApi;
...@@ -274,8 +275,8 @@ public class JcvTrillVideo extends FrameLayout implements BaseView, View.OnClick ...@@ -274,8 +275,8 @@ public class JcvTrillVideo extends FrameLayout implements BaseView, View.OnClick
GlideApp.with(mContext).load(iUrl).into(thumbImageView); GlideApp.with(mContext).load(iUrl).into(thumbImageView);
videoUserid = bean.getUserId(); videoUserid = bean.getUserId();
// AvatarHelper.getInstance().displayAvatar(text, bean.getUserId(), ivAvatar, false); GlideManager.getInstance(mContext).loadCircleImage(bean.getPicUrl(), ivAvatar);
// AvatarHelper.getInstance().displayAvatar(bean.getUserId(), ivDisc, false); GlideManager.getInstance(mContext).loadCircleImage(bean.getPicUrl(), ivDisc);
mVideoSize = bean.getFirstVideoSize(); mVideoSize = bean.getFirstVideoSize();
mCommCount = bean.getComments().size(); mCommCount = bean.getComments().size();
...@@ -322,24 +323,23 @@ public class JcvTrillVideo extends FrameLayout implements BaseView, View.OnClick ...@@ -322,24 +323,23 @@ public class JcvTrillVideo extends FrameLayout implements BaseView, View.OnClick
@Override @Override
public void onClick(View v) { public void onClick(View v) {
int id = v.getId();// 关注 int id = v.getId();// 关注
if (id == R.id.iv_avatar) {// 点击头像 if (id == R.id.iv_avatar) {
// if (TrillFragment.OPEN_FRIEND) { // 点击头像
// Intent intent = new Intent(mContext, BasicInfoActivity.class);
// intent.putExtra(AppConstant.EXTRA_USER_ID, videoUserid);
// mContext.startActivity(intent);
// } else {
// ToastUtil.showToast(mContext, R.string.tip_trill_friend_disable);
// }
} else if (id == R.id.iv_follow) { } else if (id == R.id.iv_follow) {
} else if (id == R.id.iv_likes) {// 点赞按钮 } else if (id == R.id.iv_likes) {
// 点赞按钮
loadImToken(); loadImToken();
} else if (id == R.id.iv_comm) {// 评论按钮 } else if (id == R.id.iv_comm) {
// 评论按钮
if (mContext instanceof BaseStatusActivity) { if (mContext instanceof BaseStatusActivity) {
mCommDialog.show(((BaseStatusActivity) mContext).getSupportFragmentManager(), "TilTok"); mCommDialog.show(((BaseStatusActivity) mContext).getSupportFragmentManager(), "TilTok");
} }
} else if (id == R.id.iv_share) {// 分享按钮 } else if (id == R.id.iv_share) {
// 分享按钮
shareMessage(); shareMessage();
} else if (id == R.id.xuan_video) {// 暂停视频 } else if (id == R.id.xuan_video) {
// 暂停视频
mVideoView.pause(); mVideoView.pause();
} }
......
...@@ -53,8 +53,6 @@ public class Xcoverbar extends FrameLayout implements View.OnClickListener { ...@@ -53,8 +53,6 @@ public class Xcoverbar extends FrameLayout implements View.OnClickListener {
findViewById(R.id.cover_iv4).setOnClickListener(this); findViewById(R.id.cover_iv4).setOnClickListener(this);
findViewById(R.id.cover_iv5).setOnClickListener(this); findViewById(R.id.cover_iv5).setOnClickListener(this);
findViewById(R.id.cover_iv6).setOnClickListener(this); findViewById(R.id.cover_iv6).setOnClickListener(this);
findViewById(R.id.cover_iv7).setOnClickListener(this);
findViewById(R.id.cover_iv8).setOnClickListener(this);
} }
/** /**
...@@ -64,7 +62,7 @@ public class Xcoverbar extends FrameLayout implements View.OnClickListener { ...@@ -64,7 +62,7 @@ public class Xcoverbar extends FrameLayout implements View.OnClickListener {
*/ */
public void setCoverBackground(String path) { public void setCoverBackground(String path) {
mCoverPath = path; mCoverPath = path;
for (int i = 0; i < 8; i++) { for (int i = 0; i < 6; i++) {
String url = String.format(path, i + 1); String url = String.format(path, i + 1);
ImageView image = (ImageView) llBg.getChildAt(i); ImageView image = (ImageView) llBg.getChildAt(i);
Glide.with(getContext()).load(url).into(image); Glide.with(getContext()).load(url).into(image);
...@@ -91,10 +89,6 @@ public class Xcoverbar extends FrameLayout implements View.OnClickListener { ...@@ -91,10 +89,6 @@ public class Xcoverbar extends FrameLayout implements View.OnClickListener {
position = 5; position = 5;
} else if (id == R.id.cover_iv6) { } else if (id == R.id.cover_iv6) {
position = 6; position = 6;
} else if (id == R.id.cover_iv7) {
position = 7;
} else if (id == R.id.cover_iv8) {
position = 8;
} }
String url = String.format(mCoverPath, position); String url = String.format(mCoverPath, position);
if (mListener != null) { if (mListener != null) {
...@@ -109,10 +103,6 @@ public class Xcoverbar extends FrameLayout implements View.OnClickListener { ...@@ -109,10 +103,6 @@ public class Xcoverbar extends FrameLayout implements View.OnClickListener {
public interface OnChangeListener { public interface OnChangeListener {
void change(String curr); void change(String curr);
void confirm(String curr);
void cancel();
} }
} }
...@@ -47,7 +47,7 @@ public class Xpreprogressbar extends View { ...@@ -47,7 +47,7 @@ public class Xpreprogressbar extends View {
private void init(Context context) { private void init(Context context) {
mProPaint = new Paint(); mProPaint = new Paint();
mProPaint.setColor(Color.parseColor("#FF4081")); mProPaint.setColor(Color.parseColor("#FFB74B"));
mProPaint.setStyle(Paint.Style.FILL); mProPaint.setStyle(Paint.Style.FILL);
mProPaint.setAntiAlias(true); mProPaint.setAntiAlias(true);
......
...@@ -86,13 +86,13 @@ public class Xrecprogressbar extends View { ...@@ -86,13 +86,13 @@ public class Xrecprogressbar extends View {
mProPaint.setAntiAlias(true); mProPaint.setAntiAlias(true);
mBgPaint = new Paint(); mBgPaint = new Paint();
mBgPaint.setColor(Color.parseColor("#000000")); mBgPaint.setColor(Color.parseColor("#ffffff"));
mBgPaint.setStyle(Paint.Style.FILL); mBgPaint.setStyle(Paint.Style.FILL);
mBgPaint.setAntiAlias(true); mBgPaint.setAntiAlias(true);
mBgPaint.setAlpha(153); mBgPaint.setAlpha(153);
mTipPaint = new Paint(); mTipPaint = new Paint();
mTipPaint.setColor(Color.parseColor("#ffffff")); mTipPaint.setColor(Color.parseColor("#f1ce49"));
mTipPaint.setStyle(Paint.Style.FILL); mTipPaint.setStyle(Paint.Style.FILL);
mTipPaint.setAntiAlias(true); mTipPaint.setAntiAlias(true);
......
...@@ -101,7 +101,7 @@ public class Xspeedbar extends FrameLayout { ...@@ -101,7 +101,7 @@ public class Xspeedbar extends FrameLayout {
} }
views.get(mCurrt).setTextColor(getResources().getColor(R.color.white)); views.get(mCurrt).setTextColor(getResources().getColor(R.color.white));
views.get(select).setTextColor(getResources().getColor(R.color.app_black_75)); views.get(select).setTextColor(getResources().getColor(R.color.colorMain));
views.get(mCurrt).setBackgroundResource(R.color.transparent); views.get(mCurrt).setBackgroundResource(R.color.transparent);
views.get(select).setBackgroundResource(R.drawable.bg_tip_dialog); views.get(select).setBackgroundResource(R.drawable.bg_tip_dialog);
mCurrt = select; mCurrt = select;
......
...@@ -48,7 +48,7 @@ public class Xvolumebar extends View { ...@@ -48,7 +48,7 @@ public class Xvolumebar extends View {
private void init(Context context) { private void init(Context context) {
mProPaint = new Paint(); mProPaint = new Paint();
mProPaint.setColor(Color.parseColor("#E9445A")); mProPaint.setColor(Color.parseColor("#FFB74B"));
mProPaint.setStyle(Paint.Style.FILL); mProPaint.setStyle(Paint.Style.FILL);
mProPaint.setAntiAlias(true); mProPaint.setAntiAlias(true);
mProPaint.setStrokeWidth(10f); mProPaint.setStrokeWidth(10f);
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<corners <corners
android:bottomLeftRadius="0dp" android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp" android:bottomRightRadius="0dp"
android:topLeftRadius="7dp" android:topLeftRadius="0dp"
android:topRightRadius="7dp"/> android:topRightRadius="0dp"/>
<solid android:color="@color/alpha_translucent" /> <solid android:color="@color/alpha_translucent" />
......
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
android:shape="rectangle"> android:shape="rectangle">
<solid android:color="@color/white" /> <solid android:color="@color/white" />
<corners android:radius="9dp" /> <corners android:radius="15dp" />
</shape> </shape>
\ No newline at end of file
...@@ -7,13 +7,9 @@ ...@@ -7,13 +7,9 @@
<fm.jiecao.jcvideoplayer_lib.JCVideoViewbyXuan <fm.jiecao.jcvideoplayer_lib.JCVideoViewbyXuan
android:id="@+id/x_video" android:id="@+id/x_video"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent">
</fm.jiecao.jcvideoplayer_lib.JCVideoViewbyXuan>
<View
android:id="@+id/vCutoutHolder"
android:layout_width="match_parent"
android:layout_height="0dp" />
<ImageView <ImageView
android:id="@+id/iv_thumb" android:id="@+id/iv_thumb"
...@@ -21,262 +17,219 @@ ...@@ -21,262 +17,219 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="fitXY" /> android:scaleType="fitXY" />
<RelativeLayout <com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:id="@+id/rl_control_top" android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/vCutoutHolder" android:layout_alignParentEnd="true"
android:layout_marginLeft="10dp" android:layout_marginTop="@dimen/size_5"
android:layout_marginTop="7dp" android:orientation="vertical"
android:layout_marginRight="10dp"> app:use_type="use_padding_top">
<LinearLayout
android:id="@+id/ll_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp">
<ImageView
android:id="@+id/iv_back"
android:layout_width="28dp"
android:layout_height="25dp"
android:src="@drawable/ic_back" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="4dp"
android:text="特效"
android:textColor="@android:color/white"
android:textSize="12sp"
android:visibility="invisible" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_disc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:orientation="vertical"
android:padding="10dp">
<RelativeLayout
android:id="@+id/rl_disc"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_gravity="center_horizontal">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/iv_disc"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_centerInParent="true"
android:src="@drawable/avatar_normal"
app:riv_oval="true" />
<ImageView
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_centerInParent="true"
android:src="@drawable/ic_disc" />
</RelativeLayout>
<com.xxrv.video.weight.MarqueTextView
android:id="@+id/tv_bgname"
android:layout_width="36dp"
android:layout_height="wrap_content"
android:layout_below="@id/iv_disc"
android:layout_marginTop="4dp"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:singleLine="true"
android:text="选音乐"
android:textColor="@android:color/white"
android:textSize="12sp" />
</LinearLayout> <com.xxrv.video.weight.Xpreprogressbar
android:id="@+id/xpb_pro"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_marginLeft="@dimen/size_20"
android:layout_marginRight="@dimen/size_20" />
<LinearLayout <RelativeLayout
android:id="@+id/ll_volume" android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toLeftOf="@id/ll_disc" android:layout_below="@+id/xpb_pro"
android:orientation="vertical" android:layout_marginLeft="5dp"
android:padding="10dp"> android:layout_marginTop="@dimen/size_10"
android:layout_marginRight="15dp">
<ImageView
android:layout_width="20dp"
android:layout_height="25dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/ic_volume" />
<TextView <LinearLayout
android:id="@+id/ll_back"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:orientation="vertical"
android:layout_marginTop="4dp" android:padding="10dp">
android:text="@string/volume"
android:textColor="@android:color/white"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_music"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/ll_volume"
android:orientation="vertical"
android:padding="10dp"
android:visibility="gone">
<ImageView <ImageView
android:layout_width="20dp" android:id="@+id/iv_back"
android:layout_height="25dp" android:layout_width="28dp"
android:layout_gravity="center_horizontal" android:layout_height="25dp"
android:src="@drawable/ic_shear_music" /> android:src="@drawable/ic_back" />
</LinearLayout>
<TextView <TextView
android:id="@+id/tv_item_next"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_alignParentRight="true"
android:layout_marginTop="4dp" android:layout_centerVertical="true"
android:text="@string/music" android:background="@drawable/shape_rv_bg_shallow_dark_yellow_circle"
android:textColor="@android:color/white" android:paddingLeft="@dimen/size_12"
android:textSize="12sp" /> android:paddingTop="@dimen/size_8"
android:paddingRight="@dimen/size_12"
</LinearLayout> android:paddingBottom="@dimen/size_8"
android:text="下一步"
android:textColor="@color/colorWrite" />
</RelativeLayout>
</com.ruiwenliu.wrapper.statusbar.StatusBarHeightView>
</RelativeLayout>
<RelativeLayout <LinearLayout
android:id="@+id/rl_control_bottom" android:id="@+id/ll_select_show"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_alignParentBottom="true" android:layout_above="@+id/ll_bottom_hint"
android:layout_marginLeft="10dp" android:orientation="vertical"
android:layout_marginRight="10dp" android:visibility="gone">
android:layout_marginBottom="10dp">
<LinearLayout
android:id="@+id/ll_effect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="10dp">
<ImageView
android:layout_width="28dp"
android:layout_height="28dp"
android:src="@drawable/ic_effect" />
<TextView <View
android:layout_width="wrap_content" android:id="@+id/v_show"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_gravity="center_horizontal" android:layout_height="0dp"
android:layout_marginTop="4dp" android:layout_weight="1" />
android:text="@string/effects"
android:textColor="@android:color/white"
android:textSize="12sp" />
</LinearLayout> <RelativeLayout
<LinearLayout android:layout_width="match_parent"
android:id="@+id/ll_cover" android:layout_height="@dimen/size_100"
android:layout_width="wrap_content" android:layout_alignParentBottom="true"
android:layout_height="wrap_content" android:background="@color/gray_313131"
android:layout_marginLeft="5dp"
android:layout_toRightOf="@id/ll_effect"
android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="10dp"
android:visibility="visible"> android:visibility="visible">
<ImageView <com.xxrv.video.weight.Xspeedbar
android:layout_width="28dp" android:id="@+id/bar_change"
android:layout_height="28dp" android:layout_width="match_parent"
android:src="@drawable/ic_cover" /> android:layout_height="match_parent"
android:visibility="gone" />
<TextView <LinearLayout
android:layout_width="wrap_content" android:id="@+id/ll_select_volume"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_marginTop="4dp" android:layout_height="match_parent"
android:text="@string/cover" android:gravity="center_vertical"
android:textColor="@android:color/white" android:orientation="horizontal"
android:textSize="12sp" /> android:visibility="gone">
</LinearLayout> <ImageView
android:layout_width="@dimen/size_15"
android:layout_height="@dimen/size_15"
android:layout_marginLeft="@dimen/size_15"
android:layout_marginRight="@dimen/size_5"
android:src="@drawable/ic_video_less" />
<com.xxrv.video.weight.Xvolumebar
android:id="@+id/bar_volume"
android:layout_width="0dp"
android:layout_height="67dp"
android:layout_weight="1" />
<LinearLayout <ImageView
android:id="@+id/ll_filter" android:layout_width="@dimen/size_15"
android:layout_width="wrap_content" android:layout_height="@dimen/size_15"
android:layout_height="wrap_content" android:layout_marginLeft="@dimen/size_5"
android:layout_marginLeft="5dp" android:layout_marginRight="@dimen/size_15"
android:layout_toRightOf="@id/ll_cover" android:src="@drawable/ic_video_add" />
android:orientation="vertical" </LinearLayout>
android:padding="10dp"
android:visibility="gone">
<ImageView
android:layout_width="28dp"
android:layout_height="28dp"
android:src="@drawable/ic_filter" />
<TextView <com.xxrv.video.weight.Xcoverbar
android:layout_width="wrap_content" android:id="@+id/xcover_bar"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_gravity="center_horizontal" android:layout_height="50dp"
android:layout_marginTop="4dp" android:layout_centerVertical="true"
android:text="滤镜" android:visibility="gone" />
android:textColor="@android:color/white"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_next" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:layout_alignParentBottom="true"
android:layout_alignParentRight="true" android:orientation="vertical">
android:layout_centerVertical="true"
android:orientation="vertical" <View
android:padding="10dp"> android:layout_width="match_parent"
android:layout_height="@dimen/size_1"
android:background="@color/gray_171413" />
<LinearLayout
android:id="@+id/ll_item_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/gray_313131"
android:orientation="horizontal"
android:paddingLeft="@dimen/size_40"
android:paddingRight="@dimen/size_40">
<ImageView
android:id="@+id/iv_hint1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/ic_triangle"
android:visibility="invisible" />
<ImageView
android:id="@+id/iv_hint2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/ic_triangle"
android:visibility="invisible" />
<ImageView
android:id="@+id/iv_hint3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:src="@drawable/ic_triangle"
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<TextView <LinearLayout
android:layout_width="62dp" android:id="@+id/ll_bottom_hint"
android:layout_height="28dp" android:layout_width="match_parent"
android:background="@drawable/back_elipse_whitegreen_nor" android:layout_height="@dimen/size_60"
android:gravity="center" android:layout_alignParentBottom="true"
android:text="@string/next_step" android:background="@color/gray_313131"
android:textColor="@android:color/white" android:orientation="horizontal"
android:textSize="14dp" /> android:paddingLeft="@dimen/size_40"
android:paddingRight="@dimen/size_40">
</LinearLayout> <TextView
android:id="@+id/tv_item_video_speed"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="视频速度"
android:textColor="@color/colorWrite"
android:textSize="@dimen/size_16" />
</RelativeLayout> <TextView
android:id="@+id/tv_item_volume"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="音量"
android:textColor="@color/colorWrite"
android:textSize="@dimen/size_16" />
<com.xxrv.video.weight.Xspeedbar <TextView
android:id="@+id/bar_change" android:id="@+id/tv_item_cover"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="67dp" android:layout_height="match_parent"
android:layout_above="@id/rl_control_bottom" android:layout_weight="1"
android:layout_marginLeft="20dp" android:gravity="center"
android:layout_marginRight="20dp" android:text="视频封面"
android:layout_marginBottom="20dp" /> android:textColor="@color/colorWrite"
android:textSize="@dimen/size_16" />
<com.xxrv.video.weight.Xvolumebar </LinearLayout>
android:id="@+id/bar_volume"
android:layout_width="match_parent"
android:layout_height="67dp"
android:layout_above="@id/rl_control_bottom"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="20dp" />
<LinearLayout <LinearLayout
...@@ -301,11 +254,4 @@ ...@@ -301,11 +254,4 @@
android:textColor="@color/white" /> android:textColor="@color/white" />
</LinearLayout> </LinearLayout>
<com.xxrv.video.weight.Xpreprogressbar
android:id="@+id/xpb_pro"
android:layout_width="match_parent"
android:layout_height="1.5dp"
android:layout_alignParentBottom="true" />
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
<?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"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
...@@ -8,27 +9,33 @@ ...@@ -8,27 +9,33 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<View <com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:id="@+id/vCutoutHolder" android:id="@+id/shv"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="0dp" /> android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/size_5"
android:orientation="vertical"
app:use_type="use_padding_top">
<com.xxrv.video.weight.Xrecprogressbar <com.xxrv.video.weight.Xrecprogressbar
android:id="@+id/xpbar" android:id="@+id/xpbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="6dp" android:layout_height="6dp"
android:layout_below="@id/vCutoutHolder" android:layout_marginTop="@dimen/size_5" />
android:layout_marginTop="25dp" />
</com.ruiwenliu.wrapper.statusbar.StatusBarHeightView>
<LinearLayout <LinearLayout
android:id="@+id/ll_select_music" android:id="@+id/ll_select_music"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/xpbar" android:layout_below="@id/shv"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="10dp"> android:padding="10dp"
android:visibility="gone">
<ImageView <ImageView
android:layout_width="18dp" android:layout_width="18dp"
...@@ -54,7 +61,8 @@ ...@@ -54,7 +61,8 @@
android:id="@+id/ll_back" android:id="@+id/ll_back"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/xpbar" android:layout_below="@id/shv"
android:layout_marginTop="@dimen/size_10"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp"> android:padding="10dp">
...@@ -68,8 +76,9 @@ ...@@ -68,8 +76,9 @@
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/xpbar" android:layout_below="@id/shv"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/size_10"
android:layout_marginRight="10dp" android:layout_marginRight="10dp"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="vertical"> android:orientation="vertical">
...@@ -133,10 +142,11 @@ ...@@ -133,10 +142,11 @@
<ImageView <ImageView
android:id="@+id/iv_comp" android:id="@+id/iv_comp"
android:layout_width="60dp" android:layout_width="@dimen/size_60"
android:layout_height="60dp" android:layout_height="@dimen/size_60"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:padding="10dp" android:padding="@dimen/size_5"
android:visibility="gone"
android:src="@drawable/ic_comp" /> android:src="@drawable/ic_comp" />
<FrameLayout <FrameLayout
...@@ -147,17 +157,17 @@ ...@@ -147,17 +157,17 @@
<ImageView <ImageView
android:id="@+id/iv_local" android:id="@+id/iv_local"
android:layout_width="60dp" android:layout_width="@dimen/size_60"
android:layout_height="50dp" android:layout_height="@dimen/size_60"
android:padding="10dp" android:padding="@dimen/size_5"
android:src="@drawable/ic_sel_local_video" /> android:src="@drawable/ic_select_local_video" />
<ImageView <ImageView
android:id="@+id/iv_del" android:id="@+id/iv_del"
android:layout_width="60dp" android:layout_width="@dimen/size_60"
android:layout_height="50dp" android:layout_height="@dimen/size_60"
android:padding="10dp" android:padding="@dimen/size_5"
android:src="@drawable/ic_detele" android:src="@drawable/ic_delete_return"
android:visibility="gone" /> android:visibility="gone" />
</FrameLayout> </FrameLayout>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="140dp" android:layout_height="140dp"
android:background="@drawable/bg_filter_select" android:background="@color/alpha_translucent"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="vertical"> android:orientation="vertical">
......
...@@ -26,40 +26,45 @@ ...@@ -26,40 +26,45 @@
android:paddingLeft="10dp" android:paddingLeft="10dp"
android:paddingRight="10dp"> android:paddingRight="10dp">
<TextView
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dp"
android:text="薛定谔的猫"
android:textColor="@color/Grey_500"
android:textSize="@dimen/text_12"
android:textStyle="bold" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="2dp" android:orientation="horizontal">
android:orientation="vertical">
<TextView <TextView
android:id="@+id/tv_content" android:id="@+id/tv_name"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="薛定谔的猫薛定谔的猫薛定谔的猫薛定谔的猫薛定谔的猫" android:layout_marginRight="@dimen/size_10"
android:textColor="@color/black" android:layout_weight="1"
android:textSize="@dimen/text_14" /> android:ellipsize="end"
android:maxEms="8"
android:singleLine="true"
android:text=""
android:textColor="@color/Grey_500"
android:textSize="@dimen/text_12"
android:textStyle="bold" />
<TextView <TextView
android:id="@+id/tv_time" android:id="@+id/tv_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="2dp" android:text=""
android:textColor="@color/Grey_400" android:textColor="@color/Grey_400"
android:textSize="@dimen/text_12" /> android:textSize="@dimen/text_12" />
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5"
android:text=""
android:textColor="@color/black"
android:textSize="@dimen/text_14" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="@dimen/size_100"
android:layout_height="wrap_content"> android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="20dp"
android:gravity="center"
android:text="@string/video_speed" />
<LinearLayout <LinearLayout
android:layout_marginTop="5dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="42dp" android:layout_height="@dimen/size_100"
android:orientation="horizontal" android:background="@color/gray_313131"
android:background="@drawable/bg_slide_selected"> android:orientation="horizontal">
<TextView <LinearLayout
android:id="@+id/tv_select0"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center">
android:text="@string/video_speed_0"
android:textColor="@color/white"/>
<TextView <TextView
android:id="@+id/tv_select1" android:id="@+id/tv_select0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/size_8"
android:paddingTop="@dimen/size_3"
android:paddingRight="@dimen/size_8"
android:paddingBottom="@dimen/size_3"
android:text="@string/video_speed_0"
android:textColor="@color/white"
android:textSize="@dimen/text_16" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center">
android:text="@string/video_speed_1"
android:textColor="@color/white"/> <TextView
<TextView android:id="@+id/tv_select1"
android:id="@+id/tv_select2" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/size_8"
android:paddingTop="@dimen/size_3"
android:paddingRight="@dimen/size_8"
android:paddingBottom="@dimen/size_3"
android:text="@string/video_speed_1"
android:textColor="@color/white"
android:textSize="@dimen/text_16" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center">
android:background="@drawable/bg_tip_dialog"
android:text="@string/filter_normal" <TextView
android:textColor="@color/alp_background"/> android:id="@+id/tv_select2"
<TextView android:layout_width="wrap_content"
android:id="@+id/tv_select3" android:layout_height="wrap_content"
android:background="@drawable/bg_tip_dialog"
android:paddingLeft="@dimen/size_8"
android:paddingTop="@dimen/size_3"
android:paddingRight="@dimen/size_8"
android:paddingBottom="@dimen/size_3"
android:text="@string/filter_normal"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_16" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center">
android:text="@string/video_speed_2"
android:textColor="@color/white"/> <TextView
<TextView android:id="@+id/tv_select3"
android:id="@+id/tv_select4" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/size_8"
android:paddingTop="@dimen/size_3"
android:paddingRight="@dimen/size_8"
android:paddingBottom="@dimen/size_3"
android:text="@string/video_speed_2"
android:textColor="@color/white"
android:textSize="@dimen/text_16" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center">
android:text="@string/video_speed_3"
android:textColor="@color/white"/> <TextView
android:id="@+id/tv_select4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/size_8"
android:paddingTop="@dimen/size_3"
android:paddingRight="@dimen/size_8"
android:paddingBottom="@dimen/size_3"
android:text="@string/video_speed_3"
android:textColor="@color/white"
android:textSize="@dimen/text_16" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -2,12 +2,14 @@ ...@@ -2,12 +2,14 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_bg" android:id="@+id/ll_bg"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="60dp"> android:layout_height="50dp">
<ImageView <ImageView
android:id="@+id/cover_iv1" android:id="@+id/cover_iv1"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_10"
android:layout_marginRight="@dimen/size_10"
android:layout_weight="1" android:layout_weight="1"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/avatar_normal" /> android:src="@drawable/avatar_normal" />
...@@ -16,6 +18,8 @@ ...@@ -16,6 +18,8 @@
android:id="@+id/cover_iv2" android:id="@+id/cover_iv2"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_10"
android:layout_marginRight="@dimen/size_10"
android:layout_weight="1" android:layout_weight="1"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/avatar_normal" /> android:src="@drawable/avatar_normal" />
...@@ -24,6 +28,8 @@ ...@@ -24,6 +28,8 @@
android:id="@+id/cover_iv3" android:id="@+id/cover_iv3"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_10"
android:layout_marginRight="@dimen/size_10"
android:layout_weight="1" android:layout_weight="1"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/avatar_normal" /> android:src="@drawable/avatar_normal" />
...@@ -32,6 +38,8 @@ ...@@ -32,6 +38,8 @@
android:id="@+id/cover_iv4" android:id="@+id/cover_iv4"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_10"
android:layout_marginRight="@dimen/size_10"
android:layout_weight="1" android:layout_weight="1"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/avatar_normal" /> android:src="@drawable/avatar_normal" />
...@@ -40,6 +48,8 @@ ...@@ -40,6 +48,8 @@
android:id="@+id/cover_iv5" android:id="@+id/cover_iv5"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_10"
android:layout_marginRight="@dimen/size_10"
android:layout_weight="1" android:layout_weight="1"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/avatar_normal" /> android:src="@drawable/avatar_normal" />
...@@ -48,22 +58,8 @@ ...@@ -48,22 +58,8 @@
android:id="@+id/cover_iv6" android:id="@+id/cover_iv6"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_marginLeft="@dimen/size_10"
android:scaleType="fitXY" android:layout_marginRight="@dimen/size_10"
android:src="@drawable/avatar_normal" />
<ImageView
android:id="@+id/cover_iv7"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:scaleType="fitXY"
android:src="@drawable/avatar_normal" />
<ImageView
android:id="@+id/cover_iv8"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/avatar_normal" /> android:src="@drawable/avatar_normal" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment