Fetch the repository succeeded.
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信息。
coolMenu
is available under the MIT license
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。