BuWanVideo/build.gradle | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
BuWanVideo/res/layout/act_phone_login.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
BuWanVideo/res/layout/browser_pptv_activity.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
BuWanVideo/src/com/weikou/beibeivideo/entity/vo/WatchHistoryVO.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
BuWanVideo/src/com/weikou/beibeivideo/ui/login/PhoneLoginActivity.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
BuWanVideo/src/com/weikou/beibeivideo/ui/main/MineFragment.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
BuWanVideo/src/com/weikou/beibeivideo/ui/mine/BrowserActivity.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
BuWanVideo/src/com/weikou/beibeivideo/ui/mine/PPTVPlayFragment.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
BuWanVideo/src/com/weikou/beibeivideo/ui/recent/WatchHistoryAdapter.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
BuWanVideo/src/com/weikou/beibeivideo/ui/recent/WatchHistoryFragment.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
BuWanVideo/build.gradle
@@ -69,14 +69,14 @@ } android { // signingConfigs { // debug { // storeFile file('D:\\项目\\影音\\签名\\doudouvideo.jks') // storePassword 'weikou2015' // keyAlias '豆豆' // keyPassword 'weikou2015' // } // } signingConfigs { debug { storeFile file('D:\\项目\\影音\\签名\\doudouvideo.jks') storePassword 'weikou2015' keyAlias '豆豆' keyPassword 'weikou2015' } } useLibrary 'org.apache.http.legacy' compileSdkVersion 27 buildToolsVersion '29.0.2' BuWanVideo/res/layout/act_phone_login.xml
@@ -53,6 +53,8 @@ android:layout_marginLeft="50dp" android:layout_marginTop="174dp" android:layout_marginRight="50dp" android:focusable="true" android:focusableInTouchMode="true" android:gravity="center" android:orientation="vertical"> @@ -79,7 +81,7 @@ style="@style/loginInputStyle" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="21dp" android:layout_marginLeft="15dp" android:hint="请输入您的手机号" android:inputType="phone" /> </LinearLayout> @@ -103,7 +105,7 @@ style="@style/loginInputStyle" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginLeft="18dp" android:layout_marginLeft="12dp" android:layout_weight="1" android:digits="@string/rule_number" android:hint="请输入您的验证码" BuWanVideo/res/layout/browser_pptv_activity.xml
@@ -5,84 +5,89 @@ android:background="#000000" android:orientation="vertical"> <FrameLayout android:id="@+id/fl_container" android:layout_width="match_parent" android:layout_height="match_parent"> <WebView android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="match_parent" /> <FrameLayout android:id="@+id/fl_ad" android:id="@+id/fl_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone"> android:layout_height="match_parent"> <WebView android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="match_parent" /> <FrameLayout android:id="@+id/fl_ad" android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone"> </FrameLayout> <LinearLayout android:id="@+id/ll_bottom" android:layout_width="match_parent" android:layout_height="48dp" android:layout_gravity="bottom" android:background="#b4000000" android:gravity="center_vertical"> <ImageView android:id="@+id/iv_add_to_favourite" android:layout_width="wrap_content" android:layout_height="21dp" android:layout_marginLeft="28.5dp" android:src="@drawable/selector_favourite" /> <ImageView android:id="@+id/iv_watch_history" android:layout_width="wrap_content" android:layout_height="21dp" android:layout_marginLeft="23.5dp" android:src="@drawable/icon_video_detail_history" /> <View android:layout_width="0dp" android:layout_height="1dp" android:layout_weight="1" /> </FrameLayout> <LinearLayout android:id="@+id/ll_vip_open" android:layout_width="237dp" android:layout_height="38dp" android:background="@drawable/shape_video_detail_vip_btn" android:gravity="center" android:orientation="vertical"> android:id="@+id/ll_bottom" android:layout_width="match_parent" android:layout_height="48dp" android:layout_gravity="bottom" android:background="#b4000000" android:gravity="center_vertical"> <TextView android:id="@+id/tv_vip_open" <ImageView android:id="@+id/iv_add_to_favourite" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="开通VIP" android:textColor="#ff885e24" android:textSize="15sp" /> android:layout_height="21dp" android:layout_marginLeft="28.5dp" android:src="@drawable/selector_favourite" /> <TextView <ImageView android:id="@+id/iv_watch_history" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="海量高清无广告" android:textColor="#ff885e24" android:textSize="9sp" /> android:layout_height="21dp" android:layout_marginLeft="23.5dp" android:src="@drawable/icon_video_detail_history" /> <View android:layout_width="0dp" android:layout_height="1dp" android:layout_weight="1" /> <LinearLayout android:id="@+id/ll_vip_open" android:layout_width="150dp" android:layout_height="38dp" android:layout_marginRight="10dp" android:background="@drawable/shape_video_detail_vip_btn" android:gravity="center" android:orientation="vertical"> <TextView android:id="@+id/tv_vip_open" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="开通VIP" android:textColor="#ff885e24" android:textSize="15sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="海量高清无广告" android:textColor="#ff885e24" android:textSize="9sp" /> </LinearLayout> </LinearLayout> </LinearLayout> </FrameLayout> </FrameLayout> <TextView BuWanVideo/src/com/weikou/beibeivideo/entity/vo/WatchHistoryVO.java
@@ -5,7 +5,7 @@ public class WatchHistoryVO { private String id; private Long createTime; private VideoInfo videoInfo; private VideoInfo video; private int position; //选中 private boolean selected; @@ -19,12 +19,12 @@ this.id = id; } public VideoInfo getVideoInfo() { return videoInfo; public VideoInfo getVideo() { return video; } public void setVideoInfo(VideoInfo videoInfo) { this.videoInfo = videoInfo; public void setVideo(VideoInfo video) { this.video = video; } public Long getCreateTime() { BuWanVideo/src/com/weikou/beibeivideo/ui/login/PhoneLoginActivity.java
@@ -420,6 +420,7 @@ if (jsonObject.optBoolean("IsPost")) { //绑定成功 Toast.makeText(PhoneLoginActivity.this, "绑定成功", Toast.LENGTH_SHORT).show(); mPhoneNumberAuthHelper.quitLoginPage(); PhoneLoginActivity.this.finish(); } else { Toast.makeText(PhoneLoginActivity.this, jsonObject.optString("Error"), Toast.LENGTH_SHORT).show(); BuWanVideo/src/com/weikou/beibeivideo/ui/main/MineFragment.java
@@ -288,8 +288,10 @@ break; case R.id.tv_vip_open: if (!UserUtil.isLogin(tv_no_network.getContext())) if (!UserUtil.isLogin(tv_no_network.getContext())) { startActivity(new Intent(tv_no_network.getContext(), LoginActivity.class)); return; } String url = ConfigUtil.getVipLink(tv_no_network.getContext()); if (StringUtils.isEmpty(url)) { return; BuWanVideo/src/com/weikou/beibeivideo/ui/mine/BrowserActivity.java
@@ -193,7 +193,7 @@ .getDrawable(R.drawable.color_progressbar)); initX5WebView(); String url = getIntent().getStringExtra("url"); // String url="http://192.168.3.122:8848/buwan-web/BuWanWeb/vip/index.html"; // String url="http://192.168.3.122:8848/buwan-web/BuWanWeb/vip/pay_success.html?id=23"; webview.loadUrl(url); needSetResult = getIntent().getBooleanExtra("result", false); } BuWanVideo/src/com/weikou/beibeivideo/ui/mine/PPTVPlayFragment.java
@@ -274,7 +274,6 @@ } isCollect(); } Dialog vipDialog; @@ -315,7 +314,16 @@ public void onClick(View v) { switch (v.getId()) { case R.id.tv_top_bar_left: { getActivity().finish(); if (getActivity().getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) { getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); WindowManager.LayoutParams attrs = getActivity().getWindow().getAttributes(); attrs.flags &= ~WindowManager.LayoutParams.FLAG_FULLSCREEN; getActivity().getWindow().setAttributes(attrs); } else { getActivity().finish(); } } case R.id.iv_add_to_favourite: collect(collected); @@ -335,10 +343,33 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) { Log.d(TAG, "onActivityResdult:" + requestCode); //从登录返回来的 if (requestCode == REQUEST_CODE_LOGIN && resultCode == Activity.RESULT_OK) { if (resultCode == Activity.RESULT_OK) { switch (requestCode) { case REQUEST_CODE_VIP: Log.i(TAG, "REQUEST_CODE_VIP"); UserUtil.updateUserInfo(BeibeiVideoApplication.application, new UserUtil.IUserInfoUpdateListener() { @Override public void noLogin() { } @Override public void onSuccess() { ll_vip_open.post(new Runnable() { @Override public void run() { initData(); } }); } @Override public void onFail(String msg) { } }); break; @@ -428,7 +459,7 @@ "user", Context.MODE_PRIVATE); String uid = preferences.getString("uid", ""); BeibeiVideoAPI.getScoreCollect(getContext(), uid, UserUtil.getLoginUid(BeibeiVideoApplication.application), videoId, 0+"", cancel ? "0" : "1", new BasicTextHttpResponseHandler() { 0 + "", cancel ? "0" : "1", new BasicTextHttpResponseHandler() { @Override public void onSuccessPerfect(int statusCode, BuWanVideo/src/com/weikou/beibeivideo/ui/recent/WatchHistoryAdapter.java
@@ -47,7 +47,7 @@ private void bindView(ViewHolder viewHolder, int position, VideoInfo videoInfo) { String subName = ""; String subName = (position + 1) + ""; if (subName.equalsIgnoreCase(videoInfo.getName())) { viewHolder.tv_title.setSingleLine(true); viewHolder.tv_title.setEllipsize(TruncateAt.END); @@ -77,7 +77,7 @@ private void getVideoDetail(WatchHistoryVO vo, final ViewHolder viewHolder) { viewHolder.tv_title.setTag(vo.getId()); VideoInfo videoInfo = vo.getVideoInfo(); VideoInfo videoInfo = vo.getVideo(); if (videoInfo != null) { bindView(viewHolder, vo.getPosition(), videoInfo); } @@ -126,7 +126,7 @@ view.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { VideoInfo videoInfo = vo.getVideoInfo(); VideoInfo videoInfo = vo.getVideo(); if (videoInfo != null) { int playingPosition = vo.getPosition(); BuWanVideo/src/com/weikou/beibeivideo/ui/recent/WatchHistoryFragment.java
@@ -1,5 +1,6 @@ package com.weikou.beibeivideo.ui.recent; import android.app.Dialog; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.widget.SwipeRefreshLayout; @@ -21,6 +22,7 @@ import com.weikou.beibeivideo.BeibeiVideoApplication; import com.weikou.beibeivideo.R; import com.weikou.beibeivideo.entity.vo.WatchHistoryVO; import com.weikou.beibeivideo.ui.dialog.LoadingDialogUtil; import com.weikou.beibeivideo.util.UserUtil; import org.apache.http.Header; @@ -49,6 +51,8 @@ private long count = 0; private Dialog loadingDialog; public void setDeleteCallback( DownloadAdapter2.IGetDeleteCallback getdeleteNumber) { this.getdeleteNumber = getdeleteNumber; @@ -56,7 +60,7 @@ mAdapter.setDeleteCallback(getdeleteNumber); } private void initView(View view){ private void initView(View view) { list = view.findViewById(R.id.list); list.setDividerHeight(1); mAdapter = new WatchHistoryAdapter(list.getContext(), voList); @@ -64,26 +68,25 @@ mAdapter.setDeleteCallback(getdeleteNumber); list.setAdapter(mAdapter); srl = view.findViewById(R.id.srl_watch_history); srl = view.findViewById(R.id.srl_watch_history); ProgressBar pb = new ProgressBar(getContext()); srl.setFooter(pb); srl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { currentPage = 1; getWatchHistory(currentPage); currentPage = 1; getWatchHistory(currentPage); } }); srl.setOnLoadListener(new RefreshLayout.OnLoadListener() { @Override public void onLoad() { getWatchHistory(currentPage+1); getWatchHistory(currentPage + 1); } }); srl.setRefreshing(true); loadingDialog = LoadingDialogUtil.getLoadingDialog(getContext(), ""); getWatchHistory(currentPage); } @@ -92,23 +95,22 @@ Bundle savedInstanceState) { View view = inflater.inflate(R.layout.watch_history_fragment, container, false); return view; } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); initView(view); empty = view.findViewById(R.id.fl_empty); } @Override public void onResume() { super.onResume(); mAdapter.setSelectedMode(false); if (mAdapter != null) mAdapter.setSelectedMode(false); MobclickAgent.onPageStart("主页面——最近——观看记录"); } @@ -166,8 +168,20 @@ if (list != null && list.size() > 0) { voList.addAll(list); } if (voList.size() > 0) { empty.setVisibility(View.GONE); } else { empty.setVisibility(View.VISIBLE); } mAdapter.notifyDataSetChanged(); } } @Override public void onFinish() { super.onFinish(); srl.setRefreshing(false); srl.setLoading(false); } }); } @@ -176,6 +190,20 @@ BeibeiVideoAPI.deleteWatchHistory(BeibeiVideoApplication.application, UserUtil.getUid(BeibeiVideoApplication.application), ids, new BasicTextHttpResponseHandler() { @Override public void onStart() { super.onStart(); if (loadingDialog != null && !loadingDialog.isShowing()) loadingDialog.show(); } @Override public void onFinish() { super.onFinish(); if (loadingDialog != null && loadingDialog.isShowing()) loadingDialog.dismiss(); } @Override public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { if (jsonObject.optBoolean("IsPost")) { for (int i = 0; i < voList.size(); i++) {