Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method ‘setFontIconSize’ can‘t work when I put my iconresource in drawable and import it by using R.drawable.xxx #133

Open
xiaoxiaoci opened this issue Dec 29, 2019 · 1 comment

Comments

@xiaoxiaoci
Copy link

xiaoxiaoci commented Dec 29, 2019

but it works in settings below
FancyButton foursquareBtn = new FancyButton(this); foursquareBtn.setText("Check in"); foursquareBtn.setBackgroundColor(Color.parseColor("#0072b1")); foursquareBtn.setFocusBackgroundColor(Color.parseColor("#228fcb")); foursquareBtn.setTextSize(17); foursquareBtn.setRadius(5); foursquareBtn.setIconResource("\uf180"); foursquareBtn.setIconPosition(FancyButton.POSITION_TOP); foursquareBtn.setFontIconSize(60);
how can I import myself iconresource in a way like "\uf180"

@Ad9an
Copy link

Ad9an commented Nov 7, 2021

//It's too late but it's for those people who still using fancybutton in 2021.

Typeface face = Typeface.createFromAsset(context.getAssets(), "font/BLKCHCRY.TTF"); //geting font from "assets/font" folder
fancybutton.getTextViewObject().setTypeface(face);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants