How do you change a Spinner's typeface?

by polyclefsoftware » Thu, 11 Jun 2009 00:45:39 GMT


Sponsored Links
 I want to apply a non-native font to widgets in my app. This is
working fine for TextViews and Buttons, which have a setTypeface
method. The code below works just great for my button:

Java:
Typeface face = Typeface.createFromAsset(getAssets(), "fonts/
my_font.ttf");
playButton = (Button) findViewById(R.id.play_button);
playButton.setTypeface(face);


But I just can't seem to figure out how to apply the font to a
Spinner. Any ideas?

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. best way to storage data on android

Hi,

I'm a newbie on Android dev. But I want to know what the best way to storage 
data on android....file or SQLite because...i want to save a list of 
restaurants with street address,  Lat and long, and pictures...and update it 
over internet....

Anybody has any reference to send me !?

Best regards
Igor Nesralla Ribeiro

-- 

2. RunTime Error

When i run my apps on emulator then some time it run perfect.But some
time it get unexpected error.

03-23 00:23:12.143: ERROR/dalvikvm-heap(332): 2437890-byte external
allocation too large for this process.
03-23 00:23:12.143: ERROR/GraphicsJNI(332): VM won't let us allocate
2437890 bytes
03-23 00:23:12.195: DEBUG/AndroidRuntime(332): Shutting down VM
03-23 00:23:12.195: WARN/dalvikvm(332): threadid=1: thread exiting
with uncaught exception (group=0x4001d800)
03-23 00:23:12.322: ERROR/AndroidRuntime(332): FATAL EXCEPTION: main
03-23 00:23:12.322: ERROR/AndroidRuntime(332):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.sai.s/com.sai.s.ors}: android.view.InflateException:
Binary XML file line #14: Error inflating class <unknown>
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2663)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.app.ActivityThread.startActivityNow(ActivityThread.java:2503)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.app.LocalActivityManager.moveToState(LocalActivityManager.java:
127)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.app.LocalActivityManager.startActivity(LocalActivityManager.java:
339)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.widget.TabHost
$IntentContentStrategy.getContentView(TabHost.java:651)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.widget.TabHost.setCurrentTab(TabHost.java:323)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:129)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:453)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.view.View.performClick(View.java:2408)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at android.view.View
$PerformClick.run(View.java:8816)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.os.Handler.handleCallback(Handler.java:587)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.os.Handler.dispatchMessage(Handler.java:92)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.os.Looper.loop(Looper.java:123)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
android.app.ActivityThread.main(ActivityThread.java:4627)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
java.lang.reflect.Method.invokeNative(Native Method)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
java.lang.reflect.Method.invoke(Method.java:521)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-23 00:23:12.322: ERROR/AndroidRuntime(332):     at
dalvik.system.NativeStart.main(Native Method)
03-23 00:23:12.322: ERROR/AndroidRuntime(332): Caused by:
android.view.InflateException: Binary XML file line #14: Error
inflating class <unknown>


SO PLEASE SUGGEST ME HOW TO REMOVE THIS ERROR.PLEASE

-- 

3. codec for .au

4. Problems accessing system properties in java.net.AddressCache

5. drawLine problem with Paint.StrokeWidth = 1

6. Amazon AppStore Release

7. networkID in WifiConfig