Skip to content

Entertech/Enter-UIComponent-Android-SDK

Repository files navigation

English Readme

Enter-UI-Component-Android-SDK Maven Central

简介

简化了应用中UI的重复开发,包括情感云的实时体验和数据报表UI控件。

集成

Gradle 自动集成

在module的build.gradle文件下添加以下依赖

implementation 'cn.entertech.android:uicomponentsdk:1.2.10'

在项目根目录的build.gradle文件下添加以下依赖地址

allprojects {
    repositories {
        mavenCentral()
    }
}

快速接入

实时控件

以实时脑波为例

1.在xml布局文件中声明控件

<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"
                    />

2.在代码文件中是指具体的值

//右脑波
brainwave_view.setRightBrainwave(rightBrainwave)
//左脑波
brainwave_view.setLeftBrainwave(leftBrainwave)

效果

报表控件

以脑波报表为例

1.在xml布局文件中声明控件

<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>

2.在代码文件中是指具体的值

report_brainwave_spectrum.setBrainwaveSpectrums(
            startTime!!, //体验开始时间
            gammaCurve,  //γ占比曲线
            betaCurve,   // β占比曲线
            alphaCurve,  //α占比曲线
            thetaCurve,  //θ占比曲线
            deltaCurve   //δ占比曲线
     )

效果

详细API

更多详细控件API可查看 UI控件详细API说明

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published