鸿蒙开源组件——可搜索微调器

jacksky
发布于 2021-8-19 11:47
浏览
0收藏

RxImagePicker

项目介绍

  • 项目名称:RxImagePicker
  • 所属系列:openharmony的第三方组件适配移植
  • 功能:相册图片选择
  • 项目移植状态:主功能完成
  • 调用差异:无
  • 开发版本:sdk6,DevEco Studio2.2 Beta1
  • 基线版本:tag 2.5.6

效果演示鸿蒙开源组件——可搜索微调器-鸿蒙开发者社区

安装教程

1、在项目根目录下的build.gradle文件中

allprojects {
   repositories {
       maven {
           url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
       }
   }
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.

2、在entry模块的build.gradle文件中

dependencies {
   implementation('com.gitee.chinasoft_ohos:SearchableSpinner:0.0.2-SNAPSHOT')
   ......
}
  • 1.
  • 2.
  • 3.
  • 4.

 

在sdk6,DevEco Studio 2.2 Beta1下项目可直接运行 如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件, 并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下

使用说明

使用该库非常简单,只需查看提供的示例的源代码。
<?xml version="1.0" encoding="utf-8"?>
<DependentLayout
    xmlns:ohos="http://schemas.huawei.com/res/ohos"
    ohos:height="match_parent"
    ohos:width="match_parent"
    ohos:orientation="vertical">

    <TextField
            ohos:id="$+id:tf_field"
            ohos:height="80"
            ohos:multiple_lines="false"
            ohos:width="match_parent"
            ohos:basement="#FF838282"
            ohos:left_padding="5vp"
            ohos:text_size="50"
            ohos:top_margin="20"/>

        <Picker
            ohos:id="$+id:picker"
            ohos:height="260vp"
            ohos:width="match_parent"
            ohos:below="$id:tf_field"
            ohos:normal_text_size="10fp"
            ohos:normal_text_color="#FFD7D7D7"
            ohos:selected_normal_text_margin_ratio="0.5"
            ohos:selected_text_size="25fp"
            ohos:selected_text_color="#FF838282"/>

        <Text
            ohos:id="$+id:tv_name"
            ohos:height="43vp"
            ohos:width="match_parent"
            ohos:horizontal_center="true"
            ohos:top_margin="128vp"/>

</DependentLayout>
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
      SearchableSpinner searchableSpinner1 = new SearchableSpinner(ll, this,tv_languages);
      searchableSpinner1.setSearchableOne();
  • 1.
  • 2.

测试信息

CodeCheck代码测试无异常

CloudTest代码测试无异常

病毒安全检测通过

当前版本demo功能与原项目组件基本无差异

版本迭代

  • 0.0.2-SNAPSHOT

版权和许可信息

The MIT License (MIT)
  • 1.

 

SearchableSpinner-master.zip 598.03K 8次下载
已于2021-8-19 11:47:54修改
收藏
回复
举报
回复
    相关推荐