react-native picker using android styles.xml for change font-family not changedCan't Find Theme.AppCompat.Light for New Android ActionBar SupportChange package name for Android in React NativeExternal .ttf font in a React Native app for Android?React-Native picker - change font sizeReact Native Custom font Picker (Android)Add custom font family in React Native iOSFontFamily not working in Android Device in React-NativeTextInput font family doesn't work in React Native AndroidERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font React-native, Androidreact-native,react-native webview font-family, webview font-family
What was the deeper meaning of Hermione wanting the cloak?
Cemented carbide swords - worth it?
I feel like most of my characters are the same, what can I do?
How was ownership of property managed during the Black Death, when so many original owners had died?
How often is duct tape used during crewed space missions?
What's the purpose of autocorrelation?
Prove that the area of the trangles are equal.
Integrability of log of distance function
Simulate a 1D Game-of-Life-ish Model
Why is it called a Blood Knot?
Can I separate garlic into cloves for storage?
Intuitive methods for representation of Cartesian Coordinates in terms of Spherical Coordinates as basis
Can さくじつ and きのう be used the same way?
Manager manipulates my leaves, what's in it for him?
Why can't we use uninitialized local variable to access static content of its type?
What are the end bytes of *.docx file format
Is there a connection between IT and Ghostbusters?
How is underwater propagation of sound possible?
Madrid to London w/ Expired 90/180 days stay as US citizen
Why do things cool down?
Why are Fuji lenses more expensive than others?
siunitx redefines macros in pdf bookmarks
Are lay articles good enough to be the main source of information for PhD research?
Paradox regarding phase transitions in relativistic systems
react-native picker using android styles.xml for change font-family not changed
Can't Find Theme.AppCompat.Light for New Android ActionBar SupportChange package name for Android in React NativeExternal .ttf font in a React Native app for Android?React-Native picker - change font sizeReact Native Custom font Picker (Android)Add custom font family in React Native iOSFontFamily not working in Android Device in React-NativeTextInput font family doesn't work in React Native AndroidERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font React-native, Androidreact-native,react-native webview font-family, webview font-family
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
i want style font-size and font-family on react-native picker. i already set custom my style on native android. but after my build apk again not change it's still same font.
my code on style.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:spinnerItemStyle">@style/SpinnerItem</item>
</style>
<style name="SpinnerItem" parent="Theme.AppCompat.Light.NoActionBar">>
<item name="android:fontFamily">CenturyGothicBold</item>
<item name="android:textSize">16dp</item>
</style>
</resources>
Already set add new font on asset with react-native link
My result
android react-native react-native-android
add a comment
|
i want style font-size and font-family on react-native picker. i already set custom my style on native android. but after my build apk again not change it's still same font.
my code on style.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:spinnerItemStyle">@style/SpinnerItem</item>
</style>
<style name="SpinnerItem" parent="Theme.AppCompat.Light.NoActionBar">>
<item name="android:fontFamily">CenturyGothicBold</item>
<item name="android:textSize">16dp</item>
</style>
</resources>
Already set add new font on asset with react-native link
My result
android react-native react-native-android
Did you ever find a solution to this?
– inga
Jul 24 '18 at 17:21
add a comment
|
i want style font-size and font-family on react-native picker. i already set custom my style on native android. but after my build apk again not change it's still same font.
my code on style.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:spinnerItemStyle">@style/SpinnerItem</item>
</style>
<style name="SpinnerItem" parent="Theme.AppCompat.Light.NoActionBar">>
<item name="android:fontFamily">CenturyGothicBold</item>
<item name="android:textSize">16dp</item>
</style>
</resources>
Already set add new font on asset with react-native link
My result
android react-native react-native-android
i want style font-size and font-family on react-native picker. i already set custom my style on native android. but after my build apk again not change it's still same font.
my code on style.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:spinnerItemStyle">@style/SpinnerItem</item>
</style>
<style name="SpinnerItem" parent="Theme.AppCompat.Light.NoActionBar">>
<item name="android:fontFamily">CenturyGothicBold</item>
<item name="android:textSize">16dp</item>
</style>
</resources>
Already set add new font on asset with react-native link
My result
android react-native react-native-android
android react-native react-native-android
asked Oct 11 '17 at 3:15
Adzanny AkbarAdzanny Akbar
391 silver badge6 bronze badges
391 silver badge6 bronze badges
Did you ever find a solution to this?
– inga
Jul 24 '18 at 17:21
add a comment
|
Did you ever find a solution to this?
– inga
Jul 24 '18 at 17:21
Did you ever find a solution to this?
– inga
Jul 24 '18 at 17:21
Did you ever find a solution to this?
– inga
Jul 24 '18 at 17:21
add a comment
|
1 Answer
1
active
oldest
votes
Try below code :
TextView tx = (TextView)findViewById(R.id.textview1);
Typeface custom_font = Typeface.createFromAsset(getAssets(), "fonts/CenturyGothicBold.ttf");
tx.setTypeface(custom_font);
Or
AssetManager am = context.getApplicationContext().getAssets();
typeface = Typeface.createFromAsset(am,
String.format(Locale.US, "fonts/%s", "CenturyGothicBold.ttf"));
setTypeface(typeface);
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46679206%2freact-native-picker-using-android-styles-xml-for-change-font-family-not-changed%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try below code :
TextView tx = (TextView)findViewById(R.id.textview1);
Typeface custom_font = Typeface.createFromAsset(getAssets(), "fonts/CenturyGothicBold.ttf");
tx.setTypeface(custom_font);
Or
AssetManager am = context.getApplicationContext().getAssets();
typeface = Typeface.createFromAsset(am,
String.format(Locale.US, "fonts/%s", "CenturyGothicBold.ttf"));
setTypeface(typeface);
add a comment
|
Try below code :
TextView tx = (TextView)findViewById(R.id.textview1);
Typeface custom_font = Typeface.createFromAsset(getAssets(), "fonts/CenturyGothicBold.ttf");
tx.setTypeface(custom_font);
Or
AssetManager am = context.getApplicationContext().getAssets();
typeface = Typeface.createFromAsset(am,
String.format(Locale.US, "fonts/%s", "CenturyGothicBold.ttf"));
setTypeface(typeface);
add a comment
|
Try below code :
TextView tx = (TextView)findViewById(R.id.textview1);
Typeface custom_font = Typeface.createFromAsset(getAssets(), "fonts/CenturyGothicBold.ttf");
tx.setTypeface(custom_font);
Or
AssetManager am = context.getApplicationContext().getAssets();
typeface = Typeface.createFromAsset(am,
String.format(Locale.US, "fonts/%s", "CenturyGothicBold.ttf"));
setTypeface(typeface);
Try below code :
TextView tx = (TextView)findViewById(R.id.textview1);
Typeface custom_font = Typeface.createFromAsset(getAssets(), "fonts/CenturyGothicBold.ttf");
tx.setTypeface(custom_font);
Or
AssetManager am = context.getApplicationContext().getAssets();
typeface = Typeface.createFromAsset(am,
String.format(Locale.US, "fonts/%s", "CenturyGothicBold.ttf"));
setTypeface(typeface);
TextView tx = (TextView)findViewById(R.id.textview1);
Typeface custom_font = Typeface.createFromAsset(getAssets(), "fonts/CenturyGothicBold.ttf");
tx.setTypeface(custom_font);
TextView tx = (TextView)findViewById(R.id.textview1);
Typeface custom_font = Typeface.createFromAsset(getAssets(), "fonts/CenturyGothicBold.ttf");
tx.setTypeface(custom_font);
AssetManager am = context.getApplicationContext().getAssets();
typeface = Typeface.createFromAsset(am,
String.format(Locale.US, "fonts/%s", "CenturyGothicBold.ttf"));
setTypeface(typeface);
AssetManager am = context.getApplicationContext().getAssets();
typeface = Typeface.createFromAsset(am,
String.format(Locale.US, "fonts/%s", "CenturyGothicBold.ttf"));
setTypeface(typeface);
answered Mar 28 at 14:13
Sushant PatilSushant Patil
213 bronze badges
213 bronze badges
add a comment
|
add a comment
|
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46679206%2freact-native-picker-using-android-styles-xml-for-change-font-family-not-changed%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you ever find a solution to this?
– inga
Jul 24 '18 at 17:21