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

Java FontAwesome类代码示例

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

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



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

示例1: onCreateOptionsMenu

import com.mikepenz.iconics.typeface.FontAwesome; //导入依赖的package包/类
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_main, menu);
    //重载菜单图标
    ActionItemBadge.update(this, menu.findItem(R.id.action_publish), FontAwesome.Icon.faw_plus, Color.GRAY, ActionItemBadge.BadgeStyles.GREY, Integer.MIN_VALUE);
    ActionItemBadge.update(this, menu.findItem(R.id.action_chat), FontAwesome.Icon.faw_comment_o, Color.GRAY, ActionItemBadge.BadgeStyles.GREY, Integer.MIN_VALUE);
    return true;
}
 
开发者ID:huijimuhe,项目名称:monolog-android,代码行数:10,代码来源:AbstractMainActivity.java


示例2: onOptionsItemSelected

import com.mikepenz.iconics.typeface.FontAwesome; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {

    switch (item.getItemId()) {
        case R.id.action_publish:
            startActivityForResult(PublishActivity.newIntent(), PublishActivity.REQUEST_PUBLISH);
            break;
        case R.id.action_chat:
            ActionItemBadge.update(this, item, FontAwesome.Icon.faw_comment_o,Color.GRAY, ActionItemBadge.BadgeStyles.GREY,  Integer.MIN_VALUE);
            PrefService.getInstance(getApplicationContext()).cleanUnread();
            startActivity(ChatListActivity.newIntent());
            break;
    }
    return true;
}
 
开发者ID:huijimuhe,项目名称:monolog-android,代码行数:16,代码来源:AbstractMainActivity.java


示例3: onNewMsg

import com.mikepenz.iconics.typeface.FontAwesome; //导入依赖的package包/类
/**
 * 新消息提示
 */
@Override
public void onNewMsg() {
    int count=PrefService.getInstance(getApplicationContext()).getUnread();
    Log.d("MainActivity", "Recieve msg:" + count);
    ActionItemBadge.update(this, toolbar.getMenu().findItem(R.id.action_chat), FontAwesome.Icon.faw_comment_o,Color.GRAY, ActionItemBadge.BadgeStyles.RED, PrefService.getInstance(getApplicationContext()).getUnread());
}
 
开发者ID:huijimuhe,项目名称:monolog-android,代码行数:10,代码来源:AbstractMainActivity.java


示例4: onCreate

import com.mikepenz.iconics.typeface.FontAwesome; //导入依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_edit_macros);

        initToolbar();
        initDrawer();

        mListView = (CardListView) findViewById(R.id.listview);
        mListEmptyTextView = (TextView) findViewById(R.id.listEmptyText);
        mMacroList = MacroUtils.loadMacroList(mPrefs);

//        if (mMacroList.size() >= MACRO_SIZE_WARN) {
//            macroListLengthWarningDialog(mMacroList.size());
//        }

        mCards = new ArrayList<Card>();
        for (MacroEntry macroEntry : mMacroList) {
            mCards.add(macroEntryToCard(macroEntry));
        }

        mCardArrayAdapter = new CardArrayAdapter(this, mCards);
        if (mListView != null) {
            mListView.setAdapter(mCardArrayAdapter);
        }

        Drawable plus = new IconicsDrawable(this, FontAwesome.Icon.faw_plus).color(Color.DKGRAY).sizeDp(20);
        FloatingActionButton addButton = (FloatingActionButton) findViewById(R.id.add);
        addButton.setImageDrawable(plus);
        addButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                addMacro();
            }
        });
    }
 
开发者ID:mitchtech,项目名称:XposedMacroExpand,代码行数:37,代码来源:EditMacrosActivity.java


示例5: showNavigationDrawer

import com.mikepenz.iconics.typeface.FontAwesome; //导入依赖的package包/类
public static Drawer showNavigationDrawer(final Context context, Toolbar toolbar, final MoticonAdapter moticonAdapter, final MoticonAdapter moticonPositiveAdapter, final MoticonAdapter moticonNegativeAdapter, final MoticonAdapter moticonFunnyAdapter, final MoticonAdapter moticonAnimalsAdapter, final MoticonAdapter moticonSpecialAdapter, final RecyclerView recyclerView) {
    Activity activity = (Activity) context;

    AccountHeader headerResult = new AccountHeaderBuilder()
            .withActivity(activity)
            .withHeaderBackground(R.drawable.header)
            .build();
    return new DrawerBuilder()
            .withActivity(activity)
            .withToolbar(toolbar)
            .withAccountHeader(headerResult)
            .withStatusBarColor(context.getResources().getColor(R.color.primary_dark))
            .addDrawerItems(
                    new PrimaryDrawerItem().withName(context.getResources().getString(R.string.app_name)).withIcon(R.mipmap.ic_launcher),
                    new DividerDrawerItem(),
                    new PrimaryDrawerItem().withName(context.getResources().getString(R.string.action_positive)).withIcon(FontAwesome.Icon.faw_thumbs_up).withBadge("(/^▽^)/"),
                    new PrimaryDrawerItem().withName(context.getResources().getString(R.string.action_negative)).withIcon(FontAwesome.Icon.faw_thumbs_down).withBadge("(>_<)"),
                    new PrimaryDrawerItem().withName(context.getResources().getString(R.string.action_funny)).withIcon(FontAwesome.Icon.faw_child).withBadge("¯\\_(ツ)_/¯"),
                    new PrimaryDrawerItem().withName(context.getResources().getString(R.string.action_animal)).withIcon(FontAwesome.Icon.faw_paw).withBadge("∪・ω・∪"),
                    new PrimaryDrawerItem().withName(context.getResources().getString(R.string.action_special)).withIcon(FontAwesome.Icon.faw_star).withBadge("ʕ•̬͡•ʕ•̫͡•♥"),
                    new DividerDrawerItem(),
                    new SecondaryDrawerItem().withName(context.getResources().getString(R.string.action_about)).withCheckable(false)
            )
            .withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
                @Override
                public boolean onItemClick(AdapterView<?> adapterView, View view, int position, long id, IDrawerItem iDrawerItem) {
                    switch (position) {
                        case 0:
                            recyclerView.setAdapter(moticonAdapter);
                            break;
                        case 2:
                            recyclerView.setAdapter(moticonPositiveAdapter);
                            break;
                        case 3:
                            recyclerView.setAdapter(moticonNegativeAdapter);
                            break;
                        case 4:
                            recyclerView.setAdapter(moticonFunnyAdapter);
                            break;
                        case 5:
                            recyclerView.setAdapter(moticonAnimalsAdapter);
                            break;
                        case 6:
                            recyclerView.setAdapter(moticonSpecialAdapter);
                            break;
                        case 8:
                            context.startActivity(new Intent(context, AboutActivity.class));
                            break;
                        default:
                            break;
                    }

                    return false;
                }
            }).build();
}
 
开发者ID:javiersantos,项目名称:Moticons,代码行数:57,代码来源:UtilsUI.java


示例6: onCreate

import com.mikepenz.iconics.typeface.FontAwesome; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_detail);

    //Utils.configureWindowEnterExitTransition(getWindow());

    toolbar = (Toolbar) findViewById(R.id.toolbar);
    toolbar.setTitle("");
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    // Handle Back Navigation :D
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            DetailActivity.this.onBackPressed();
        }
    });

    // Row Container
    rowContainer = (LinearLayout) findViewById(R.id.row_container);

    // Fab Button
    ImageButton fabButton = (ImageButton) findViewById(R.id.fab_button);
    fabButton.setImageDrawable(new IconicsDrawable(this, FontAwesome.Icon.faw_upload).color(Color.WHITE).actionBarSize());
    fabButton.setOnClickListener(fabClickListener);
    Utils.configureFab(fabButton);

    //getWindow().getEnterTransition().removeListener(this);

    for (int i = 1; i < rowContainer.getChildCount(); i++) {
        View rowView = rowContainer.getChildAt(i);
        rowView.animate().setStartDelay(100 + i * SCALE_DELAY).scaleX(1).scaleY(1);
    }

    ComponentName componentName = null;

    if (savedInstanceState != null) {
        componentName = savedInstanceState.getParcelable("appInfo");
    } else if (getIntent() != null && getIntent().getExtras() != null) {
        componentName = (ComponentName) getIntent().getExtras().get("appInfo");
    }

    if (componentName != null) {
        Intent intent = new Intent();
        intent.setComponent(componentName);
        ResolveInfo app = getPackageManager().resolveActivity(intent, 0);
        appInfo = new AppInfo(this, app);
    }

    if (appInfo != null) {
        //toolbar.setLogo(appInfo.getIcon());
        toolbar.setTitle(appInfo.getName());

        View view = rowContainer.findViewById(R.id.row_name);
        fillRow(view, "Application Name", appInfo.getName());
        ((ImageView) view.findViewById(R.id.appIcon)).setImageDrawable(appInfo.getIcon());

        view = rowContainer.findViewById(R.id.row_package_name);
        fillRow(view, "Package Name", appInfo.getPackageName());

        view = rowContainer.findViewById(R.id.row_activity);
        fillRow(view, "Activity", appInfo.getActivityName());

        view = rowContainer.findViewById(R.id.row_component_info);
        fillRow(view, "ComponentInfo", appInfo.getComponentInfo());

        view = rowContainer.findViewById(R.id.row_version);
        fillRow(view, "Version", appInfo.getVersionName() + " (" + appInfo.getVersionCode() + ")");

        view = rowContainer.findViewById(R.id.row_moments);
        fillRow(view, "Moments", "First installed: " + new Date(appInfo.getFirstInstallTime()) + "\nLast updated: " + new Date(appInfo.getLastUpdateTime()));
    }
}
 
开发者ID:brucetoo,项目名称:Materia-Design,代码行数:76,代码来源:DetailActivity.java


示例7: initDrawer

import com.mikepenz.iconics.typeface.FontAwesome; //导入依赖的package包/类
protected void initDrawer() {
    mDrawer = new DrawerBuilder()
            .withActivity(this)
            .withToolbar(mToolbar)
            .withTranslucentActionBarCompatibility(true)
            .withCloseOnClick(true)
            .withAnimateDrawerItems(true)
            .withSelectedItem(-1)
            .addDrawerItems(
                    new PrimaryDrawerItem().withName(MENU_TEXT_DYNAMIC_MACROS).withIcon(FontAwesome.Icon.faw_android).withIdentifier(MENU_DYNAMIC_MACROS),
                    new PrimaryDrawerItem().withName(MENU_TEXT_SETTINGS).withIcon(FontAwesome.Icon.faw_gear).withIdentifier(MENU_SETTINGS),
                    new PrimaryDrawerItem().withName(MENU_TEXT_ABOUT).withIcon(FontAwesome.Icon.faw_info).withIdentifier(MENU_ABOUT),
                    new PrimaryDrawerItem().withName(MENU_TEXT_HELP).withIcon(FontAwesome.Icon.faw_question).withIdentifier(MENU_HELP),
                    new DividerDrawerItem(),
                    new SecondaryDrawerItem().withName(MENU_TEXT_THEME).withIcon(FontAwesome.Icon.faw_paint_brush).withIdentifier(MENU_THEME),
                    new SecondaryDrawerItem().withName(MENU_TEXT_UPGRADE).withIcon(FontAwesome.Icon.faw_shopping_cart).withIdentifier(MENU_UPGRADE),
                    new SecondaryDrawerItem().withName(MENU_TEXT_DONATE).withIcon(FontAwesome.Icon.faw_dollar).withIdentifier(MENU_DONATE),
                    new SecondaryDrawerItem().withName(MENU_TEXT_SHARE).withIcon(FontAwesome.Icon.faw_share).withIdentifier(MENU_SHARE),
                    new SecondaryDrawerItem().withName(MENU_TEXT_RATE).withIcon(FontAwesome.Icon.faw_star).withIdentifier(MENU_RATE),
                    new SecondaryDrawerItem().withName(MENU_TEXT_MORE_APPS).withIcon(FontAwesome.Icon.faw_image).withIdentifier(MENU_MORE_APPS),
                    new SecondaryDrawerItem().withName(MENU_TEXT_SUPPORT_URL).withIcon(FontAwesome.Icon.faw_bookmark).withIdentifier(MENU_SUPPORT_URL),
                    new SecondaryDrawerItem().withName(MENU_TEXT_CONTACT).withIcon(FontAwesome.Icon.faw_bullhorn).withIdentifier(MENU_CONTACT),
                    new SecondaryDrawerItem().withName(MENU_TEXT_SOURCE_CODE).withIcon(FontAwesome.Icon.faw_github).withIdentifier(MENU_SOURCE_CODE),
                    new SecondaryDrawerItem().withName(MENU_TEXT_LICENSE).withIcon(FontAwesome.Icon.faw_copyright).withIdentifier(MENU_LICENSE),
                    new SecondaryDrawerItem().withName(MENU_TEXT_PRIVACY).withIcon(FontAwesome.Icon.faw_video_camera).withIdentifier(MENU_PRIVACY),
                    new SecondaryDrawerItem().withName(MENU_TEXT_CHANGE_LOG).withIcon(FontAwesome.Icon.faw_list).withIdentifier(MENU_CHANGE_LOG),
                    new SecondaryDrawerItem().withName(MENU_TEXT_EXIT).withIcon(FontAwesome.Icon.faw_power_off).withIdentifier(MENU_EXIT)
            )
            .withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
                @Override
                public boolean onItemClick(AdapterView<?> parent, View view, int position, long id, IDrawerItem drawerItem) {
                    if (drawerItem != null) {
                        performAction(drawerItem.getIdentifier());
                        return true;
                    }
                    return false;
                }
            })
            .withActionBarDrawerToggle(true)
            .withShowDrawerOnFirstLaunch(true)
            .build();
}
 
开发者ID:mitchtech,项目名称:XposedMacroExpand,代码行数:43,代码来源:BaseActivity.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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