简化了应用中UI的重复开发,包括情感云的实时体验和数据报表UI控件。
在module的build.gradle文件下添加以下依赖
implementation 'cn.entertech.android:uicomponentsdk:1.2.10'在项目根目录的build.gradle文件下添加以下依赖地址
allprojects {
repositories {
mavenCentral()
}
}实时控件
以实时脑波为例
<cn.entertech.uicomponentsdk.realtime.RealtimeBrainwaveView
android:id="@+id/brainwave_view"
android:layout_marginTop="@dimen/activity_margin"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginRight="@dimen/activity_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:rbv_background="@drawable/shape_brainwave_bg"
app:rbv_mainColor="#ffffff"
app:rbv_textColor="#ffffff"
app:rbv_leftBrainwaveColor="#ff4852"
app:rbv_rightBrainwaveColor="#0064ff"
/>//右脑波
brainwave_view.setRightBrainwave(rightBrainwave)
//左脑波
brainwave_view.setLeftBrainwave(leftBrainwave)报表控件
以脑波报表为例
<cn.entertech.uicomponentsdk.report.ReportBrainwaveSpectrumView
app:rbs_background="@drawable/shape_custom_widget_bg"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_marginRight="@dimen/activity_margin"
android:id="@+id/report_brainwave_spectrum"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:rbs_isAbsoluteTimeAxis="true"
app:rbs_textColor="@color/white"
>
</cn.entertech.uicomponentsdk.report.ReportBrainwaveSpectrumView>
report_brainwave_spectrum.setBrainwaveSpectrums(
startTime!!, //体验开始时间
gammaCurve, //γ占比曲线
betaCurve, // β占比曲线
alphaCurve, //α占比曲线
thetaCurve, //θ占比曲线
deltaCurve //δ占比曲线
)
更多详细控件API可查看 UI控件详细API说明

