1 Star 0 Fork 0

Archermind-TI / Persei_ohos

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

Persei_ohos

简介

支持ListContainer和ScrollView的顶部动画菜单。

功能

ListContainer or ScrollView 动画UI

演示

输入图片说明

集成

  1. 下载模块包关联使用
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation project(':library')
    testImplementation 'junit:junit:4.13'
}
  1. maven引用
...
allprojects {
    repositories {
     mavenCentral()
    }
}
...
dependencies {
 ...
 implementation 'com.gitee.archermind-ti:perseilibrary:1.0.2'
 ...
}

使用说明

<DirectionalLayout
    xmlns:ohos="http://schemas.huawei.com/res/ohos"
    ohos:height="match_parent"
    ohos:width="match_parent"
    ohos:orientation="vertical">


    <com.yalantis.taurus.library.PullToRefreshView
        ohos:id="$+id:abt_linear_xrecyclerview"
        ohos:width="match_parent"
        ohos:height="match_parent"
        />

</DirectionalLayout>
public int[] icons =
            {
                    ResourceTable.Media_a1,ResourceTable.Media_a2,ResourceTable.Media_a3,ResourceTable.Media_a4,
                    ResourceTable.Media_a5,ResourceTable.Media_a6,ResourceTable.Media_a7,
            };
//监听事件
mRecyclerView = (PullToRefreshView)findComponentById(ResourceTable.Id_abt_linear_xrecyclerview);
        mRecyclerView.setIcons(icons);
        mRecyclerView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() {
            @Override
            public void onRefresh() {
                handler.removeTask(refreshRunnable);
                if(isFirst){
                    isFirst=false;
                    handler.postTask(refreshRunnable,200);
                }else {
                    handler.postTask(refreshRunnable, 5000);
                }
            }

            @Override
            public void onClickItem(int index) {//点击事件
                mRecyclerView.scrollToCenter(index);
            }
        });

编译说明

  1. 将项目通过git clone 至本地
  2. 使用DevEco Studio 打开该项目,然后等待Gradle 构建完成
  3. 点击Run运行即可(真机运行可能需要配置签名)

版本迭代

  • v1.0 初始版本
  • v1.0.1 修改了动画与显示效果
  • changelog
  • v1.0.2 添加list列表展开锁定,缺少围绕x轴旋转方法,无法实现原库过度动画

License

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

支持ListContainerScrollView的顶部菜单 。项目从Persei.android(https://github.com/android-cjj/Persei.android)移植而来 expand collapse
Java
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/archermind-ti/persei-ohos.git
git@gitee.com:archermind-ti/persei-ohos.git
archermind-ti
persei-ohos
Persei_ohos
master

Search