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

Java IconDrawable类代码示例

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

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



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

示例1: onCreateOptionsMenu

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的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);

    menu.findItem(R.id.action_menu_search).setIcon(
            new IconDrawable(this, Iconify.IconValue.fa_search)
                    .colorRes(R.color.toolbar_text_color)
                    .sizeDp(AppConfig.SEARCH_ICON_SIZE_PATCH)
    );

    menu.findItem(R.id.action_menu_favor).setIcon(
            new IconDrawable(this, Iconify.IconValue.fa_star)
                    .colorRes(R.color.toolbar_text_color)
                    .actionBarSize()
    );

    return super.onCreateOptionsMenu(menu);
}
 
开发者ID:wlemuel,项目名称:Cotable,代码行数:20,代码来源:MainActivity.java


示例2: onCreateOptionsMenu

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    inflater.inflate(R.menu.menu_profile, menu);
    if(this.isAdded()){
        /* removing until we've made the activity/fragment for this
        menu.findItem(R.id.action_profile_signup).setIcon(
                new IconDrawable(getActivity(), Iconify.IconValue.fa_user_plus)
                        .colorRes(R.color.black)
                        .actionBarSize()
        );
        */
        menu.findItem(R.id.action_profile_new_uuid).setIcon(
                new IconDrawable(getActivity(), Iconify.IconValue.fa_key)
                .colorRes(R.color.black)
                .actionBarSize()
        );
    } else {
        Log.d("onCreateOptionsMenu()", "Fragment not added to Activity");
    }
    super.onCreateOptionsMenu(menu, inflater);
}
 
开发者ID:hhroc,项目名称:yellr-android,代码行数:22,代码来源:ProfileFragment.java


示例3: onBindViewHolder

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
public void onBindViewHolder(final ViewHolder viewHolder, final int i) {
    viewHolder.tv_title_news.setText(Html.fromHtml(data.get(i).getTitle()));
    String date = Html.fromHtml(data.get(i).getDate()).toString();
    try {
        viewHolder.tv_date_news.setText(Helper.dateParse(date, "yyyy-MM-dd hh:mm:ss", "EEEE, dd MMMM yyyy"));
    } catch (ParseException e) {
    }

    viewHolder.img_item_news.setImageDrawable(new IconDrawable(activity, Iconify.IconValue.fa_image)
            .colorRes(R.color.grey500).actionBarSize());
    viewHolder.img_item_news.setScaleType(ImageView.ScaleType.CENTER_INSIDE);

    viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Helper.replaceFragment(activity, DetailNewsFragment.newInstance(data.get(i)), R.id.container, Helper.getFragmentManager(activity));
        }
    });

}
 
开发者ID:perludem,项目名称:DPR-KITA,代码行数:22,代码来源:AdapterNews.java


示例4: init

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
public void init(Bundle savedInstanceState) {

    // setup header
    View customHeaderView = LayoutInflater.from(this)
            .inflate(R.layout.custom_header_layout, null);
    this.setDrawerHeaderCustom(customHeaderView);

    MaterialSection accountSection = newSection(
            "Account",
            new IconDrawable(this, Iconify.IconValue.fa_cogs),
            new AccountFragment()
    );

    MaterialSection cartSection = newSection(
            "Cart",
            new IconDrawable(this, Iconify.IconValue.fa_shopping_cart),
            new CartFragment()
    );

    MaterialSection walletSection = newSection(
            "Wallet",
            new IconDrawable(this, Iconify.IconValue.fa_money),
            new WalletFragment()
    );


    this.addSection(cartSection);

    this.addSection(walletSection);

    this.addSection(accountSection);

    this.setDefaultSectionLoaded(0);
    disableLearningPattern();

    currentDrawer = this;
}
 
开发者ID:CuriousLearner,项目名称:Shopster,代码行数:39,代码来源:ShopsterNavigationDrawer.java


示例5: init

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
public void init(Bundle savedInstanceState) {

    // setup header
    View customHeaderView = LayoutInflater.from(this)
            .inflate(R.layout.custom_header_layout, null);
    this.setDrawerHeaderCustom(customHeaderView);


    MaterialSection deliveriesSection = newSection(
            "Deliveries",
            new IconDrawable(this, Iconify.IconValue.fa_money),
            new DeliveryManagerFragment()
    );

    MaterialSection settingsSection = newSection(
            "Settings",
            new IconDrawable(this, Iconify.IconValue.fa_cog),
            new SettingsFragment()
    );

    this.addSection(deliveriesSection);

    this.addSection(settingsSection);

    this.setDefaultSectionLoaded(0);
    disableLearningPattern();

    currentDrawer = this;
}
 
开发者ID:CuriousLearner,项目名称:Shopster,代码行数:31,代码来源:ShopsterNavigationDrawer.java


示例6: EmptyViewHolder

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
public EmptyViewHolder(View itemView) {
    super(itemView);
    
    mMessage = (TextView)itemView.findViewById(R.id.empty_view_add_message);
    mMessage.setOnClickListener(this);

    IconDrawable plusIcon = new IconDrawable(itemView.getContext(), Iconify.IconValue.fa_plus_circle)
            .colorRes(R.color.black)
            .sizeDp(20);
    mMessage.setCompoundDrawables(plusIcon, null, null, null);
}
 
开发者ID:ruckus,项目名称:SMSButler-Android,代码行数:12,代码来源:EmptyViewHolder.java


示例7: bindStockMessage

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
public void bindStockMessage(StockMessage message) {
    mMessage = message;
    mTextView.setText(mMessage.getMessage());

    IconDrawable settings = new IconDrawable(mTextView.getContext(), Iconify.IconValue.fa_pencil)
            .colorRes(R.color.settings_label).sizeDp(20);
    mSettingsIcon.setImageDrawable(settings);
}
 
开发者ID:ruckus,项目名称:SMSButler-Android,代码行数:9,代码来源:StockMessageHolder.java


示例8: onCreateOptionsMenu

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.menu_home, menu);

        /*New Story*/
        menu.findItem(R.id.action_new_post).setIcon(
                new IconDrawable(this, Iconify.IconValue.fa_pencil_square_o)
                        .colorRes(R.color.black)
                        .actionBarSize()
        );

/*        *//*Notification Icon*//*
        menu.findItem(R.id.action_notification).setIcon(
                new IconDrawable(this, Iconify.IconValue.fa_bell_o)
                    .colorRes(R.color.black)
                    .actionBarSize()
        );
*/
/*        //Messages Icon
        menu.findItem(R.id.action_messages).setIcon(
                new IconDrawable(this, Iconify.IconValue.fa_envelope_o)
                    .colorRes(R.color.black)
                    .actionBarSize()
        );
*/
        /*Profile Icon*/
        menu.findItem(R.id.action_profile).setIcon(
                new IconDrawable(this, Iconify.IconValue.fa_user)
                        .colorRes(R.color.black)
                        .actionBarSize()
        );

        return super.onCreateOptionsMenu(menu);
    }
 
开发者ID:hhroc,项目名称:yellr-android,代码行数:36,代码来源:HomeActivity.java


示例9: onCreateOptionsMenu

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    super.onCreateOptionsMenu(menu, inflater);

    id_anggota = SharePreferences.getString(getActivity(), Constant.TAG.ID_PEMILUAPI);
    LoginApi.ApiDao sessioLogin = SharePreferences.sessionLogin(getActivity());
    if (sessioLogin != null) {
        List<String> role = sessioLogin.getRoles();
        if (!role.isEmpty()) {
            if (Helper.isAnggotaDPR(role.get(0))) {
                if (switchMode.getPost_type().equals(WPKey.CUSTOM_FIELD.STATUSANGGOTA) && id_anggota.equals(switchMode.getId_anggota_dewan())) {
                    inflater.inflate(R.menu.menu_report, menu);
                    menu.findItem(R.id.action_report).setIcon(new IconDrawable(activity, Iconify.IconValue.fa_pencil_square_o).colorRes(R.color.white).actionBarSize());
                }
            } else {
                if (switchMode.getPost_type().equals(WPKey.CUSTOM_FIELD.BIOCOMMENT)) {
                    inflater.inflate(R.menu.menu_report, menu);
                    menu.findItem(R.id.action_report).setIcon(new IconDrawable(activity, Iconify.IconValue.fa_pencil_square_o).colorRes(R.color.white).actionBarSize());
                }
            }

        }
    } else {

        if (switchMode.getPost_type().equals(WPKey.CUSTOM_FIELD.BIOCOMMENT)) {
            inflater.inflate(R.menu.menu_report, menu);
            menu.findItem(R.id.action_report).setIcon(new IconDrawable(activity, Iconify.IconValue.fa_pencil_square_o).colorRes(R.color.white).actionBarSize());
        }

    }
}
 
开发者ID:perludem,项目名称:DPR-KITA,代码行数:32,代码来源:ReportFragment.java


示例10: onCreateView

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    view = inflater.inflate(getLayoutResource(), container, false);
    ButterKnife.inject(this, view);
    ab = Helper.getActionBarFragment(getActivity());

    IconDrawable arrow = new IconDrawable(getActivity(), Iconify.IconValue.fa_angle_down).colorRes(R.color.bluegray700).actionBarSize();
    img_arrow.setImageDrawable(arrow);

    String komisi = SharePreferences.getString(getActivity(), Constant.TAG.WAS_SAVE_KOMISI);
    /*Type listType = new TypeToken<List<Komisi>>() {
    }.getType();
    List<Komisi> k = new Gson().fromJson(komisi, listType);
    komisiTitle.setText(k.get(0).getNama());*/
    komisiTitle.setText("Komisi I");

    mRecyclerView.setHasFixedSize(false);
    mRecyclerView.setScrollViewCallbacks(this);
    mLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
    mRecyclerView.setLayoutManager(mLayoutManager);
    mAdapter = new AdapterKomisi(getActivity(), myDataset, true);
    mRecyclerView.setAdapter(mAdapter);

    list_komisi.setOnClickListener(this);

    callApi();

    return view;
}
 
开发者ID:perludem,项目名称:DPR-KITA,代码行数:31,代码来源:KomisiFragment.java


示例11: onCreateOptionsMenu

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的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_post, menu);
    menu.findItem(R.id.action_picture).setIcon(new IconDrawable(PostActivity.this, Iconify.IconValue.fa_camera_retro).colorRes(R.color.white).actionBarSize());
    menu.findItem(R.id.action_done).setIcon(new IconDrawable(PostActivity.this, Iconify.IconValue.fa_send).colorRes(R.color.white).actionBarSize());
    return true;
}
 
开发者ID:perludem,项目名称:DPR-KITA,代码行数:9,代码来源:PostActivity.java


示例12: update

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
protected void update() {

    super.update();



    Value<Image> value = getRowDescriptor().getValue();

    if ( value != null && value.getValue().getIcon() != null ) {

        IconDrawable drawable = new IconDrawable(getContext(), value.getValue().getIcon())
                .color(getContext().getResources().getColor(value.getValue().getColor()))
                .sizeDp(value.getValue().getSize());
        getImageView().setImageDrawable(drawable);

    }

}
 
开发者ID:quemb,项目名称:QMBForm-FontAwesomeExtension,代码行数:20,代码来源:FormFontAwesomeFieldCell.java


示例13: init

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
public void init(Bundle savedInstanceState) {

    // setup custom header
    View customHeaderView = LayoutInflater.from(this)
            .inflate(R.layout.custom_header_layout, null);
    this.setDrawerHeaderCustom(customHeaderView);


    MaterialSection accountSection  = newSection(
            "My Account",
            new IconDrawable(this, Iconify.IconValue.fa_cogs),
            new AccountFragment()
    );

    MaterialSection qrCodeGenSection  = newSection(
            "Park / Pay",
            new IconDrawable(this, Iconify.IconValue.fa_barcode),
            new QRCodeGenFragment()
    );

    MaterialSection eWalletSection = newSection(
            "ParkIt eWallet",
            new IconDrawable(this, Iconify.IconValue.fa_money),
            new ParkItWalletFragment()
    );


    MaterialSection updateInformationSection = newSection(
            "Update Info",
            new IconDrawable(this, Iconify.IconValue.fa_info),
            new UpdateInformationFragment()
    );

    MaterialSection myVehiclesSection = newSection(
            "My Vehicles",
            new IconDrawable(this, Iconify.IconValue.fa_car),
            new VehiclesFragment()
    );

    MaterialSection dynamicAPIHostConfigSection = newSection(
            "API Host Configuration",
            new IconDrawable(this, Iconify.IconValue.fa_cog),
            new ParkItAPIHostConfigFragment()
    );


    this.addSection(qrCodeGenSection);

    this.addSection(eWalletSection);

    this.addSection(updateInformationSection);

    this.addSection(myVehiclesSection);

    this.addSection(dynamicAPIHostConfigSection);

    this.addSection(accountSection);

    this.setDefaultSectionLoaded(0);
    disableLearningPattern();


    currentDrawer = this;
}
 
开发者ID:CuriousLearner,项目名称:ParkIt,代码行数:66,代码来源:ParkItNavigationDrawer.java


示例14: init

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
public void init(Bundle bundle) {

    // setup header
    View customHeaderView = LayoutInflater.from(this)
            .inflate(R.layout.custom_header_layout, null);
    this.setDrawerHeaderCustom(customHeaderView);

    MaterialSection scannerSection, configSection, dynamicAPIHostConfigSection;


    scannerSection = newSection(
            "Entry Scanner",
            new IconDrawable(this, Iconify.IconValue.fa_barcode),
            new QRCodeScannerFragment()
    );


    configSection = newSection(
            "Configuration",
            new IconDrawable(this, Iconify.IconValue.fa_cog),
            new ConfigurationFragment()
    );

    dynamicAPIHostConfigSection = newSection(
            "API Host Configuration",
            new IconDrawable(this, Iconify.IconValue.fa_cogs),
            new DynamicAPIHostConfigFragment()
    );


    this.addSection(scannerSection);
    this.addSection(configSection);
    this.addSection(dynamicAPIHostConfigSection);

    this.setDefaultSectionLoaded(0);

    disableLearningPattern();

    currentDrawer = this;

}
 
开发者ID:CuriousLearner,项目名称:ParkIt,代码行数:43,代码来源:ParkItEntryScannerNavigationDrawer.java


示例15: configMenuItem

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
public static void configMenuItem(Context context, MenuItem menuItem, Iconify.IconValue iconRes){
    menuItem.setIcon(new IconDrawable(context, iconRes)
      .colorRes(android.R.color.white)
      .actionBarSize());
}
 
开发者ID:adrielcafe,项目名称:RecifeBomDeBola,代码行数:6,代码来源:Util.java


示例16: makeOwnIcon

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
public static IconDrawable makeOwnIcon(Activity activity, int color, Iconify.IconValue icon) {
    return new IconDrawable(activity, icon).colorRes(color).actionBarSize();
}
 
开发者ID:perludem,项目名称:DPR-KITA,代码行数:4,代码来源:Helper.java


示例17: makeOwnIconWithoutSize

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
public static IconDrawable makeOwnIconWithoutSize(Activity activity, int color, Iconify.IconValue icon) {
    return new IconDrawable(activity, icon).colorRes(color);
}
 
开发者ID:perludem,项目名称:DPR-KITA,代码行数:4,代码来源:Helper.java


示例18: onServiceConnected

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
    MusicService.MusicBinder binder = (MusicService.MusicBinder) service;
    // Get service
    musicService = binder.getService();
    // Pass song list
    musicService.setSongs(songList);
    musicService.setUIControls(seekBar, currentPosition, totalDuration);
    musicBound = true;

    // If we don't have any songs on SD, tell the user about that
    if (songList.size() == 0)
        findViewById(R.id.no_music).setVisibility(View.VISIBLE);

    // Initialize interfaces
    musicService.setOnSongChangedListener(new MusicService.OnSongChangedListener() {
        ImageView artworkView = (ImageView) findViewById(R.id.playerArtwork);
        ImageView previewArtworkView = (ImageView) findViewById(R.id.previewArtwork);
        TextView previewSongTitle = (TextView) findViewById(R.id.previewSongTitle);
        TextView previewSongArtist = (TextView) findViewById(R.id.previewSongArtist);
        IconTextView previewPlayBtn = (IconTextView) findViewById(R.id.previewPlayBtn);
        @Override
        public void onSongChanged(Song song) {
            Bitmap bitmap;
            previewSongTitle.setText(song.getTitle());
            previewSongArtist.setText(song.getArtist());
            bitmap = song.getArtworkBitmap(getApplicationContext());
            if (bitmap == null) return; // bitmap might be null.. if it is, dont do anything
            artworkView.setImageBitmap(bitmap);
            previewArtworkView.setImageBitmap(bitmap);

            Bitmap blurredBitmap = bitmap.copy(bitmap.getConfig(), true);

            applyBlur(25f, blurredBitmap);

            // Scale the bitmap
            Matrix matrix = new Matrix();
            matrix.postScale(3f, 3f);
            blurredBitmap = Bitmap.createBitmap(blurredBitmap, 0, 0, blurredBitmap.getWidth(), blurredBitmap.getHeight(), matrix, true);
            ((ImageView) findViewById(R.id.playerBg)).setImageBitmap(blurredBitmap);
        }

        @Override
        public void onPlayerStatusChanged(int status) {
            switch(status) {
                case MusicService.PLAYING:
                    previewPlayBtn.setText("{fa-pause}");
                    fab.setImageDrawable(new IconDrawable(getApplicationContext(), Iconify.IconValue.fa_pause)
                            .colorRes(R.color.dark));
                    break;
                case MusicService.PAUSED:
                    previewPlayBtn.setText("{fa-play}");
                    fab.setImageDrawable(new IconDrawable(getApplicationContext(), Iconify.IconValue.fa_play)
                            .colorRes(R.color.dark));
                    break;
            }
        }
    });

    musicService.setSong(0);
}
 
开发者ID:gorjuspixels,项目名称:LocalMusicPlayer,代码行数:62,代码来源:StartActivity.java


示例19: init

import com.joanzapata.android.iconify.IconDrawable; //导入依赖的package包/类
@Override
public void init(Bundle bundle) {

    // setup custom header
    View customerHeaderView = LayoutInflater.from(this)
            .inflate(R.layout.custom_header_layout, null);
    this.setDrawerHeaderCustom(customerHeaderView);

    MaterialSection scannerSection = newSection(
            "Exit Scanner",
            new IconDrawable(this, Iconify.IconValue.fa_barcode),
            new QRCodeScannerFragment()
    );

    MaterialSection configurationSection = newSection(
            "Configuration",
            new IconDrawable(this, Iconify.IconValue.fa_cog),
            new ConfigurationFragment()
    );


    MaterialSection dynamicAPIHostConfigSection = newSection(
            "API Host Configuration",
            new IconDrawable(this, Iconify.IconValue.fa_cogs),
            new DynamicAPIHostConfigFragment()
    );


    this.addSection(scannerSection);                // section number : 0

    this.addSection(configurationSection);          // section number : 1

    this.addSection(dynamicAPIHostConfigSection);   // section number : 2


    this.setDefaultSectionLoaded(0);

    disableLearningPattern();

}
 
开发者ID:CuriousLearner,项目名称:ParkIt,代码行数:41,代码来源:ParkItExitScannerNavigationDrawer.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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