• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java BoomMenuButton类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.nightonke.boommenu.BoomMenuButton的典型用法代码示例。如果您正苦于以下问题:Java BoomMenuButton类的具体用法?Java BoomMenuButton怎么用?Java BoomMenuButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BoomMenuButton类属于com.nightonke.boommenu包,在下文中一共展示了BoomMenuButton类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initSettingsBoom

import com.nightonke.boommenu.BoomMenuButton; //导入依赖的package包/类
/**
 *
 */
private void initSettingsBoom() {
    int[] settingsBtns = {R.drawable.ic_backup, R.drawable.ic_recover_wallet, R.drawable.ic_info};
    String[] settingsStrs = { "Backup Wallet" , "Recover Wallet", "Info & Credits" };


    _settingsBmb = (BoomMenuButton) _act.findViewById(R.id.main_settings_boom);
    for (int i = 0; i < _settingsBmb.getButtonPlaceEnum().buttonNumber(); i++) {
        _settingsBmb.addBuilder(new HamButton.Builder()
                .normalImageRes(settingsBtns[i])
                .imagePadding(new Rect(10, 10, 10, 10))
                .normalText(settingsStrs[i])
        );
    }

    _settingsBmb.setOnBoomListener(new SettingsBoomListener(_act));
}
 
开发者ID:ehanoc,项目名称:xwallet,代码行数:20,代码来源:MainActivityView.java


示例2: initCircleMenuBoom

import com.nightonke.boommenu.BoomMenuButton; //导入依赖的package包/类
/**
 *
 */
private void initCircleMenuBoom() {
    int[] boomsButtons = { R.drawable.ic_send, R.drawable.ic_receive};

    _bmb = (BoomMenuButton) _act.findViewById(R.id.bmb);
    for (int i = 0; i < _bmb.getButtonPlaceEnum().buttonNumber(); i++) {
        _bmb.addBuilder(new SimpleCircleButton.Builder()
                .normalImageRes(boomsButtons[i])
        );
    }

    _bmb.setOnBoomListener(new MainBoomListener(_act));
}
 
开发者ID:ehanoc,项目名称:xwallet,代码行数:16,代码来源:MainActivityView.java


示例3: onCreate

import com.nightonke.boommenu.BoomMenuButton; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_operation_mode_result_view);
    activity = this;
    self = this;
    addEventBtn = (BoomMenuButton) findViewById(R.id.add_event_to_timeline_btn);
    reactionPerformanceLabel = (TextView) findViewById(R.id.reaction_time_performance_chart);
    recyclerTimeLineView = (RecyclerView) findViewById(R.id.recyclerView);
    expandImage = (ImageView) findViewById(R.id.expand_icon);
}
 
开发者ID:lidox,项目名称:reaction-test,代码行数:12,代码来源:OperationModeView.java


示例4: onWindowFocusChanged

import com.nightonke.boommenu.BoomMenuButton; //导入依赖的package包/类
@Override
public void onWindowFocusChanged(boolean hasFocus) {
    super.onWindowFocusChanged(hasFocus);

    if (isInitialized) return;
    isInitialized = true;

    Drawable[] subButtonDrawables = new Drawable[3];
    int[] drawablesResource = new int[]{
            R.drawable.ic_alarm_add_white_36dp,
            R.drawable.ic_mic_white_36dp,
            R.drawable.ic_note_add_white_36dp
    };
    int itemCount = 3;
    for (int i = 0; i < itemCount; i++)
        subButtonDrawables[i] = ContextCompat.getDrawable(this, drawablesResource[i]);

    final String[] subButtonTexts = new String[]{getResources().getString(R.string.add_reaction_test), getResources().getString(R.string.add_audio), getResources().getString(R.string.add_event)};

    int[][] subButtonColors = new int[3][2];
    for (int i = 0; i < itemCount; i++) {
        subButtonColors[i][1] = ContextCompat.getColor(this, R.color.colorPrimary);
        subButtonColors[i][0] = Util.getInstance().getPressedColor(subButtonColors[i][1]);
    }


    addEventBtn.init(
            subButtonDrawables, // The drawables of images of sub buttons. Can not be null.
            subButtonTexts,     // The texts of sub buttons, ok to be null.
            subButtonColors,    // The colors of sub buttons, including pressed-state and normal-state.
            ButtonType.HAM,     // The button type.
            BoomType.LINE,  // The boom type.
            PlaceType.HAM_3_1,  // The place type.
            null,               // Ease type to move the sub buttons when showing.
            null,               // Ease type to scale the sub buttons when showing.
            null,               // Ease type to rotate the sub buttons when showing.
            null,               // Ease type to move the sub buttons when dismissing.
            null,               // Ease type to scale the sub buttons when dismissing.
            null,               // Ease type to rotate the sub buttons when dismissing.
            null                // Rotation degree.
    );

    final Activity activity = this;
    addEventBtn.setOnSubButtonClickListener(new BoomMenuButton.OnSubButtonClickListener() {
        @Override
        public void onClick(int buttonIndex) {
            //TastyToast.makeText(getApplicationContext(), subButtonTexts[buttonIndex] + " clicked", TastyToast.LENGTH_LONG, TastyToast.SUCCESS);
            int addNewReactionTestIndex = 0;
            int recordAudioIndex = 1;
            int addEventIndex = 2;

            if (buttonIndex == recordAudioIndex) {
                boolean isAudioRecordAllowed = UtilsRG.permissionAllowed(activity, Manifest.permission.RECORD_AUDIO);
                if (isAudioRecordAllowed) {
                    UtilsRG.info("add audio record has been selected");
                    openAudioDialog(activity);
                } else {
                    UtilsRG.info("isAudioRecordAllowed = false");
                    String[] permissions = {Manifest.permission.RECORD_AUDIO, Manifest.permission.WRITE_EXTERNAL_STORAGE};
                    if (UtilsRG.requestPermission(activity, permissions, AudioRecorder.REQUEST_CODE_RECORD_AUDIO)) {
                        UtilsRG.startInstalledAppDetailsActivity(activity);
                    }
                }
            } else if (buttonIndex == addEventIndex) {
                UtilsRG.info("addEventIndex has been selected");
                MaterialDialog dialog = initNoteDialog(activity);
                initEventTypeSwipeSelector(dialog, activity);
                initTimePicker(dialog, activity);

            } else if (buttonIndex == addNewReactionTestIndex) {
                startIntentNewReactionTest(activity);
            }
        }
    });
}
 
开发者ID:lidox,项目名称:reaction-test,代码行数:76,代码来源:OperationModeView.java



注:本文中的com.nightonke.boommenu.BoomMenuButton类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ValuePropertyLoader类代码示例发布时间:2022-05-22
下一篇:
Java Language类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap