fix [修复]
This commit is contained in:
parent
7072aadcb6
commit
1e91f4c716
4
app/proguard-rules.pro
vendored
4
app/proguard-rules.pro
vendored
@ -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 <init>();}
|
||||
-ignorewarnings
|
||||
|
3
common/proguard-rules.pro
vendored
3
common/proguard-rules.pro
vendored
@ -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 <init>();}
|
||||
-ignorewarnings
|
@ -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 +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -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<UploadBean> 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);
|
||||
}
|
||||
|
@ -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});
|
||||
}
|
||||
}
|
@ -43,6 +43,13 @@
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<View
|
||||
android:id="@+id/top_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:alpha="0.1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
|
@ -71,7 +71,6 @@
|
||||
android:id="@+id/del"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="10dp"
|
||||
android:text="@string/delete"
|
||||
android:textColor="#777777"
|
||||
@ -82,8 +81,7 @@
|
||||
android:id="@+id/replyTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="10dp"
|
||||
android:padding="9dp"
|
||||
android:text="@string/dialog_message_chat_notify_btn"
|
||||
android:textColor="#777777"
|
||||
android:textSize="11dp" />
|
||||
@ -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"
|
||||
|
BIN
common/src/main/res/mipmap-xxhdpi/bg_main_bg.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/bg_main_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 865 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_back_new01.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/icon_back_new01.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
@ -35,4 +35,5 @@
|
||||
<string name="uploading">Uploading...</string>
|
||||
<string name="upload_fail">Upload failed</string>
|
||||
<string name="please_input_content">Please fill in the publication content</string>
|
||||
<string name="comm_details">Details</string>
|
||||
</resources>
|
@ -1500,4 +1500,5 @@
|
||||
<string name="uploading">上傳中...</string>
|
||||
<string name="upload_fail">上傳失敗</string>
|
||||
<string name="please_input_content">請填寫發佈內容</string>
|
||||
<string name="comm_details">詳情</string>
|
||||
</resources>
|
||||
|
@ -1500,4 +1500,5 @@
|
||||
<string name="uploading">上傳中...</string>
|
||||
<string name="upload_fail">上傳失敗</string>
|
||||
<string name="please_input_content">請填寫發佈內容</string>
|
||||
<string name="comm_details">詳情</string>
|
||||
</resources>
|
||||
|
@ -1498,4 +1498,5 @@
|
||||
<string name="uploading">上傳中...</string>
|
||||
<string name="upload_fail">上傳失敗</string>
|
||||
<string name="please_input_content">請填寫發佈內容</string>
|
||||
<string name="comm_details">詳情</string>
|
||||
</resources>
|
||||
|
@ -1520,5 +1520,6 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="uploading">上傳中...</string>
|
||||
<string name="upload_fail">上傳失敗</string>
|
||||
<string name="please_input_content">請填寫發佈內容</string>
|
||||
<string name="comm_details">詳情</string>
|
||||
|
||||
</resources>
|
||||
|
@ -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">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
@ -22,7 +23,8 @@
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="15dp">
|
||||
app:cardCornerRadius="15dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img"
|
||||
@ -105,4 +107,5 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
@ -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);
|
||||
|
@ -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<String, String> 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);
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
<com.yunbao.common.custom.MyViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:background="@mipmap/bg_main_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:canScroll="false" />
|
||||
@ -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"
|
||||
|
@ -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" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
@ -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();
|
||||
|
@ -11,14 +11,12 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:onClick="backClick"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/icon_video_music_back"
|
||||
android:tint="@color/white"
|
||||
android:src="@mipmap/icon_back_new01"
|
||||
android:visibility="visible" />
|
||||
|
||||
<View
|
||||
|
Loading…
Reference in New Issue
Block a user