# ohos-slideshow-widget **Repository Path**: zhao6048/ohos-slideshow-widget ## Basic Information - **Project Name**: ohos-slideshow-widget - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-06-10 - **Last Updated**: 2021-07-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ohos-slideshow-widget #### 项目介绍 - 项目名称:ohos-slideshow-widget - 所属系列:openharmony的第三方组件适配移植 - 功能:一个可以实现幻灯片放映的小部件。 - 项目移植状态:主功能完成 - 调用差异:无 - 开发版本:sdk6,DevEco Studio 2.2 Beta1 - 基线版本:Release 0.5.0 #### 效果演示 ![image text](gif/demo.gif) #### 安装教程 1.在项目根目录下的build.gradle文件中, ``` allprojects { repositories { maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' } } } ``` 2.在entry模块的build.gradle文件中, ``` dependencies { implementation('com.gitee.chinasoft_ohos:ohos-slideshow-widget:0.0.2-SNAPSHOT') ...... } ``` #### 使用说明 - 1、xml文件中增加控件 ```xml ``` - 2、Java文件中绑定SlideShowView控件,并且生成相应adapter ```java Integer[] slideUrlsInt = new Integer[]{ ResourceTable.Media_s1, ResourceTable.Media_s2, ResourceTable.Media_s3, ResourceTable.Media_s4, }; ImageSource.DecodingOptions opts = new ImageSource.DecodingOptions(); opts.desiredSize = new Size(slideShowView.getWidth(), slideShowView.getHeight()); //使用本地图片 SlideShowAdapter adapter = new ResourceBitmapAdapter(this, Arrays.asList(slideUrlsInt), opts); slideShowView.setAdapter(adapter); ``` - 3、如果使用本地图片则生成ResourceBitmapAdapter的adapter, 如果使用网络图片则生成RemoteBitmapAdapter的adapter #### 测试信息 CodeCheck代码测试无异常 CloudTest代码测试无异常 病毒安全检测通过 当前版本demo功能与原组件基本无差异 #### 版本迭代 - 0.0.2-SNAPSHOT