1 Star 1 Fork 0

Archermind-TI / coolMenu

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

coolMenu

coolMenu 通过菜单方式切换Fraction

演示效果

集成

With gradle:

dependencies {
   compile 'com.gitee.archermind-ti:coolMenu:1.0.0'
}

使用方式

布局文件

<?xml version="1.0" encoding="utf-8"?>
<DirectionalLayout
    xmlns:ohos="http://schemas.huawei.com/res/ohos"
    xmlns:app="http://schemas.huawei.com/apk/res/ohos"
    ohos:height="match_parent"
    ohos:width="match_parent"
    ohos:alignment="center"
    ohos:background_element="black"
    ohos:orientation="vertical">

    <com.dxtt.coolmenu.CoolMenuFrameLayout
        ohos:id="$+id:rl_main"
        ohos:height="match_parent"
        ohos:width="match_parent"
        ohos:layout_alignment="center"
        app:num="4"
        />
</DirectionalLayout>

代码设置

      coolMenuFrameLayout = (CoolMenuFrameLayout) findComponentById(ResourceTable.Id_rl_main);

        fractions.add(new Fraction1());
        fractions.add(new Fraction2());
        fractions.add(new Fraction3());
        fractions.add(new Fraction4());

        FractionListPageAdapter fractionList = new FractionListPageAdapter(
                ((MainAbility) getAbility()).getFractionManager(),
                ResourceTable.Id_rl_main) {
            @Override
            public int getCount() {
                return fractions.size();
            }

            @Override
            public Fraction getItem(int position) {
                return fractions.get(position);
            }
        };

        coolMenuFrameLayout.setAdapter(fractionList);
        String[] titles = {"CONTACT", "ABOUT", "TEAM", "PROJECTS"};
        titleList = Arrays.asList(titles);
        coolMenuFrameLayout.setTitles(titleList);

变动说明

新增 FactionListPageAdapter提供方便向控件提供Fraction信息。

License

coolMenu is available under the MIT license

About

A Cool Cards Menu Concept expand collapse
Java
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
1
https://gitee.com/archermind-ti/coolmenu.git
git@gitee.com:archermind-ti/coolmenu.git
archermind-ti
coolmenu
coolMenu
master

Search