fix [修复-bug]

This commit is contained in:
hch
2024-04-03 13:11:10 +08:00
parent 0f9f53a080
commit 04bc9af501
28 changed files with 469 additions and 238 deletions

View File

@@ -7,8 +7,7 @@
<application
android:allowBackup="true"
tools:replace="allowBackup"
>
tools:replace="allowBackup">
<!-- <meta-data-->
<!-- android:name="com.google.ar.core"-->
@@ -68,6 +67,9 @@
android:name="com.yunbao.common.activity.PreviewVideoActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.yunbao.common.activity.VideoPlayActivity"
android:screenOrientation="portrait" />
</application>
</manifest>

View File

@@ -128,23 +128,23 @@ public class CommonAppConfig {
newCommunityTypeList.add(type0);
}
NewCommunityType type17 = new NewCommunityType();
type17.setId(17);
type17.setId(5);
type17.setTalk_name(mContext.getResources().getString(R.string.main_active_type_01));
NewCommunityType type16 = new NewCommunityType();
type16.setId(16);
type16.setId(4);
type16.setTalk_name(mContext.getResources().getString(R.string.main_active_type_02));
NewCommunityType type15 = new NewCommunityType();
type15.setId(15);
type15.setId(3);
type15.setTalk_name(mContext.getResources().getString(R.string.main_active_type_03));
NewCommunityType type14 = new NewCommunityType();
type14.setId(14);
type14.setId(2);
type14.setTalk_name(mContext.getResources().getString(R.string.main_active_type_04));
NewCommunityType type13 = new NewCommunityType();
type13.setId(13);
type13.setId(1);
type13.setTalk_name(mContext.getResources().getString(R.string.main_active_type_05));
newCommunityTypeList.add(type17);

View File

@@ -0,0 +1,40 @@
package com.yunbao.common.activity;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.VideoView;
import androidx.annotation.Nullable;
import com.yunbao.common.R;
public class VideoPlayActivity extends AbsActivity {
private VideoView videoPlay;
@Override
protected int getLayoutId() {
return R.layout.activity_google_play;
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
Uri url = getIntent().getParcelableExtra("videoUri");
super.onCreate(savedInstanceState);
videoPlay = findViewById(R.id.videoPlay);
videoPlay.setVideoURI(url);
videoPlay.start();
findViewById(R.id.back).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}
@Override
protected void onDestroy() {
super.onDestroy();
}
}

View File

@@ -0,0 +1,47 @@
package com.yunbao.common.bean;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.NonNull;
/**
* 社區动态
*/
public class ShareBean extends BaseModel implements Parcelable {
private int num;
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
protected ShareBean(Parcel in) {
num = in.readInt();
}
public static final Creator<ShareBean> CREATOR = new Creator<ShareBean>() {
@Override
public ShareBean createFromParcel(Parcel in) {
return new ShareBean(in);
}
@Override
public ShareBean[] newArray(int size) {
return new ShareBean[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
dest.writeInt(num);
}
}

View File

@@ -73,6 +73,7 @@ import com.yunbao.common.bean.RedPacketListBean;
import com.yunbao.common.bean.RoomMicStatusModel;
import com.yunbao.common.bean.SearchModel;
import com.yunbao.common.bean.SetAttentsModel;
import com.yunbao.common.bean.ShareBean;
import com.yunbao.common.bean.SlideInBannerModel;
import com.yunbao.common.bean.StarChallengeStatusModel;
import com.yunbao.common.bean.SudGameUserModel;
@@ -1302,4 +1303,8 @@ public interface PDLiveApi {
Observable<ResponseModel<List<Integer>>> getUserLiveStatus(
@Query("ids")String ids
);
@GET("/api/public/?service=Pdlcommunity.userClickDynamicShare")
Observable<ResponseModel<ShareBean>> shareCount(@Query("dynamic_id") String dynamic_id);
}

View File

@@ -73,6 +73,7 @@ import com.yunbao.common.bean.RedPacketInfoModel;
import com.yunbao.common.bean.RedPacketListBean;
import com.yunbao.common.bean.RoomMicStatusModel;
import com.yunbao.common.bean.SetAttentsModel;
import com.yunbao.common.bean.ShareBean;
import com.yunbao.common.bean.StarChallengeStatusModel;
import com.yunbao.common.bean.SudGameUserModel;
import com.yunbao.common.bean.SudRoomListModel;
@@ -3541,6 +3542,32 @@ public class LiveNetManager {
}
}).isDisposed();
}
public void shreCount(String dynamic_id, HttpCallback<ShareBean> callback) {
API.get().pdLiveApi(mContext)
.shareCount(dynamic_id)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<ShareBean>>() {
@Override
public void accept(ResponseModel<ShareBean> messageUserInfoBeanResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(messageUserInfoBeanResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
throwable.printStackTrace();
if (callback != null) {
callback.onError(mContext.getString(R.string.net_error));
}
}
}).isDisposed();
}
private MultipartBody.Part createUploadFile(File file) {
RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
return MultipartBody.Part.createFormData("file", file.getName(), requestBody);

View File

@@ -91,7 +91,7 @@ public class MessageSayHiNotifyManager {
@Override
public void onError(String error) {
Log.e(TAG, "onError: "+error );
Log.e(TAG, "onError: " + error);
}
@@ -177,7 +177,9 @@ public class MessageSayHiNotifyManager {
return new TimerTask() {
@Override
public void run() {
timer.cancel();
if (timer != null) {
timer.cancel();
}
cancel();
Log.i(TAG, "run: 定时器到点,启动下一轮");
next();

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="90"
android:centerColor="#8391FE"
android:endColor="#818CFF"
android:startColor="#8D9DFF" />
</shape>

View File

@@ -72,10 +72,11 @@
android:layout_marginBottom="20dp"
android:visibility="gone">
<VideoView
<ImageView
android:id="@+id/videoView"
android:layout_width="200dp"
android:layout_height="200dp" />
android:layout_height="200dp"
android:scaleType="centerCrop" />
<ImageView
android:id="@+id/delVideo"

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<VideoView
android:id="@+id/videoPlay"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />
<ImageView
android:id="@+id/back"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="30dp"
android:padding="10dp"
android:src="@mipmap/icon_left" />
</RelativeLayout>

View File

@@ -282,15 +282,50 @@
android:layout_height="20dp"
android:src="@mipmap/icon_wumen" />
<ImageView
android:id="@+id/authorlIcon"
<RelativeLayout
android:id="@+id/authorIconLayout"
android:layout_width="50dp"
android:layout_height="20dp" />
android:layout_height="20dp"
android:layout_marginLeft="10dp">
<ImageView
android:id="@+id/levelIcon"
<ImageView
android:id="@+id/authorlIcon"
android:layout_width="50dp"
android:layout_height="20dp" />
<TextView
android:id="@+id/authorlNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="25dp"
android:text="1"
android:textColor="@color/white"
android:textSize="11dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/levelIconLayout"
android:layout_width="50dp"
android:layout_height="20dp" />
android:layout_height="20dp"
android:layout_marginLeft="10dp">
<ImageView
android:id="@+id/levelIcon"
android:layout_width="50dp"
android:layout_height="20dp" />
<TextView
android:id="@+id/levelNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="25dp"
android:text="1"
android:textColor="@color/white"
android:textSize="11dp" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/userPresidentLayout"