当前位置: 首页>>代码示例>>Java>>正文


Java Iconify类代码示例

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


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

示例1: onCreateOptionsMenu

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

import com.joanzapata.android.iconify.Iconify; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View root = inflater.inflate(R.layout.fragment_contact, container, false);
    View header = inflater.inflate(R.layout.list_header_contact, null, false);
    ButterKnife.bind(this, root);

    IconTextView iconWebSite = (IconTextView) header.findViewById(android.R.id.icon1);
    IconTextView iconEmail = (IconTextView) header.findViewById(android.R.id.icon2);
    TextView webSite = (TextView) header.findViewById(R.id.website);
    TextView email = (TextView) header.findViewById(R.id.email);
    iconWebSite.setTypeface(Iconify.getTypeface(getActivity()));
    iconEmail.setTypeface(Iconify.getTypeface(getActivity()));
    webSite.setText(App.SITE_URL.replace("http://", ""));
    email.setText(App.CONTACT_EMAIL);

    listView.addHeaderView(header);
    listView.setAdapter(new ContactAdapter(getActivity(), Db.contacts));
    return root;
}
 
开发者ID:adrielcafe,项目名称:RecifeBomDeBola,代码行数:21,代码来源:ContactFragment.java

示例3: getView

import com.joanzapata.android.iconify.Iconify; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    ViewHolder viewHolder;
    Contact contact = getItem(position);

    if (convertView == null) {
        convertView = LayoutInflater.from(getContext()).inflate(R.layout.list_item_contact, parent, false);
        viewHolder = new ViewHolder(convertView);
        convertView.setTag(viewHolder);
    } else {
        viewHolder = (ViewHolder) convertView.getTag();
    }

    viewHolder.iconView.setTypeface(Iconify.getTypeface(getContext()));
    viewHolder.nameView.setText(contact.getName());
    viewHolder.roleView.setText(contact.getRole());
    viewHolder.phoneView.setText(contact.getPhone());

    return convertView;
}
 
开发者ID:adrielcafe,项目名称:RecifeBomDeBola,代码行数:21,代码来源:ContactAdapter.java

示例4: onCreateOptionsMenu

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

示例5: onCreateOptionsMenu

import com.joanzapata.android.iconify.Iconify; //导入依赖的package包/类
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    super.onCreateOptionsMenu(menu, inflater);
    inflater.inflate(R.menu.menu_share, menu);
    menu.findItem(R.id.action_share).setIcon(Helper.makeOwnIcon(getActivity(), R.color.white, Iconify.IconValue.fa_share_alt));
    final String share_to = "Saya telah membaca artikel " + newsdao.getTitle() + " di aplikasi " + getResources().getString(R.string.app_name) + url;

    DynamicShareActionProvider mShareActionProvider =
            (DynamicShareActionProvider)
                    MenuItemCompat.getActionProvider
                            (menu.findItem(R.id.action_share));

    if (mShareActionProvider != null) {
        mShareActionProvider.setShareDataType("text/plain");
        mShareActionProvider.setOnShareIntentUpdateListener(new DynamicShareActionProvider.OnShareIntentUpdateListener() {
            @Override
            public Bundle onShareIntentExtrasUpdate() {
                Bundle extras = new Bundle();
                extras.putString(android.content.Intent.EXTRA_TEXT, share_to);
                return extras;
            }
        });
    }
}
 
开发者ID:perludem,项目名称:DPR-KITA,代码行数:25,代码来源:DetailNewsFragment.java

示例6: onCreateOptionsMenu

import com.joanzapata.android.iconify.Iconify; //导入依赖的package包/类
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    super.onCreateOptionsMenu(menu, inflater);
    inflater.inflate(R.menu.menu_share, menu);
    menu.findItem(R.id.action_share).setIcon(Helper.makeOwnIcon(getActivity(), R.color.white, Iconify.IconValue.fa_share_alt));
    final String share_to = "Saya telah membaca infogragis" + mParam1 + " di aplikasi " + getResources().getString(R.string.app_name) + mParam2.replace(" ", "%20");

    DynamicShareActionProvider mShareActionProvider =
            (DynamicShareActionProvider)
                    MenuItemCompat.getActionProvider
                            (menu.findItem(R.id.action_share));

    if (mShareActionProvider != null) {
        mShareActionProvider.setShareDataType("text/plain");
        mShareActionProvider.setOnShareIntentUpdateListener(new DynamicShareActionProvider.OnShareIntentUpdateListener() {
            @Override
            public Bundle onShareIntentExtrasUpdate() {
                Bundle extras = new Bundle();
                extras.putString(android.content.Intent.EXTRA_TEXT, share_to);
                return extras;
            }
        });
    }
}
 
开发者ID:perludem,项目名称:DPR-KITA,代码行数:25,代码来源:ViewImageFragment.java

示例7: onCreateView

import com.joanzapata.android.iconify.Iconify; //导入依赖的package包/类
@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
//        ((NavDrawerActivity) getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(false);
        // Inflate the layout for this fragment
        this.savedInstanceState = savedInstanceState;
        view = inflater.inflate(getLayoutResource(), container, false);
        ButterKnife.inject(this, view);
        ab = Helper.getActionBarFragment(getActivity());
        ab.setDisplayHomeAsUpEnabled(true);
        sessionLogin = SharePreferences.sessionLogin(getActivity());
        partai = new Gson().fromJson(PartaiJSON.partai, BaseDaoPartai.class);
        resetButton();
        btn_comment.setEnabled(false);
        btn_like.setEnabled(false);
        btn_timeline.setEnabled(false);

        btn_biodata.setCompoundDrawablesWithIntrinsicBounds(null, Helper.makeOwnIcon(getActivity(), R.color.red, Iconify.IconValue.fa_user), null, null);
        scroll.setScrollViewCallbacks(this);
        callApi();


        return view;

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

示例8: onBindViewHolder

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

示例9: onBindViewHolder

import com.joanzapata.android.iconify.Iconify; //导入依赖的package包/类
@Override
public void onBindViewHolder(SamplesListEntryViewHolder viewHolder, int position) {
    final Samples sample = Samples.values()[position];

    viewHolder.nameTextView.setText(sample.nameId);

    viewHolder.iconTextView.setText(sample.iconId);
    Iconify.addIcons(viewHolder.iconTextView);

    viewHolder.iconTextView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            onSampleClick(sample);
        }
    });
}
 
开发者ID:KrzysztofWrobel,项目名称:MCESensorTagWorkshopFull,代码行数:17,代码来源:SamplesListAdapter.java

示例10: onRecord

import com.joanzapata.android.iconify.Iconify; //导入依赖的package包/类
private void onRecord(boolean start) {
    if (null == mRecordingOverlay) {

        mRecordingOverlay = getLayoutInflater().inflate(R.layout.recording_overlay_view, null);
        mRecordingOverlay.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));


        TextView iconTextView = (TextView) mRecordingOverlay.findViewById(R.id.recordingTextView);
        iconTextView.setText(null);
        Iconify.setIcon(iconTextView, Iconify.IconValue.fa_microphone);

        mMainView.addView(mRecordingOverlay);
        AlphaAnimation a = new AlphaAnimation(0.f, 1.f);
        a.setDuration(500);
        mRecordingOverlay.startAnimation(a);

        AnimationSet animationSet = (AnimationSet) AnimationUtils.loadAnimation(this, R.anim.pulse_animation);
        mRecordingOverlay.findViewById(R.id.recordingTextView).startAnimation(animationSet);

        startRecording();
    } else {

        hideRecordingOverlay();

    }
}
 
开发者ID:IziOzi,项目名称:IziOzi,代码行数:27,代码来源:IOCreateButtonActivity.java

示例11: init

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

示例12: init

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

示例13: onCreate

import com.joanzapata.android.iconify.Iconify; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_main);
    mListView = (ListView) findViewById(R.id.list);

    CellViewFactory.getInstance().setRowTypeMap(RowDescriptor.FormRowDescriptorTypeFontAwesome, FormFontAwesomeFieldCell.class);
    CellViewFactory.getInstance().setRowTypeMap(RowDescriptor.FormRowDescriptorTypeFontAwesomeVertical, FormFontAwesomeVerticalFieldCell.class);



    FormDescriptor descriptor = FormDescriptor.newInstance();
    descriptor.setOnFormRowValueChangedListener(this);

    SectionDescriptor sectionDescriptor = SectionDescriptor.newInstance("section","FontAwesome Image Cells");
    descriptor.addSection(sectionDescriptor);

    sectionDescriptor.addRow( RowDescriptor
            .newInstance("fontAwesome", RowDescriptor.FormRowDescriptorTypeFontAwesome, "FontAwesome Icon Title; Default Color",
                    new Value<Image>(new Image(Iconify.IconValue.fa_android, 100))) );

    sectionDescriptor.addRow( RowDescriptor
            .newInstance("fontAwesome", RowDescriptor.FormRowDescriptorTypeFontAwesome, "FontAwesome Icon Title",
                    new Value<Image>(new Image(Iconify.IconValue.fa_arrow_circle_left, 100, R.color.fa_color))) );

    sectionDescriptor.addRow( RowDescriptor
            .newInstance("fontAwesomeVertical", RowDescriptor.FormRowDescriptorTypeFontAwesomeVertical, "FontAwesomeVertical Icon Title; Default Size",
                    new Value<Image>(new Image(Iconify.IconValue.fa_adn))) );

    sectionDescriptor.addRow( RowDescriptor
            .newInstance("fontAwesomeVertical", RowDescriptor.FormRowDescriptorTypeFontAwesomeVertical, "FontAwesomeVertical Icon Title",
                    new Value<Image>(new Image(Iconify.IconValue.fa_share, 100, R.color.fa_color))) );

    mFormManager = new FormManager();
    mFormManager.setup(descriptor, mListView, this);
    mFormManager.setOnFormRowClickListener(this);
}
 
开发者ID:quemb,项目名称:QMBForm-FontAwesomeExtension,代码行数:39,代码来源:MainActivity.java

示例14: setImage

import com.joanzapata.android.iconify.Iconify; //导入依赖的package包/类
public void setImage(Iconify.IconValue icon, int color){
    mIcon = icon;
    mColor = color;
    if (mOnValueChangeListener != null){
        mOnValueChangeListener.onChange(icon);
    }
}
 
开发者ID:quemb,项目名称:QMBForm-FontAwesomeExtension,代码行数:8,代码来源:Image.java

示例15: openPlayersDialog

import com.joanzapata.android.iconify.Iconify; //导入依赖的package包/类
public static void openPlayersDialog(final Activity activity, final String teamName, String teamCategory, int teamRpa){
    Db.getTeamPlayers(activity, teamName, teamCategory, teamRpa, new FindCallback<Player>() {
        @Override
        public void done(final List<Player> list, ParseException e) {
            final View playersView = activity.getLayoutInflater().inflate(R.layout.dialog_players, null, false);
            final ListView playersList = (ListView) playersView.findViewById(android.R.id.list);
            IconTextView redCardsView = (IconTextView) playersView.findViewById(R.id.red_cards);
            IconTextView yellowCardsView = (IconTextView) playersView.findViewById(R.id.yellow_cards);

            redCardsView.setTypeface(Iconify.getTypeface(activity));
            yellowCardsView.setTypeface(Iconify.getTypeface(activity));

            ParseObject.pinAllInBackground(list);
            activity.runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    playersList.setAdapter(new PlayerAdapter(activity, list));

                 final NiftyDialogBuilder playerDialog = NiftyDialogBuilder.getInstance(activity);
                    playerDialog.setCustomView(playersView, activity)
                            .withTitle(teamName)
                            .withMessage(null)
                            .withDuration(300)
                            .withEffect(Effectstype.Fadein)
                            .withDialogColor(activity.getResources().getColor(R.color.primary_dark))
                            .withTitleColor(activity.getResources().getColor(R.color.accent))
                            .withButton1Text(activity.getString(R.string.close))
                            .setButton1Click(new View.OnClickListener() {
                             @Override
                             public void onClick(View v) {
                              playerDialog.dismiss();
                             }
                            });
                 playerDialog.show();
                }
            });
        }
    });
}
 
开发者ID:adrielcafe,项目名称:RecifeBomDeBola,代码行数:40,代码来源:Util.java


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