新增帮助与反馈功能

This commit is contained in:
zlzw 2024-04-24 16:26:47 +08:00
parent 11ba2c45f8
commit d4d191fad6
29 changed files with 1432 additions and 23 deletions

View File

@ -6,6 +6,7 @@ import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
@ -30,7 +31,6 @@ import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.interfaces.LifeCycleListener;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.ClickUtil;
import com.yunbao.common.utils.ToastUtil;
import java.util.ArrayList;
import java.util.List;
@ -92,7 +92,8 @@ public abstract class AbsActivity extends AppCompatActivity {
protected void main() {
}
protected void create(){
protected void create() {
}
@ -107,6 +108,17 @@ public abstract class AbsActivity extends AppCompatActivity {
}
}
protected void setTitleBold(boolean bold) {
TextView titleView = (TextView) findViewById(R.id.titleView);
if (titleView != null) {
if (bold) {
titleView.setTypeface(Typeface.DEFAULT_BOLD);
} else {
titleView.setTypeface(Typeface.DEFAULT);
}
}
}
public void backClick(View v) {
if (v.getId() == R.id.btn_back) {
onBackPressed();
@ -181,14 +193,14 @@ public abstract class AbsActivity extends AppCompatActivity {
//友盟统计
// MobclickAgent.onResume(this);
MobclickAgent.onPageStart(this.mTag);
Log.e("MobclickAgent","MobclickAgent:_onResume_"+this.mTag);
Log.e("MobclickAgent", "MobclickAgent:_onResume_" + this.mTag);
}
@Override
protected void onPause() {
super.onPause();
MobclickAgent.onPageEnd(this.mTag);
Log.e("MobclickAgent","MobclickAgent:_onPause_"+this.mTag);
Log.e("MobclickAgent", "MobclickAgent:_onPause_" + this.mTag);
if (mLifeCycleListeners != null) {
for (LifeCycleListener listener : mLifeCycleListeners) {
listener.onPause();
@ -382,11 +394,12 @@ public abstract class AbsActivity extends AppCompatActivity {
break;
}
}
public boolean isKefu(String url){
if(url.contains("kefu")){
public boolean isKefu(String url) {
if (url.contains("kefu")) {
return true;
}
if(url.contains("https://newkf.yaoulive.com/")){
if (url.contains("https://newkf.yaoulive.com/")) {
return true;
}
return url.startsWith("https://kefu.yaoulive.com");

View File

@ -0,0 +1,25 @@
package com.yunbao.common.bean;
public class AvatarBean extends BaseModel {
private String avatar;
private String avatarThumb;
public AvatarBean() {
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getAvatarThumb() {
return avatarThumb;
}
public void setAvatarThumb(String avatarThumb) {
this.avatarThumb = avatarThumb;
}
}

View File

@ -42,7 +42,7 @@ import java.util.Locale;
*/
public class CommonHttpUtil {
public static final String GET_UPLOAD_QI_NIU_TOKEN = "getUploadQiNiuToken";
/**
* 初始化
@ -450,6 +450,16 @@ public class CommonHttpUtil {
public static void getUserBaseinfo(String touid, HttpCallback callback) {
HttpClient.getInstance().get("User.getUserBaseinfo", CommonHttpConsts.GET_USER_BASEINFO).params("touid", touid).execute(callback);
}
/**
* 上传文件 获取七牛云token的接口
*/
public static void getUploadQiNiuToken(HttpCallback callback, boolean isImg) {
HttpClient.getInstance().get("Pdluserhome.getQiNiuToken", "Pdluserhome.getQiNiuToken")
.params("uid", CommonAppConfig.getInstance().getUid())
.params("token", CommonAppConfig.getInstance().getToken())
.params("ext", isImg ? ".jpeg" : ".mp4")
.execute(callback);
}
//
// //埋点唯一性
// public static void setAdvertisingChannels(String operation, HttpCallback callback) {

View File

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.bean.ActiveModel;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.AvatarBean;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.BattlePassPoints;
import com.yunbao.common.bean.BattlePassTask;
@ -82,10 +83,13 @@ import java.util.List;
import java.util.Map;
import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
@ -111,7 +115,7 @@ public interface PDLiveApi {
@Field("uuid_Device") String uuidDevice,
@Field("pushid") String pushid,
@Field("lastlogindevice") String lastlogindevice,
@Field("langue")String langue
@Field("langue") String langue
);
/**
@ -1186,10 +1190,20 @@ public interface PDLiveApi {
@GET("/api/public/?service=Guard.participateMoneyLong")
Observable<ResponseModel<String>> participateMoneyLong(@Query("liveuid") String liveUid, @Query("send_money_long_key") String sendMoneyLongKey);
@GET("/api/public/?service=Guard.endSendMoneyLong")
Observable<ResponseModel<SendMoneyLongModel>> endSendMoneyLong(@Query("liveuid") String liveUid, @Query("send_money_long_key") String sendMoneyLongKey);
@GET("/api/public/?service=Guard.checkUpgrades")
Observable<ResponseModel<CheckUpgradesModel>> checkUpgrades(@Query("liveuid") String liveUid);
@GET("/api/public/?service=Guard.getRewards")
Observable<ResponseModel<Object>> guardGetRewards(@Query("guard_level") String guardLevel,@Query("liveuid") String liveUid);
Observable<ResponseModel<Object>> guardGetRewards(@Query("guard_level") String guardLevel, @Query("liveuid") String liveUid);
@Multipart
@POST("/api/public/?service=Pdlinfos.updateAvatar")
Observable<ResponseModel<AvatarBean>> updateFile(@Part MultipartBody.Part file, @Query("uid") String uid, @Query("token") String token);
@GET("/api/public/?service=User.userFeedback")
Observable<ResponseModel<List<BaseModel>>> feedback(@Query("problem_description") String content, @Query("problem_image") String images, @Query("contact_information") String ci);
}

View File

@ -4,9 +4,12 @@ import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.alibaba.fastjson.JSONArray;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
import com.yunbao.common.R;
import com.yunbao.common.bean.ActiveModel;
import com.yunbao.common.bean.AvatarBean;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.BattlePassPoints;
import com.yunbao.common.bean.BattlePassTask;
@ -79,6 +82,7 @@ import com.yunbao.common.http.base.CheckLiveCallBack;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.utils.WordUtil;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -88,6 +92,9 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
/**
@ -3160,6 +3167,63 @@ public class LiveNetManager {
}
public void updateFile(File file, HttpCallback<AvatarBean> callback) {
MultipartBody.Part uploadFile = createUploadFile(file);
API.get().pdLiveApi(mContext)
.updateFile(uploadFile, CommonAppConfig.getInstance().getUid(), CommonAppConfig.getInstance().getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<AvatarBean>>() {
@Override
public void accept(ResponseModel<AvatarBean> model) throws Exception {
if (callback != null) {
callback.onSuccess(model.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
}
}
}).isDisposed();
}
public void feedback(
String content,
JSONArray images,
String ci
, HttpCallback<HttpCallbackModel> callback) {
API.get().pdLiveApi(mContext)
.feedback(content, images.toString(), ci)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
@Override
public void accept(ResponseModel<List<BaseModel>> responseModel) {
if (callback != null) {
HttpCallbackModel model = new HttpCallbackModel();
model.setCode(responseModel.getData().getCode());
model.setMsg(responseModel.getData().getMsg());
callback.onSuccess(model);
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(mContext.getString(com.yunbao.common.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

@ -1,16 +1,62 @@
package com.yunbao.common.interfaces;
import android.content.Context;
import com.yunbao.common.CommonAppContext;
import com.yunbao.common.bean.AvatarBean;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.upload.UploadBean;
import com.yunbao.common.upload.UploadCallback;
import com.yunbao.common.upload.UploadQnImpl;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* Created by cxf on 2018/9/29.
*/
public interface ImageResultCallback {
public abstract class ImageResultCallback {
//跳转相机前执行
void beforeCamera();
public void beforeCamera() {
}
void onSuccess(File file);
public void onSuccess(File file) {
}
void onFailure();
public void onFailure() {
}
public void onSuccessToUrl(File file, OnItemClickListener<String> listener) {
LiveNetManager.get(CommonAppContext.getTopActivity())
.updateFile(file, new com.yunbao.common.http.base.HttpCallback<AvatarBean>() {
@Override
public void onSuccess(AvatarBean data) {
listener.onItemClick(data.getAvatar(), 0);
}
@Override
public void onError(String error) {
listener.onItemClick(error, -1);
}
});
}
public void onSuccessToQiNiuUrl(Context mContext, File file, OnItemClickListener<String> listener) {
UploadQnImpl mUploadStrategy = new UploadQnImpl(mContext);
List<UploadBean> beans = new ArrayList<>();
beans.add(new UploadBean(file, UploadBean.IMG));
mUploadStrategy.upload(beans, false, new UploadCallback() {
@Override
public void onFinish(List<UploadBean> list, boolean success) {
if (success) {
listener.onItemClick("https://downs.yaoulive.com/" + list.get(0).getRemoteAccessUrl(), 0);
} else {
listener.onItemClick(null, -1);
}
}
}, true);
}
}

View File

@ -0,0 +1,105 @@
package com.yunbao.common.upload;
import java.io.File;
/**
* Created by cxf on 2019/4/16.
*/
public class UploadBean {
public static final int IMG = 0;
public static final int VIDEO = 1;
public static final int VOICE = 2;
private File mOriginFile;//要被上传的源文件
private File mCompressFile;//压缩后的图片文件
private String mRemoteFileName;//上传成功后在云存储上的文件名字
private String mRemoteAccessUrl;//上传成功后在云存储上的访问地址
private boolean mSuccess;//是否上传成功了
private int mType;
private Object mTag;
public UploadBean() {
}
public UploadBean(File originFile, int type) {
mOriginFile = originFile;
mType = type;
}
public File getOriginFile() {
return mOriginFile;
}
public void setOriginFile(File originFile) {
mOriginFile = originFile;
}
public String getRemoteFileName() {
return mRemoteFileName;
}
public void setRemoteFileName(String remoteFileName) {
mRemoteFileName = remoteFileName;
}
public String getRemoteAccessUrl() {
return mRemoteAccessUrl;
}
public void setRemoteAccessUrl(String remoteAccessUrl) {
mRemoteAccessUrl = remoteAccessUrl;
}
public File getCompressFile() {
return mCompressFile;
}
public void setCompressFile(File compressFile) {
mCompressFile = compressFile;
}
public boolean isSuccess() {
return mSuccess;
}
public void setSuccess(boolean success) {
mSuccess = success;
}
public void setEmpty() {
mOriginFile = null;
mRemoteFileName = null;
mRemoteAccessUrl = null;
}
public boolean isEmpty() {
return mOriginFile == null && mRemoteFileName == null && mRemoteAccessUrl == null;
}
public int getType() {
return mType;
}
public Object getTag() {
return mTag;
}
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 +
'}';
}
}

View File

@ -0,0 +1,11 @@
package com.yunbao.common.upload;
import java.util.List;
/**
* Created by cxf on 2019/4/16.
*/
public interface UploadCallback {
void onFinish(List<UploadBean> list, boolean success);
}

View File

@ -0,0 +1,224 @@
package com.yunbao.common.upload;
import android.content.Context;
import android.text.TextUtils;
import com.qiniu.android.common.ServiceAddress;
import com.qiniu.android.common.Zone;
import com.qiniu.android.http.ResponseInfo;
import com.qiniu.android.storage.Configuration;
import com.qiniu.android.storage.UpCompletionHandler;
import com.qiniu.android.storage.UploadManager;
import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.utils.L;
import com.yunbao.common.utils.StringUtil;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.File;
import java.util.List;
import top.zibin.luban.Luban;
/**
* Created by cxf on 2019/4/16.
* 七牛上传文件
*/
public class UploadQnImpl implements UploadStrategy {
private static final String TAG = "UploadQnImpl";
private Context mContext;
private List<UploadBean> mList;
private int mIndex;
private boolean mNeedCompress;
private UploadCallback mUploadCallback;
private HttpCallback mGetUploadTokenCallback;
private String mToken;
private UploadManager mUploadManager;
private UpCompletionHandler mCompletionHandler;//上传回调
private Luban.Builder mLubanBuilder;
public UploadQnImpl(Context context) {
mContext = context;
mCompletionHandler = new UpCompletionHandler() {
@Override
public void complete(String key, ResponseInfo info, JSONObject response) {
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"));
} catch (JSONException e) {
throw new RuntimeException(e);
}
if (mList == null || mList.size() == 0) {
if (mUploadCallback != null) {
mUploadCallback.onFinish(mList, false);
}
return;
}
UploadBean uploadBean = mList.get(mIndex);
if (info.isOK()) {
uploadBean.setSuccess(true);
if (uploadBean.getType() == UploadBean.IMG && mNeedCompress) {
//上传完成后把 压缩后的图片 删掉
File compressedFile = uploadBean.getCompressFile();
if (compressedFile != null && compressedFile.exists()) {
File originFile = uploadBean.getOriginFile();
if (originFile != null && !compressedFile.getAbsolutePath().equals(originFile.getAbsolutePath())) {
compressedFile.delete();
}
}
}
mIndex++;
if (mIndex < mList.size()) {
uploadNext();
} else {
if (mUploadCallback != null) {
mUploadCallback.onFinish(mList, true);
}
}
} else {
upload(mList.get(mIndex));//上传失败后 重新上传
}
}
};
}
@Override
public void upload(List<UploadBean> list, boolean needCompress, UploadCallback callback, boolean isImg) {
System.err.println("-------upload------>" + list.size());
if (callback == null) {
return;
}
if (list == null || list.size() == 0) {
callback.onFinish(list, false);
return;
}
boolean hasFile = false;
for (UploadBean bean : list) {
if (bean.getOriginFile() != null) {
hasFile = true;
break;
}
}
if (!hasFile) {
callback.onFinish(list, true);
return;
}
mList = list;
mNeedCompress = needCompress;
mUploadCallback = callback;
mIndex = 0;
if (mGetUploadTokenCallback == null) {
mGetUploadTokenCallback = new HttpCallback() {
@Override
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();
}
}
};
}
CommonHttpUtil.getUploadQiNiuToken(mGetUploadTokenCallback, isImg);
}
@Override
public void cancelUpload() {
CommonHttpUtil.cancel(CommonHttpUtil.GET_UPLOAD_QI_NIU_TOKEN);
if (mList != null) {
mList.clear();
}
mUploadCallback = null;
}
private void uploadNext() {
UploadBean bean = null;
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) {
bean.setRemoteFileName(StringUtil.contact(StringUtil.generateFileName(), ".jpg"));
} else if (bean.getType() == UploadBean.VIDEO) {
bean.setRemoteFileName(StringUtil.contact(StringUtil.generateFileName(), ".mp4"));
} else if (bean.getType() == UploadBean.VOICE) {
bean.setRemoteFileName(StringUtil.contact(StringUtil.generateFileName(), ".m4a"));
}
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() {
@Override
public String rename(String filePath) {
return mList.get(mIndex).getRemoteFileName();
}
}).setCompressListener(new OnCompressListener() {
@Override
public void onStart() {
}
@Override
public void onSuccess(File file) {
UploadBean uploadBean = mList.get(mIndex);
uploadBean.setCompressFile(file);
upload(uploadBean);
}
@Override
public void onError(Throwable e) {
upload(mList.get(mIndex));
}
});
}
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();
mUploadManager = new UploadManager(configuration);
}
File uploadFile = bean.getOriginFile();
if (bean.getType() == UploadBean.IMG && mNeedCompress) {
File compressedFile = bean.getCompressFile();
if (compressedFile != null && compressedFile.exists()) {
uploadFile = compressedFile;
}
}
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);
}
}
}
}

View File

@ -0,0 +1,24 @@
package com.yunbao.common.upload;
import java.util.List;
/**
* Created by cxf on 2019/4/16.
*/
public interface UploadStrategy {
/**
* 执行上传
*
* @param list 被上传的文件列表
* @param needCompress 是否需要压缩
* @param callback 上传回调
*/
void upload(List<UploadBean> list, boolean needCompress, UploadCallback callback,boolean isImg);
/**
* 取消上传
*/
void cancelUpload();
}

View File

@ -1,15 +1,25 @@
package com.yunbao.common.utils;
import static com.yalantis.ucrop.util.FileUtils.getDataColumn;
import android.Manifest;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.DocumentsProvider;
import android.provider.MediaStore;
import androidx.documentfile.provider.DocumentFile;
import androidx.fragment.app.FragmentActivity;
import androidx.core.content.FileProvider;
import com.yalantis.ucrop.UCrop;
import com.yalantis.ucrop.util.FileUtils;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.R;
import com.yunbao.common.interfaces.ActivityResultCallback;
@ -98,12 +108,33 @@ public class ProcessImageUtil extends ProcessResultUtil {
mAlumbResultCallback = new ActivityResultCallback() {
@Override
public void onSuccess(Intent intent) {
if (!mNeedCrop) {
if (mResultCallback != null) {
if (intent.getData() == null) {
if (mResultCallback != null) {
mResultCallback.onFailure();
}
return;
}
String path = FileUtils.getPath(mContext, intent.getData());
File file = new File(path);
if (file.exists()) {
mResultCallback.onSuccess(file);
} else {
mResultCallback.onFailure();
}
}
return;
}
crop(intent.getData());
}
@Override
public void onFailure() {
ToastUtil.show(mContext.getString(R.string.img_alumb_cancel));
if (mResultCallback != null) {
mResultCallback.onFailure();
}
}
};
mCropResultCallback = new ActivityResultCallback() {
@ -117,6 +148,9 @@ public class ProcessImageUtil extends ProcessResultUtil {
@Override
public void onFailure() {
ToastUtil.show(mContext.getString(R.string.img_crop_cancel));
if (mResultCallback != null) {
mResultCallback.onFailure();
}
}
};
}
@ -143,6 +177,11 @@ public class ProcessImageUtil extends ProcessResultUtil {
requestPermissions(mAlumbPermissions, mAlumbPermissionCallback);
}
public void getImageByAlumb(boolean needCrop) {
this.mNeedCrop = needCrop;
requestPermissions(mAlumbPermissions, mAlumbPermissionCallback);
}
/**
* 开启摄像头执行照相
@ -163,7 +202,9 @@ public class ProcessImageUtil extends ProcessResultUtil {
}
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
startActivityForResult(intent, mCameraResultCallback);
}catch (Exception e){e.printStackTrace();}
} catch (Exception e) {
e.printStackTrace();
}
}
private File getNewFile() {

View File

@ -50,6 +50,9 @@ public class RouteUtil {
public static final String PATH_BattlePassActivity="/main/BattlePassActivity";
public static final String PATH_SudGameActivity="/live/SudGameActivity";
public static final String PATH_COMMUNITY_Activity="/main/MainHomeCommunityActivity";
public static final String PATH_FEEDBACK_SUCCESS_ACTIVITY = "/main/FeedbackSuccessActivity";
public static final String PATH_FEEDBACK_ACTIVITY = "/main/FeedbackActivity";
public static final String PATH_FEEDBACK_EDIT_ACTIVITY = "/main/FeedbackEditActivity";
public static void forwardCommunityActivity() {
@ -355,4 +358,8 @@ public class RouteUtil {
ARouter.getInstance().build(PATH_BattlePassActivity)
.navigation();
}
public static void forwardActivity(String path){
ARouter.getInstance().build(path)
.navigation();
}
}

View File

@ -6,6 +6,7 @@ import java.io.File;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.Random;
import java.util.UUID;
import java.util.regex.Pattern;
/**
@ -160,4 +161,15 @@ public class StringUtil {
}
return false;
}
/**
* 获取随机文件名
*/
public static String generateFileName() {
return contact("android_",
CommonAppConfig.getInstance().getUid(),
"_",
DateFormatUtil.getVideoCurTimeString(),
UUID.randomUUID().toString());
}
}

View File

@ -9,9 +9,9 @@ ext {
]
manifestPlaceholders = [
//
serverHost : "https://napi.yaoulive.com",
// serverHost : "https://napi.yaoulive.com",
//
// serverHost : "https://ceshi.yaoulive.com",
serverHost : "https://ceshi.yaoulive.com",
//

View File

@ -162,6 +162,9 @@
<activity android:name=".activity.MainHomeCommunityActivity"
android:screenOrientation="portrait" />
<activity android:name=".activity.FeedbackActivity" />
<activity android:name=".activity.FeedbackSuccessActivity" />
<activity android:name=".activity.FeedbackEditActivity" />
</application>
</manifest>

View File

@ -0,0 +1,48 @@
package com.yunbao.main.activity;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.main.R;
import com.yunbao.main.http.MainHttpUtil;
@Route(path = RouteUtil.PATH_FEEDBACK_ACTIVITY)
public class FeedbackActivity extends AbsActivity {
@Override
protected int getLayoutId() {
return R.layout.activity_feedback;
}
@Override
protected void main() {
super.main();
setTitle(WordUtil.getNewString(R.string.activity_feedback_top_title));
setTitleBold(true);
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.btn_cs), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
//TODO 客服
MainHttpUtil.getCustomerService(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (info.length == 1) {
String url = info[0];
RouteUtil.forwardCustomerService(url);
}
}
});
}
});
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.btn_feedback), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
//TODO 意见反馈
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_EDIT_ACTIVITY);
}
});
}
}

View File

@ -0,0 +1,351 @@
package com.yunbao.main.activity;
import android.app.Dialog;
import android.graphics.Color;
import android.text.Editable;
import android.text.InputFilter;
import android.text.TextWatcher;
import android.util.SparseArray;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.fastjson.JSONArray;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.interfaces.ImageResultCallback;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.ProcessImageUtil;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.main.R;
import java.io.File;
import java.util.Locale;
@Route(path = RouteUtil.PATH_FEEDBACK_EDIT_ACTIVITY)
public class FeedbackEditActivity extends AbsActivity {
EditText feedbackEdit;
ImageView img1, img2, img3;
EditText ciEdit;
Button submit;
TextView editNumber;
ProcessImageUtil imageUtil;
Dialog loadingDialog = null;
int clickImage = 0;
@Override
protected int getLayoutId() {
return R.layout.activity_feedback_edit;
}
@Override
protected void main() {
super.main();
setTitle(WordUtil.getNewString(R.string.activity_feedback_edit_feedback_top));
setTitleBold(true);
initView();
imageUtil = new ProcessImageUtil(this);
feedbackEdit.setFilters(new InputFilter[]{new InputFilter.LengthFilter(500)});
ciEdit.setFilters(new InputFilter[]{new InputFilter.LengthFilter(30)});
feedbackEdit.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
if (charSequence.length() == 500) {
ToastUtil.show(R.string.activity_feedback_edit_submit_tip2);
editNumber.setTextColor(Color.parseColor("#FF5656"));
} else {
editNumber.setTextColor(Color.parseColor("#333333"));
}
editNumber.setText(String.format(Locale.getDefault(), "%d", charSequence.length()));
}
@Override
public void afterTextChanged(Editable editable) {
}
});
ViewClicksAntiShake.clicksAntiShake(img1, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
SparseArray<String> list;
if (img1.getTag() == null) {
list = getImageType1(100);
} else {
list = getImageType2(110);
}
showUploadImage(list);
}
});
ViewClicksAntiShake.clicksAntiShake(img2, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
SparseArray<String> list;
if (img2.getTag() == null) {
list = getImageType1(200);
} else {
list = getImageType2(210);
}
showUploadImage(list);
}
});
ViewClicksAntiShake.clicksAntiShake(img3, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
SparseArray<String> list;
if (img3.getTag() == null) {
list = getImageType1(300);
} else {
list = getImageType2(310);
}
showUploadImage(list);
}
});
ViewClicksAntiShake.clicksAntiShake(submit, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (feedbackEdit.getText().length() == 0) {
ToastUtil.show(R.string.activity_feedback_edit_submit_tip1);
return;
}
JSONArray images = new JSONArray();
if (img1.getTag() != null) {
images.add((String) img1.getTag());
}
if (img2.getTag() != null) {
images.add((String) img2.getTag());
}
if (img3.getTag() != null) {
images.add((String) img3.getTag());
}
LiveNetManager.get(mContext)
.feedback(feedbackEdit.getText().toString(),
images,
ciEdit.getText().toString(),
new HttpCallback<HttpCallbackModel>() {
@Override
public void onSuccess(HttpCallbackModel data) {
finish();
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_SUCCESS_ACTIVITY);
}
@Override
public void onError(String error) {
ToastUtil.show(error);
}
}
);
}
});
img1.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
ToastUtil.show("1");
return true;
}
});
img2.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
ToastUtil.show("2");
return true;
}
});
img3.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
ToastUtil.show("3");
return true;
}
});
imageUtil.setImageResultCallback(new ImageResultCallback() {
@Override
public void onSuccess(File file) {
ToastUtil.show("图片地址:" + file.getAbsolutePath());
onSuccessToQiNiuUrl(mContext, file, new OnItemClickListener<String>() {
@Override
public void onItemClick(String bean, int position) {
if (loadingDialog != null) {
loadingDialog.dismiss();
loadingDialog = null;
}
switch (clickImage) {
case 101:
case 112:
ImgLoader.display(mContext, bean, img1);
img1.setTag(bean);
if (img2.getTag() == null) {
img2.setImageResource(R.mipmap.icon_activity_feedback_edit_img_add);
img2.setVisibility(View.VISIBLE);
} else if (img3.getTag() == null) {
img3.setVisibility(View.VISIBLE);
img3.setImageResource(R.mipmap.icon_activity_feedback_edit_img_add);
}
break;
case 201:
case 212:
ImgLoader.display(mContext, bean, img2);
img2.setTag(bean);
if (img3.getTag() == null) {
img3.setVisibility(View.VISIBLE);
img3.setImageResource(R.mipmap.icon_activity_feedback_edit_img_add);
}
break;
case 301:
case 312:
ImgLoader.display(mContext, bean, img3);
img3.setTag(bean);
break;
}
}
});
}
@Override
public void onFailure() {
super.onFailure();
if (loadingDialog != null) {
loadingDialog.dismiss();
loadingDialog = null;
}
}
});
}
private void showUploadImage(SparseArray<String> list) {
DialogUitl.showStringArrayDialog(mContext, list, new DialogUitl.StringArrayDialogCallback() {
@Override
public void onItemClick(String text, int tag) {
clickImage = tag;
switch (tag) {
case 101:
uploadImage(img1);
break;
case 201:
uploadImage(img2);
break;
case 301:
uploadImage(img3);
break;
case 111:
deleteImage(1);
break;
case 211:
deleteImage(2);
break;
case 311:
deleteImage(3);
break;
case 112:
changeImage(img1);
break;
case 212:
changeImage(img2);
break;
case 312:
changeImage(img3);
break;
}
}
});
}
private void uploadImage(ImageView imageView) {
if (loadingDialog != null) {
loadingDialog.dismiss();
loadingDialog = null;
}
loadingDialog = DialogUitl.loadingDialog(mContext);
loadingDialog.show();
imageUtil.getImageByAlumb(false);
}
private void deleteImage(int index) {
if (index == 1) {
if (img2.getTag() != null) {
img1.setTag(img2.getTag());
ImgLoader.display(mContext, (String) img1.getTag(), img1);
if (img3.getTag() != null) {
img2.setTag(img3.getTag());
ImgLoader.display(mContext, (String) img2.getTag(), img2);
img3.setTag(null);
img3.setImageResource(R.mipmap.icon_activity_feedback_edit_img_add);
} else {
img2.setTag(null);
img2.setImageResource(R.mipmap.icon_activity_feedback_edit_img_add);
img3.setTag(null);
img3.setVisibility(View.GONE);
}
} else {
img1.setTag(null);
img1.setImageResource(R.mipmap.icon_activity_feedback_edit_img_add);
img2.setTag(null);
img2.setVisibility(View.GONE);
img3.setTag(null);
img3.setVisibility(View.GONE);
}
} else if (index == 2) {
if (img3.getTag() != null) {
img2.setTag(img3.getTag());
ImgLoader.display(mContext, (String) img2.getTag(), img2);
img3.setTag(null);
img3.setImageResource(R.mipmap.icon_activity_feedback_edit_img_add);
} else {
img2.setTag(null);
img2.setImageResource(R.mipmap.icon_activity_feedback_edit_img_add);
img3.setTag(null);
img3.setVisibility(View.GONE);
}
} else if (index == 3) {
img3.setTag(null);
img3.setImageResource(R.mipmap.icon_activity_feedback_edit_img_add);
}
}
private void changeImage(ImageView imageView) {
uploadImage(imageView);
}
private SparseArray<String> getImageType1(int key) {
SparseArray<String> array = new SparseArray<>();
array.put(key + 1, WordUtil.getNewString(R.string.activity_feedback_edit_img_type1_upload));
return array;
}
private SparseArray<String> getImageType2(int key) {
SparseArray<String> array = new SparseArray<>();
array.put(key + 1, WordUtil.getNewString(R.string.activity_feedback_edit_img_type2_delete));
array.put(key + 2, WordUtil.getNewString(R.string.activity_feedback_edit_img_type2_change));
return array;
}
private void initView() {
feedbackEdit = findViewById(R.id.tv_feedback);
ciEdit = findViewById(R.id.edit_ci);
img1 = findViewById(R.id.img1);
img2 = findViewById(R.id.img2);
img3 = findViewById(R.id.img3);
submit = findViewById(R.id.btn_sub);
editNumber = findViewById(R.id.tv_number);
editNumber.setTextColor(Color.parseColor("#333333"));
}
}

View File

@ -0,0 +1,29 @@
package com.yunbao.main.activity;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.main.R;
@Route(path = RouteUtil.PATH_FEEDBACK_SUCCESS_ACTIVITY)
public class FeedbackSuccessActivity extends AbsActivity {
@Override
protected int getLayoutId() {
return R.layout.activity_feedback_success;
}
@Override
protected void main() {
super.main();
setTitleBold(true);
setTitle(WordUtil.getNewString(R.string.activity_feedback_edit_feedback_top));
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.sub), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
finish();
}
});
}
}

View File

@ -316,12 +316,15 @@ public class SettingActivity extends AbsActivity implements OnItemClickListener<
.show();
}
}else if(bean.getId()==17){
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
}
} else {
if (bean.getId() == 17) {//意见反馈要在url上加版本号和设备号
href += "&version=" + android.os.Build.VERSION.RELEASE + "&model=" + android.os.Build.MODEL;
}
WebViewActivity.forward(mContext, href,false);
// WebViewActivity.forward(mContext, href,false);
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
}
}

View File

@ -355,7 +355,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
if (u.getDress().getMedal() != null) {
Log.e("tag", u.getDress().getMedal());
ImgLoader.displayWithError(mContext, u.getDress().getMedal(), user_noble_ico,R.mipmap.icon_vip_gold);
ImgLoader.displayWithError(mContext, u.getDress().getMedal(), user_noble_ico, R.mipmap.icon_vip_gold);
} else {
user_noble_ico.setImageResource(R.mipmap.icon_vip_gold);
}
@ -468,6 +468,10 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
MobclickAgent.onEvent(mContext, "my_room", "个人中心点房间管理");
forwardRoomManage();
break;
case 26:
case 17:
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
break;
}
} else {
//21 在线客服
@ -506,6 +510,9 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
if (bean.getId() == 24) {
MobclickAgent.onEvent(mContext, "my_pack", "个人中心点包裹");
}
if (bean.getId() == 17) {
RouteUtil.forwardActivity(RouteUtil.PATH_FEEDBACK_ACTIVITY);
} else
WebViewActivity.forward(mContext, url, false);
}

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="345dp" android:height="145dp">
<shape android:shape="rectangle">
<solid android:color="#fff7f7f7" />
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp" android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp" />
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="132dp" android:height="50dp">
<shape android:shape="rectangle">
<solid android:color="#ffffe34f" />
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp" android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp" />
</shape>
</item>
</selector>

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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_height="match_parent"
android:background="#FFFFFF">
<include
android:id="@+id/include4"
layout="@layout/view_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="30dp"
android:text="@string/activity_feedback_title"
android:textColor="#777777"
android:textSize="24sp"
app:layout_constraintBottom_toTopOf="@+id/linearLayout4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<LinearLayout
android:id="@+id/linearLayout4"
android:layout_width="match_parent"
android:layout_height="130dp"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include4">
<Button
android:id="@+id/btn_cs"
android:layout_width="165dp"
android:layout_height="match_parent"
android:layout_marginEnd="15dp"
android:layout_weight="1"
android:background="#F7F7F7"
android:text="@string/activity_feedback_customer_service"
android:textAllCaps="false"
android:textColor="#333333"
android:textSize="13sp" />
<Button
android:id="@+id/btn_feedback"
android:layout_width="165dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#F7F7F7"
android:text="@string/activity_feedback_feedback"
android:textColor="#333333"
android:textSize="13sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,198 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:orientation="vertical">
<include
android:id="@+id/include4"
layout="@layout/view_title" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/activity_feedback_edit_feedback_title"
android:textColor="#333333"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="*"
android:textColor="#FF5656"
android:textSize="15sp" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="145dp"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp">
<EditText
android:id="@+id/tv_feedback"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_btn_feedback_edit_tv_edit"
android:ems="10"
android:gravity="start"
android:hint="@string/activity_feedback_edit_feedback_hint"
android:inputType="text|textMultiLine"
android:padding="15dp"
android:textSize="11sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/linearLayout5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginEnd="15dp"
android:layout_marginBottom="15dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<TextView
android:id="@+id/tv_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="0"
android:textColor="#333333"
/>
<TextView
android:id="@+id/tv_max"
android:textColor="#333333"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="/500" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:text="@string/activity_feedback_edit_feedback_img_title"
android:textColor="#333333"
android:textSize="15sp"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/imgLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/img1"
android:layout_marginEnd="15dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/icon_activity_feedback_edit_img_add" />
<ImageView
android:id="@+id/img2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:src="@mipmap/icon_activity_feedback_edit_img_add"
android:visibility="gone"
tools:visibility="visible" />
<ImageView
android:id="@+id/img3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:src="@mipmap/icon_activity_feedback_edit_img_add"
android:visibility="gone"
tools:visibility="visible" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="20dp"
android:text="@string/activity_feedback_edit_feedback_ci_title"
android:textColor="#333333"
android:textSize="15sp"
android:textStyle="bold" />
<EditText
android:id="@+id/edit_ci"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="15dp"
android:background="@drawable/bg_btn_feedback_edit_tv_edit"
android:ems="10"
android:hint="@string/activity_feedback_edit_feedback_ci_hint"
android:inputType="text"
android:padding="15dp"
android:textSize="11sp" />
<Button
android:id="@+id/btn_sub"
android:layout_width="132dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginTop="80dp"
android:background="@drawable/bg_btn_feedback_success"
android:text="@string/activity_feedback_edit_feedback_btn"
android:textAllCaps="false" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="11dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/activity_feedback_edit_feedback_btn_tips"
android:textColor="#777777"
android:textSize="11sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="*"
android:textColor="#FF5656"
android:textSize="11sp" />
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="#FFFFFF"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/activity_feedback_success_tips"
android:textSize="13sp"
android:textColor="#333333"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="19dp"
app:layout_constraintBottom_toTopOf="@+id/textView14"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@mipmap/icon_activity_feedback_success" />
<TextView
android:id="@+id/textView15"
android:textSize="24sp"
android:textColor="#777777"
android:layout_width="wrap_content"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_marginBottom="19dp"
android:text="@string/activity_feedback_success_title"
app:layout_constraintBottom_toTopOf="@+id/imageView11"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/sub"
android:layout_width="132dp"
android:layout_height="50dp"
android:text="@string/activity_feedback_success_sub"
android:textAllCaps="false"
android:background="@drawable/bg_btn_feedback_success"
android:layout_marginTop="70dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView14" />
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@ -18,5 +18,25 @@
<string name="battlepass_exchange_submit_lock">未解鎖</string>
<string name="battlepass_reward_item_lock">暫未達到等級</string>
<string name="battlepass_reward_item_get">領取成功</string>
<string name="activity_feedback_top_title">幫助與反饋</string>
<string name="activity_feedback_title">有什麼可以幫到您?</string>
<string name="activity_feedback_customer_service">智能客服</string>
<string name="activity_feedback_feedback">意見反餽</string>
<string name="activity_feedback_success_title">提交成功</string>
<string name="activity_feedback_success_tips">感謝您的反饋!</string>
<string name="activity_feedback_success_sub">確定</string>
<string name="activity_feedback_edit_feedback_top">意見反饋</string>
<string name="activity_feedback_edit_feedback_title">問題描述</string>
<string name="activity_feedback_edit_feedback_hint">請描述您需要解決的問題</string>
<string name="activity_feedback_edit_feedback_img_title">問題圖片</string>
<string name="activity_feedback_edit_feedback_ci_title">聯繫方式</string>
<string name="activity_feedback_edit_feedback_ci_hint">留下您的電話或郵箱,方便我們與您聯繫</string>
<string name="activity_feedback_edit_feedback_btn">提交</string>
<string name="activity_feedback_edit_feedback_btn_tips">為必填項</string>
<string name="activity_feedback_edit_img_type1_upload">上傳圖片</string>
<string name="activity_feedback_edit_img_type2_delete">刪除</string>
<string name="activity_feedback_edit_img_type2_change">更換圖片</string>
<string name="activity_feedback_edit_submit_tip1">請描述您的問題</string>
<string name="activity_feedback_edit_submit_tip2">超過字數要求</string>
<string name="activity_feedback_edit_submit_tip3">今日反饋次數已用完</string>
</resources>

View File

@ -18,5 +18,25 @@
<string name="battlepass_exchange_submit_lock">Unlocked</string>
<string name="battlepass_reward_item_lock">Not yet reached level</string>
<string name="battlepass_reward_item_get">Successfully claimed</string>
<string name="activity_feedback_top_title">Help And Feedback</string>
<string name="activity_feedback_title">May I Help You?</string>
<string name="activity_feedback_customer_service">Intelligent\nCustomer Service</string>
<string name="activity_feedback_feedback">Feedback</string>
<string name="activity_feedback_success_title">Submitted\nSuccessfully</string>
<string name="activity_feedback_success_tips">Thank You For Your Feedback!</string>
<string name="activity_feedback_success_sub">Confirm</string>
<string name="activity_feedback_edit_feedback_top">Feedback</string>
<string name="activity_feedback_edit_feedback_title">Problem Description</string>
<string name="activity_feedback_edit_feedback_hint">Please Describe The Problem You Need To See</string>
<string name="activity_feedback_edit_feedback_img_title">Problem Pictures</string>
<string name="activity_feedback_edit_feedback_ci_title">Contact Information</string>
<string name="activity_feedback_edit_feedback_ci_hint">Leave Your Phone Or Email For Us To Contact You</string>
<string name="activity_feedback_edit_feedback_btn">Submit</string>
<string name="activity_feedback_edit_feedback_btn_tips">required items</string>
<string name="activity_feedback_edit_img_type1_upload">Upload images</string>
<string name="activity_feedback_edit_img_type2_delete">Delete</string>
<string name="activity_feedback_edit_img_type2_change">Replace image</string>
<string name="activity_feedback_edit_submit_tip1">Please describe your problem</string>
<string name="activity_feedback_edit_submit_tip2">Exceeding the word count requirement</string>
<string name="activity_feedback_edit_submit_tip3">Today\'s feedback count has been used up</string>
</resources>