All Projects → Hitomis → Spinmenu

Hitomis / Spinmenu

轮盘样式的 Fragment 选择菜单,可转动轮盘切换 Fragment

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Spinmenu

Clib
Basically the lazy-man's copy/paste promoting smaller C utilities, also serving as a nice way to discover these sort of libraries. From my experience C libraries are scattered all over the web and discovery is relatively poor. The footprint of these libraries is usually quite large and unfocused. The goal of clibs is to provide stand-alone "micro" C libraries for developers to quickly install without coupling to large frameworks.
Stars: ✭ 3,918 (+333.89%)
Mutual labels:  manager
Kotlinextensions.com
A handy collection of most commonly used Kotlin extensions to boost your productivity.
Stars: ✭ 522 (-42.19%)
Mutual labels:  fragments
Manul
😼 The madness vendoring utility for Golang programs
Stars: ✭ 675 (-25.25%)
Mutual labels:  manager
Puzzle Js
⚡ Micro frontend framework for scalable and blazing fast websites.
Stars: ✭ 398 (-55.92%)
Mutual labels:  fragments
Penrose
A library for writing an X11 tiling window manager
Stars: ✭ 495 (-45.18%)
Mutual labels:  manager
Quick redis blog
QuickRedis is a free forever Redis Desktop manager. It supports direct connection, sentinel, and cluster mode, supports multiple languages, supports hundreds of millions of keys, and has an amazing UI. Supports both Windows, Mac OS X and Linux platform.
Stars: ✭ 594 (-34.22%)
Mutual labels:  manager
Apio
🌱 Open source ecosystem for open FPGA boards
Stars: ✭ 366 (-59.47%)
Mutual labels:  manager
Youtubeux
With MVVM Architecture pattern using Android Architecture Components This is a sample app demonstrating Youtube player animation using constraint layout
Stars: ✭ 823 (-8.86%)
Mutual labels:  fragments
Drone
🍰 The missing library manager for Android Developers
Stars: ✭ 512 (-43.3%)
Mutual labels:  manager
Projeny
A project and package manager for Unity
Stars: ✭ 656 (-27.35%)
Mutual labels:  manager
Godot Gametemplate
Template with all necessary stuff taken care, just create your games main features.
Stars: ✭ 435 (-51.83%)
Mutual labels:  manager
Berry
🍓 A healthy, byte-sized window manager
Stars: ✭ 496 (-45.07%)
Mutual labels:  manager
2bwm
A fast floating WM written over the XCB library and derived from mcwm.
Stars: ✭ 609 (-32.56%)
Mutual labels:  manager
Kawanime
Desktop app for anime fans
Stars: ✭ 396 (-56.15%)
Mutual labels:  manager
Galaxybudsclient
Unofficial Galaxy Buds Client for Windows
Stars: ✭ 733 (-18.83%)
Mutual labels:  manager
Lazyfragment
类似微信,网易新闻 延迟加载Fragment基类 , 支持与ViewPager组合刷新全部Fragment
Stars: ✭ 391 (-56.7%)
Mutual labels:  fragments
Jvedio
Windows desktop application to manage local video;Support baidu AI, youdao translation;Support FFMPEG video processing;Support multi-database management and statistics;Support skin switching
Stars: ✭ 545 (-39.65%)
Mutual labels:  manager
Skpm
💎📦 A utility to build and publish Sketch plugins
Stars: ✭ 890 (-1.44%)
Mutual labels:  manager
Ajour
A World of Warcraft addon manager written in Rust.
Stars: ✭ 803 (-11.07%)
Mutual labels:  manager
Itorrent
Torrent client for iOS 9.3+
Stars: ✭ 632 (-30.01%)
Mutual labels:  manager

SpinMenu

Android Arsenal

轮盘样式的 Fragment 菜单选择控件。有没有很炫?

Preview

Usage

导入 smlibrary module, 或者直接拷贝 com.hitomi.smlibrary 包下所有 java 文件到您的项目中

布局文件中:

    <com.hitomi.smlibrary.SpinMenu
        android:id="@+id/spin_menu"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:hint_text_color="#FFFFFF"
        app:hint_text_size="14sp"
        app:scale_ratio="0.36"
        tools:context="com.hitomi.spinmenu.MainActivity">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#333a4a"></FrameLayout>

    </com.hitomi.smlibrary.SpinMenu>

如果您觉得背景太空洞,可以在 SpinMenu 中嵌套其它布局,来绘制您自己的背景

Activity 中:

spinMenu = (SpinMenu) findViewById(R.id.spin_menu);

// 设置页面标题
List<String> hintStrList = new ArrayList<>();
hintStrList.add("热门信息");
hintStrList.add("实时新闻");
hintStrList.add("我的论坛");
hintStrList.add("我的信息");
hintStrList.add("走走看看");
hintStrList.add("阅读空间");
hintStrList.add("听听唱唱");
hintStrList.add("系统设置");

spinMenu.setHintTextStrList(hintStrList);
spinMenu.setHintTextColor(Color.parseColor("#FFFFFF"));
spinMenu.setHintTextSize(14);

// 设置启动手势开启菜单
spinMenu.setEnableGesture(true);

// 设置页面适配器
final List<Fragment> fragmentList = new ArrayList<>();
fragmentList.add(Fragment1.newInstance());
fragmentList.add(Fragment2.newInstance());
fragmentList.add(Fragment3.newInstance());
fragmentList.add(Fragment4.newInstance());
fragmentList.add(Fragment5.newInstance());
fragmentList.add(Fragment6.newInstance());
fragmentList.add(Fragment7.newInstance());
fragmentList.add(Fragment8.newInstance());
FragmentPagerAdapter fragmentPagerAdapter = new FragmentPagerAdapter(getSupportFragmentManager()) {
    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }
};
spinMenu.setFragmentAdapter(fragmentPagerAdapter);

// 设置菜单状态改变时的监听器
spinMenu.setOnSpinMenuStateChangeListener(new OnSpinMenuStateChangeListener() {
    @Override
    public void onMenuOpened() {
        Toast.makeText(MainActivity.this, "SpinMenu opened", Toast.LENGTH_SHORT).show();
    }

    @Override
    public void onMenuClosed() {
        Toast.makeText(MainActivity.this, "SpinMenu closed", Toast.LENGTH_SHORT).show();
    }
});

Attributes

<attr name="scale_ratio" format="float" />
支持页面缩放大小自定义,建议取值在3.0到5.0之间

<attr name="hint_text_color" format="color"/>
支持页面标题文字颜色自定义

<attr name="hint_text_size" format="dimension"/>
支持页面标题文字大小自定义

#Licence

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].