Merge remote-tracking branch 'origin/qa_1.1.7' into qa_1.1.7
This commit is contained in:
@@ -91,7 +91,7 @@ public class V2XShareEventAdapter extends RecyclerView.Adapter<RecyclerView.View
|
||||
if (likeNum != null) {
|
||||
((shareDescriptionViewHolder) holder).approveNumTextView.setText(likeNum);
|
||||
}
|
||||
((shareDescriptionViewHolder) holder).ratingBar.setRating((float) 2.5);
|
||||
((shareDescriptionViewHolder) holder).ratingBar.setRating((float) enthusiasmIndex);
|
||||
}
|
||||
}
|
||||
} else if (holder instanceof shareItemViewHolder) {
|
||||
|
||||
@@ -12,12 +12,14 @@ import androidx.viewpager2.widget.ViewPager2
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.module.v2x.R
|
||||
import com.mogo.module.v2x.V2XConst.MODULE_NAME
|
||||
import com.mogo.module.v2x.V2XServiceManager
|
||||
import com.mogo.module.v2x.adapter.V2XEventPagerAdapter
|
||||
import com.mogo.module.v2x.presenter.EventPanelPresenter
|
||||
import com.mogo.module.v2x.utils.TrackUtils
|
||||
import com.mogo.module.v2x.utils.V2XUtils
|
||||
import com.mogo.module.v2x.view.V2XEventPanelHistoryCountView
|
||||
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener
|
||||
import com.mogo.module.v2x.voice.V2XVoiceConstants
|
||||
@@ -205,8 +207,11 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
return EventPanelPresenter(this)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 语音查询热心指数需求
|
||||
* */
|
||||
public fun showPanelWithSelectedItem(item: Int) {
|
||||
mV2XShareEventsFragment.fromVoice = true
|
||||
if (isPanelShow()) {
|
||||
selectWithItem(item)
|
||||
} else {
|
||||
|
||||
@@ -12,6 +12,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.SpacesItemDecoration;
|
||||
import com.mogo.module.v2x.adapter.V2XShareEventAdapter;
|
||||
@@ -25,6 +26,7 @@ import com.mogo.module.v2x.network.V2XShareNetworkModel;
|
||||
import com.mogo.module.v2x.presenter.ShareEventsPresenter;
|
||||
import com.mogo.module.v2x.utils.ThreadUtils;
|
||||
import com.mogo.module.common.view.NetworkLoadingView;
|
||||
import com.mogo.module.v2x.utils.V2XUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -34,7 +36,7 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
private RecyclerView recyclerView;
|
||||
private V2XShareEventAdapter adapter;
|
||||
private ArrayList dataArrayList = new ArrayList();
|
||||
;
|
||||
public Boolean fromVoice = false;
|
||||
private int pageNum = 1;
|
||||
private V2XShareNetworkModel v2XShareNetworkModel;
|
||||
|
||||
@@ -100,7 +102,13 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
dataArrayList.clear();
|
||||
}
|
||||
dataArrayList.add(resultData.getResult().getEnthusiasmIndex());
|
||||
Log.d(TAG, "热心指数:" + resultData.getResult().getEnthusiasmIndex());
|
||||
if (fromVoice == true) {
|
||||
try {
|
||||
ttsWithResultData(resultData);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (result instanceof V2XShareEventItem) {
|
||||
loadSuccessWithShareEventList(result);
|
||||
@@ -128,6 +136,28 @@ public class V2XShareEventsFragment extends MvpFragment<V2XShareEventsFragment,
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* 语音打开我的分享,进行播报
|
||||
* */
|
||||
private void ttsWithResultData(V2XShareEventDescription data) {
|
||||
int shareNum = data.getResult().getEnthusiasmIndex().getShareNum();
|
||||
int approveNum = data.getResult().getEnthusiasmIndex().getLikeNum();
|
||||
double enthusiasm = data.getResult().getEnthusiasmIndex().getEnthusiasmIndex();
|
||||
Log.d(TAG, String.valueOf(enthusiasm)+"TTS播报热心指数个数");
|
||||
String ttsString = "";
|
||||
if (enthusiasm <= 2) {
|
||||
ttsString = "您目前已完成" + shareNum + "次分享,获得" + approveNum + "次车友认同,热心指数" + enthusiasm
|
||||
+ "颗星,老铁请再接再厉,对我说,上报路况。分享更多路况帮助其他车友。";
|
||||
} else if (2 < enthusiasm && enthusiasm < 5) {
|
||||
ttsString = "您目前已完成" + shareNum + "次分享,获得" + approveNum + "次车友认同,热心指数" + enthusiasm
|
||||
+ "颗星,老铁您的热心温暖了无数车友,加油距离五颗星不远了。";
|
||||
} else {
|
||||
ttsString = "您目前已完成" + shareNum + "次分享,获得" + approveNum + "次车友认同,热心指数" + enthusiasm
|
||||
+ "颗星,实至名归,老铁你就是大家一直赞扬的热心车友,请继续保持。";
|
||||
}
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice(ttsString, null);
|
||||
}
|
||||
|
||||
/*
|
||||
* 我的分享列表数据处理
|
||||
* */
|
||||
|
||||
Reference in New Issue
Block a user