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

Java FloatingActionButton类代码示例

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

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



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

示例1: setupShareActionMenu

import com.oguzdev.circularfloatingactionmenu.library.FloatingActionButton; //导入依赖的package包/类
private void setupShareActionMenu() {
    mFullscreenActionMenu = new FullscreenActionMenu(this, FloatingActionButton.POSITION_CENTER);
    mFullscreenActionMenu.setOnClickListener(new FullscreenActionMenu.OnClickListener() {
        @Override
        public void onClick(final FullscreenActionMenu.ActionType type) {
            if (mIsSharing) return; // ignore onClick if startActivity is already called

            FodexItem item = mFodexItems.get(mPager.getCurrentItem());
            switch (type) {
                case SHOWTAGS:
                    FodexWidget.showTags(FullscreenActivity.this, fodexCore, item.id);
                    break;
                case ADDTAGS:
                    long[] imageIds = new long[] {
                            item.id
                    };
                    FodexWidget.addTags(FullscreenActivity.this, fodexCore, imageIds, null);
                    break;
                default:
                    showShare(type, item);
                    break;
            }
        }
    });
}
 
开发者ID:dyhpoon,项目名称:Fo.dex,代码行数:26,代码来源:FullscreenActivity.java


示例2: onCreateView

import com.oguzdev.circularfloatingactionmenu.library.FloatingActionButton; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_menu_with_custom_animation, container, false);

    ImageView fabContent = new ImageView(getActivity());
    fabContent.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_settings));

    FloatingActionButton darkButton = new FloatingActionButton.Builder(getActivity())
                                          .setTheme(FloatingActionButton.THEME_DARK)
                                          .setContentView(fabContent)
                                          .setPosition(FloatingActionButton.POSITION_BOTTOM_CENTER)
                                          .build();

    SubActionButton.Builder rLSubBuilder = new SubActionButton.Builder(getActivity())
                                           .setTheme(SubActionButton.THEME_DARK);
    ImageView rlIcon1 = new ImageView(getActivity());
    ImageView rlIcon2 = new ImageView(getActivity());
    ImageView rlIcon3 = new ImageView(getActivity());
    ImageView rlIcon4 = new ImageView(getActivity());
    ImageView rlIcon5 = new ImageView(getActivity());

    rlIcon1.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_chat));
    rlIcon2.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_camera));
    rlIcon3.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_video));
    rlIcon4.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_place));
    rlIcon5.setImageDrawable(getResources().getDrawable(R.drawable.ic_action_headphones));

    // Set 4 SubActionButtons
    FloatingActionMenu centerBottomMenu = new FloatingActionMenu.Builder(getActivity())
            .setStartAngle(0)
            .setEndAngle(-180)
            .setAnimationHandler(new SlideInAnimationHandler())
            .addSubActionView(rLSubBuilder.setContentView(rlIcon1).build())
            .addSubActionView(rLSubBuilder.setContentView(rlIcon2).build())
            .addSubActionView(rLSubBuilder.setContentView(rlIcon3).build())
            .addSubActionView(rLSubBuilder.setContentView(rlIcon4).build())
            .addSubActionView(rLSubBuilder.setContentView(rlIcon5).build())
            .attachTo(darkButton)
            .build();

    return rootView;
}
 
开发者ID:sathishmscict,项目名称:CircularFloatingActionMenu,代码行数:44,代码来源:MenuWithCustomAnimationActivity.java


示例3: FloatingActionWidget

import com.oguzdev.circularfloatingactionmenu.library.FloatingActionButton; //导入依赖的package包/类
public FloatingActionWidget(Activity activity) {
    mActivity = activity;
    mFloatingActionButtonBuilder = new FloatingActionButton.Builder(activity);
    mFloatingActionMenuBuilder = new FloatingActionMenu.Builder(activity);
}
 
开发者ID:bigthing33,项目名称:MoveEnableFloatButton,代码行数:6,代码来源:FloatingActionWidget.java


示例4: getFloatingActionButton

import com.oguzdev.circularfloatingactionmenu.library.FloatingActionButton; //导入依赖的package包/类
public FloatingActionButton getFloatingActionButton() {
    return mFloatingActionButton;
}
 
开发者ID:bigthing33,项目名称:MoveEnableFloatButton,代码行数:4,代码来源:FloatingActionWidget.java


示例5: setFloatingActionButton

import com.oguzdev.circularfloatingactionmenu.library.FloatingActionButton; //导入依赖的package包/类
public void setFloatingActionButton(FloatingActionButton floatingActionButton) {
    mFloatingActionButton = floatingActionButton;
}
 
开发者ID:bigthing33,项目名称:MoveEnableFloatButton,代码行数:4,代码来源:FloatingActionWidget.java


示例6: actionBarButton

import com.oguzdev.circularfloatingactionmenu.library.FloatingActionButton; //导入依赖的package包/类
private void actionBarButton() {
    //define the icon for the main floating action button
    ImageView iconActionButton = new ImageView(this);
    iconActionButton.setImageResource(R.drawable.ic_action_new);

    FloatingActionButton actionButton = new FloatingActionButton.Builder(this)
            .setContentView(iconActionButton)
            .setBackgroundDrawable(R.drawable.selector_button_red)
            .build();

    //define the icons for the sub action buttons
    ImageView TourAndTravel = new ImageView(this);
    TourAndTravel.setImageResource(R.drawable.tourtravel);
    ImageView MedicinaStore = new ImageView(this);
    MedicinaStore.setImageResource(R.drawable.medicina);
    ImageView SocialNetwork = new ImageView(this);
    SocialNetwork.setImageResource(R.drawable.socialnetwork);
    ImageView ShoppingAndUtility = new ImageView(this);
    ShoppingAndUtility.setImageResource(R.drawable.shopping);
    ImageView Newspaper = new ImageView(this);
    Newspaper.setImageResource(R.drawable.newspaper);

    //set the background for all the sub buttons
    SubActionButton.Builder itemBuilder = new SubActionButton.Builder(this);
    itemBuilder.setBackgroundDrawable(getResources().getDrawable(R.drawable.selector_sub_button_gray));

    //build the sub buttons
    SubActionButton Tour = itemBuilder.setContentView(TourAndTravel).build();
    SubActionButton Med = itemBuilder.setContentView(MedicinaStore).build();
    SubActionButton Social = itemBuilder.setContentView(SocialNetwork).build();
    SubActionButton Shopping = itemBuilder.setContentView(ShoppingAndUtility).build();
    SubActionButton News = itemBuilder.setContentView(Newspaper).build();

    Tour.setTag(TAG_Tour_Travel);
    Med.setTag(TAG_Medicina);
    Social.setTag(TAG_Social_Network);
    Shopping.setTag(TAG_Shopping_Utility);
    News.setTag(TAG_NewsPaper);

    Tour.setOnClickListener(this);
    Med.setOnClickListener(this);
    Social.setOnClickListener(this);
    Shopping.setOnClickListener(this);
    News.setOnClickListener(this);

    //add the sub buttons to the main floating action button
    FloatingActionMenu actionMenu = new FloatingActionMenu.Builder(this)
            .addSubActionView(Tour)
            .addSubActionView(Med)
            .addSubActionView(Social)
            .addSubActionView(Shopping)
            .addSubActionView(News)
            .attachTo(actionButton)
            .build();
}
 
开发者ID:GoelSanchit,项目名称:Whizz_AppStore,代码行数:56,代码来源:ListView2.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java BasicDataEncryptionManager类代码示例发布时间:2022-05-22
下一篇:
Java ChildPropertyDescriptor类代码示例发布时间: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