diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 33167f52e..8fd155fc8 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -295,3 +295,7 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode; -keep class com.shayu.lib_google.**{*;} -keep class com.shayu.lib_huawei.**{*;} + +-keep class com.qiniu.**{*;} +-keep class com.qiniu.**{public ();} +-ignorewarnings diff --git a/common/proguard-rules.pro b/common/proguard-rules.pro index adcfd4222..3489a108d 100644 --- a/common/proguard-rules.pro +++ b/common/proguard-rules.pro @@ -23,3 +23,6 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile +-keep class com.qiniu.**{*;} +-keep class com.qiniu.**{public ();} +-ignorewarnings \ No newline at end of file diff --git a/common/src/main/java/com/yunbao/common/upload/UploadBean.java b/common/src/main/java/com/yunbao/common/upload/UploadBean.java index df599dc7b..920f3a570 100644 --- a/common/src/main/java/com/yunbao/common/upload/UploadBean.java +++ b/common/src/main/java/com/yunbao/common/upload/UploadBean.java @@ -89,4 +89,17 @@ public class UploadBean { public void setTag(Object tag) { mTag = tag; } + + @Override + public String toString() { + return "UploadBean{" + + "mOriginFile=" + mOriginFile + + ", mCompressFile=" + mCompressFile + + ", mRemoteFileName='" + mRemoteFileName + '\'' + + ", mRemoteAccessUrl='" + mRemoteAccessUrl + '\'' + + ", mSuccess=" + mSuccess + + ", mType=" + mType + + ", mTag=" + mTag + + '}'; + } } diff --git a/common/src/main/java/com/yunbao/common/upload/UploadQnImpl.java b/common/src/main/java/com/yunbao/common/upload/UploadQnImpl.java index dd97616fa..a96ce6a21 100644 --- a/common/src/main/java/com/yunbao/common/upload/UploadQnImpl.java +++ b/common/src/main/java/com/yunbao/common/upload/UploadQnImpl.java @@ -50,7 +50,8 @@ public class UploadQnImpl implements UploadStrategy { mCompletionHandler = new UpCompletionHandler() { @Override public void complete(String key, ResponseInfo info, JSONObject response) { - L.e("UploadQnImpl 上传-----ok----> " + info.isOK() + "--key---> " + "---response---> " + (response != null ? response.toString() : null)); + System.out.println("UploadQnImpl 上传-----ok----> " + info.isOK() + "--key---> " + "---response---> " + (response != null ? response.toString() : null)); + //L.e("UploadQnImpl 上传-----ok----> " + info.isOK() + "--key---> " + "---response---> " + (response != null ? response.toString() : null)); try { assert response != null; mList.get(mIndex).setRemoteAccessUrl(response.getString("key")); @@ -93,6 +94,7 @@ public class UploadQnImpl implements UploadStrategy { @Override public void upload(List list, boolean needCompress, UploadCallback callback, boolean isImg) { + System.err.println("-------upload------>" + list.size()); if (callback == null) { return; } @@ -122,6 +124,7 @@ public class UploadQnImpl implements UploadStrategy { public void onSuccess(int code, String msg, String[] info) { if (code == 0 && info.length > 0) { mToken = info[0]; + System.err.println("-------上传的token------>" + mToken); L.e(TAG, "-------上传的token------>" + mToken); uploadNext(); } @@ -145,10 +148,13 @@ public class UploadQnImpl implements UploadStrategy { while (mIndex < mList.size() && (bean = mList.get(mIndex)).getOriginFile() == null) { mIndex++; } + System.err.println("-------mIndex >= mList.size() mIndex------>" + mIndex); if (mIndex >= mList.size()) { + System.err.println("-------mIndex >= mList.size()------>" + mList.size()); if (mUploadCallback != null) { mUploadCallback.onFinish(mList, true); } + System.err.println("-------mIndex >= mList.returnreturnreturnreturn------>" + mList.size()); return; } if (bean.getType() == UploadBean.IMG) { @@ -158,7 +164,10 @@ public class UploadQnImpl implements UploadStrategy { } else if (bean.getType() == UploadBean.VOICE) { bean.setRemoteFileName(StringUtil.contact(StringUtil.generateFileName(), ".m4a")); } - if (bean.getType() == UploadBean.IMG && mNeedCompress) { + System.err.println("-------mIndex >= bean.getType() == UploadBean.IMG------>" + bean); + upload(bean); + /*if (bean.getType() == UploadBean.IMG && mNeedCompress) { + System.err.println("-------UploadBean.IMG && mNeedCompress------>" + bean + "UploadBean.IMG:" + UploadBean.IMG + "__mNeedCompress" + mNeedCompress); if (mLubanBuilder == null) { mLubanBuilder = Luban.with(mContext).ignoreBy(8)//8k以下不压缩 .setTargetDir(CommonAppConfig.INNER_PATH).setRenameListener(new OnRenameListener() { @@ -186,12 +195,15 @@ public class UploadQnImpl implements UploadStrategy { } mLubanBuilder.load(bean.getOriginFile()).launch(); } else { + System.err.println("-------bean.getType() == UploadBean.IMG && mNeedCompress else"); upload(bean); - } + }*/ } private void upload(UploadBean bean) { + System.err.println("-------upload(UploadBean bean)------>" + bean); if (bean != null && !TextUtils.isEmpty(mToken) && mCompletionHandler != null) { + System.err.println("bean != null && !TextUtils.isEmpty(mToken) && mCompletionHandler != null"); if (mUploadManager == null) { Zone zone = new Zone(new ServiceAddress("http://upload-z0.qiniup.com"), new ServiceAddress("http://up-z0.qiniup.com")); Configuration configuration = new Configuration.Builder().zone(zone).build(); @@ -206,6 +218,7 @@ public class UploadQnImpl implements UploadStrategy { } mUploadManager.put(uploadFile, bean.getRemoteFileName(), mToken, mCompletionHandler, null); } else { + System.err.println("else bean != null && !TextUtils.isEmpty(mToken) && mCompletionHandler != null"); if (mUploadCallback != null) { mUploadCallback.onFinish(mList, false); } diff --git a/common/src/main/java/com/yunbao/common/views/GradientDrawable.java b/common/src/main/java/com/yunbao/common/views/GradientDrawable.java new file mode 100644 index 000000000..f663208be --- /dev/null +++ b/common/src/main/java/com/yunbao/common/views/GradientDrawable.java @@ -0,0 +1,18 @@ +package com.yunbao.common.views; + +public class GradientDrawable extends android.graphics.drawable.GradientDrawable { + private int startColor; + private int endColor; + + public GradientDrawable(int startColor, int endColor) { + super(Orientation.TOP_BOTTOM, new int[]{startColor, endColor}); + this.startColor = startColor; + this.endColor = endColor; + } + + public void setColors(int startColor, int endColor) { + this.startColor = startColor; + this.endColor = endColor; + setColors(new int[]{startColor, endColor}); + } +} diff --git a/common/src/main/res/layout/activity_user_home.xml b/common/src/main/res/layout/activity_user_home.xml index 732c904b3..ab597c2ad 100644 --- a/common/src/main/res/layout/activity_user_home.xml +++ b/common/src/main/res/layout/activity_user_home.xml @@ -43,6 +43,13 @@ android:layout_height="match_parent" android:scaleType="centerCrop" /> + + @@ -92,9 +90,8 @@ android:id="@+id/report" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="10dp" android:layout_marginRight="5dp" - android:padding="10dp" + android:padding="9dp" android:text="@string/chat_report" android:textColor="#333333" android:textSize="11dp" diff --git a/common/src/main/res/mipmap-xxhdpi/bg_main_bg.png b/common/src/main/res/mipmap-xxhdpi/bg_main_bg.png new file mode 100644 index 000000000..eecc6cc42 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/bg_main_bg.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_back_new01.png b/common/src/main/res/mipmap-xxhdpi/icon_back_new01.png new file mode 100644 index 000000000..7ce24ef41 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_back_new01.png differ diff --git a/common/src/main/res/values-en-rUS/strings.xml b/common/src/main/res/values-en-rUS/strings.xml index 4aef2d31d..c276ed84e 100644 --- a/common/src/main/res/values-en-rUS/strings.xml +++ b/common/src/main/res/values-en-rUS/strings.xml @@ -35,4 +35,5 @@ Uploading... Upload failed Please fill in the publication content + Details \ No newline at end of file diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index ac78b6c8b..61b1c0969 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1500,4 +1500,5 @@ 上傳中... 上傳失敗 請填寫發佈內容 + 詳情 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index 2e7f05456..d9bf98fa0 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1500,4 +1500,5 @@ 上傳中... 上傳失敗 請填寫發佈內容 + 詳情 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 919df0477..7d1fc711f 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1498,4 +1498,5 @@ 上傳中... 上傳失敗 請填寫發佈內容 + 詳情 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index cf8be52e5..dcffd0d08 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1520,5 +1520,6 @@ Limited ride And limited avatar frame 上傳中... 上傳失敗 請填寫發佈內容 + 詳情 diff --git a/live/src/main/res/layout/item_main_com.xml b/live/src/main/res/layout/item_main_com.xml index 3968580a9..c7ededfe6 100644 --- a/live/src/main/res/layout/item_main_com.xml +++ b/live/src/main/res/layout/item_main_com.xml @@ -7,7 +7,8 @@ android:layout_marginLeft="8dp" android:layout_marginTop="10dp" app:cardBackgroundColor="@color/white" - app:cardCornerRadius="15dp"> + app:cardCornerRadius="15dp" + app:cardElevation="0dp"> + app:cardCornerRadius="15dp" + app:cardElevation="0dp"> + diff --git a/main/src/main/java/com/yunbao/main/activity/CommunityDetailsActivity.java b/main/src/main/java/com/yunbao/main/activity/CommunityDetailsActivity.java index 867375d17..eefd29c3b 100644 --- a/main/src/main/java/com/yunbao/main/activity/CommunityDetailsActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/CommunityDetailsActivity.java @@ -114,6 +114,7 @@ public class CommunityDetailsActivity extends AbsActivity { } private void initView() { + setTitle(getResources().getString(com.yunbao.main.R.string.comm_details)); liveStatus = findViewById(R.id.liveStatus); videoLayout = findViewById(R.id.videoLayout); send = findViewById(R.id.send); diff --git a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java index ef81183db..f8c92ac9b 100644 --- a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java @@ -69,6 +69,7 @@ import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; +import com.yunbao.common.views.GradientDrawable; import com.yunbao.common.views.UserHomeImgsViewHolder; import com.yunbao.live.activity.LiveRyAnchorActivity; import com.yunbao.live.dialog.GiftWallDialog; @@ -163,6 +164,7 @@ public class UserHomeActivity extends AbsActivity { private Map gotoRoomKey = new HashMap<>(); private TextView authorNum; private TextView levelNum; + private View top_bg; @Override protected int getLayoutId() { @@ -358,7 +360,7 @@ public class UserHomeActivity extends AbsActivity { myFlowTag.setTagCheckedMode(FlowTagLayout.FLOW_TAG_CHECKED_NONE); myAdapter.setData(tagList); } - }else{ + } else { if (userInfo.getUserHomeTopInfo().getCn_label().size() > 0) { for (int i = 0; i < userInfo.getUserHomeTopInfo().getEn_label().size(); i++) { if (!StringUtil.isEmpty(userInfo.getUserHomeTopInfo().getEn_label().get(i))) { @@ -496,6 +498,9 @@ public class UserHomeActivity extends AbsActivity { } private void initView() { + top_bg = findViewById(R.id.top_bg); + GradientDrawable gradientDrawable = new GradientDrawable(Color.TRANSPARENT, Color.GRAY); + top_bg.setBackground(gradientDrawable); authorNum = findViewById(R.id.authorlNum); levelNum = findViewById(R.id.levelNum); fanName = findViewById(R.id.fanName); diff --git a/main/src/main/java/com/yunbao/main/views/AbsMainHomeParentComViewHolder.java b/main/src/main/java/com/yunbao/main/views/AbsMainHomeParentComViewHolder.java index 2e334a04c..6df39e8fc 100644 --- a/main/src/main/java/com/yunbao/main/views/AbsMainHomeParentComViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/AbsMainHomeParentComViewHolder.java @@ -63,10 +63,10 @@ public abstract class AbsMainHomeParentComViewHolder extends AbsMainViewHolder { for (int i = 0; i < simplePagerTitleViewList.size(); i++) { if (index == i) { simplePagerTitleViewList.get(i).setVisibility(View.VISIBLE); - textViewList.get(i).setTextSize(20); + textViewList.get(i).setTextSize(22); } else { simplePagerTitleViewList.get(i).setVisibility(View.INVISIBLE); - textViewList.get(i).setTextSize(18); + textViewList.get(i).setTextSize(16); } } } @@ -168,7 +168,7 @@ public abstract class AbsMainHomeParentComViewHolder extends AbsMainViewHolder { if (index == 3) { return; } - titleText.setTextSize(20); + titleText.setTextSize(22); } @Override @@ -176,7 +176,7 @@ public abstract class AbsMainHomeParentComViewHolder extends AbsMainViewHolder { if (index == 3) { return; } - titleText.setTextSize(18); + titleText.setTextSize(16); } @Override diff --git a/main/src/main/res/layout/activity_main.xml b/main/src/main/res/layout/activity_main.xml index e50b76287..9731f2831 100644 --- a/main/src/main/res/layout/activity_main.xml +++ b/main/src/main/res/layout/activity_main.xml @@ -5,7 +5,7 @@ android:id="@+id/mainSlideMenu" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/white" + android:background="#F7F7F7" app:contentAlpha="0.5" app:contentToggle="true" app:slideMode="left" diff --git a/main/src/main/res/layout/view_homemain.xml b/main/src/main/res/layout/view_homemain.xml index f5c99f8d3..91ceaaccc 100644 --- a/main/src/main/res/layout/view_homemain.xml +++ b/main/src/main/res/layout/view_homemain.xml @@ -8,6 +8,7 @@ @@ -47,7 +48,7 @@ android:layout_weight="1" app:tbn_checked="true" app:tbn_icon_array_id="@array/main_tab_home" - app:tbn_icon_size="28dp" + app:tbn_icon_size="25dp" app:tbn_text_color_checked="@color/colorMainTab" app:tbn_text_color_unchecked="@color/gray1" app:tbn_text_size="11sp" @@ -59,7 +60,7 @@ android:layout_marginRight="60dp" android:layout_weight="1" app:tbn_icon_array_id="@array/main_tab_video" - app:tbn_icon_size="28dp" + app:tbn_icon_size="25dp" app:tbn_text_color_checked="@color/colorMainTab" app:tbn_text_color_unchecked="@color/gray1" app:tbn_text_size="11sp" @@ -70,7 +71,7 @@ android:layout_height="match_parent" android:layout_weight="1" app:tbn_icon_array_id="@array/main_tab_list" - app:tbn_icon_size="28dp" + app:tbn_icon_size="25dp" app:tbn_text_color_checked="@color/colorMainTab" app:tbn_text_color_unchecked="@color/gray1" app:tbn_text_size="11sp" @@ -81,7 +82,7 @@ android:layout_height="match_parent" android:layout_weight="1" app:tbn_icon_array_id="@array/main_tab_chat" - app:tbn_icon_size="28dp" + app:tbn_icon_size="25dp" app:tbn_text_color_checked="@color/colorMainTab" app:tbn_text_color_unchecked="@color/gray1" app:tbn_text_size="11sp" diff --git a/main/src/main/res/layout/view_main_home_com.xml b/main/src/main/res/layout/view_main_home_com.xml index 3e56bdeeb..4442a10d0 100644 --- a/main/src/main/res/layout/view_main_home_com.xml +++ b/main/src/main/res/layout/view_main_home_com.xml @@ -43,13 +43,13 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginLeft="10dp" - android:layout_marginTop="5dp" + android:layout_marginTop="6dp" android:layout_toRightOf="@+id/indicator" android:gravity="center" android:paddingTop="1dp" android:text="@string/main_type_theater" android:textColor="@color/black1" - android:textSize="18dp" + android:textSize="16dp" android:textStyle="bold" /> diff --git a/video/src/main/java/com/yunbao/video/views/VideoPlayViewHolder.java b/video/src/main/java/com/yunbao/video/views/VideoPlayViewHolder.java index b09b19809..ca9b69667 100644 --- a/video/src/main/java/com/yunbao/video/views/VideoPlayViewHolder.java +++ b/video/src/main/java/com/yunbao/video/views/VideoPlayViewHolder.java @@ -58,11 +58,15 @@ public class VideoPlayViewHolder extends AbsViewHolder implements View.OnClickLi } private void intiPlayView() { - DefaultLoadControl control = new DefaultLoadControl.Builder().setPrioritizeTimeOverSizeThresholds(false).setBackBuffer(10_000, true).setBufferDurationsMs(500, 5_000, 150, 200).build(); + DefaultLoadControl control = new DefaultLoadControl.Builder() + .setPrioritizeTimeOverSizeThresholds(false) + .setBackBuffer(10_000, true) + .setBufferDurationsMs(500, 5_000, 150, 200) + .build(); mPlayer = new ExoPlayer.Builder(mContext).setLoadControl(control).build(); placeholderView = findViewById(com.yunbao.live.R.id.placeholderView); mPlayer = new ExoPlayer.Builder(mContext).setLoadControl(control).build(); - mPlayer.setVideoScalingMode(C.VIDEO_SCALING_MODE_DEFAULT); + mPlayer.setVideoScalingMode(C.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING); mPlayer.addListener(new Player.Listener() { @Override @@ -90,8 +94,8 @@ public class VideoPlayViewHolder extends AbsViewHolder implements View.OnClickLi /*if (mActionListener != null) { mActionListener.onVideoSize(videoSize.height, videoSize.width); }*/ - L.e("onVideoSizeChanged————Height----"+videoSize.height); - L.e("onVideoSizeChanged————Width----"+videoSize.width); + L.e("onVideoSizeChanged————Height----" + videoSize.height); + L.e("onVideoSizeChanged————Width----" + videoSize.width); } @Override @@ -106,7 +110,7 @@ public class VideoPlayViewHolder extends AbsViewHolder implements View.OnClickLi } }); //placeholderView.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FIXED_WIDTH); - placeholderView.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FILL); + placeholderView.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FIXED_WIDTH);//设置为自适应宽度 placeholderView.requestLayout(); placeholderView.setKeepContentOnPlayerReset(false); placeholderView.setPlayer(mPlayer); @@ -149,7 +153,7 @@ public class VideoPlayViewHolder extends AbsViewHolder implements View.OnClickLi if (mPlayer.isPlaying()) { mPlayer.stop(); } - L.e("播放视频--->" + videoBean); + L.e("播放视频--->" + videoBean.getVideo()); mPlayer.setMediaItem(createMediaItem(videoBean.getVideo())); mPlayer.prepare(); mPlayer.play(); diff --git a/video/src/main/res/layout/activity_video_play.xml b/video/src/main/res/layout/activity_video_play.xml index 1807b0dc2..1a103f270 100644 --- a/video/src/main/res/layout/activity_video_play.xml +++ b/video/src/main/res/layout/activity_video_play.xml @@ -11,14 +11,12 @@