apply color to Button

by Dilli » Fri, 13 Mar 2009 00:17:18 GMT


Sponsored Links
 Hi all,

I am developing a simple GUI with three buttons

i want to fill the button with color

but i found back ground color. if i set mybutton.setBackgroundcolor
(color);

it's not visible

how can i fill the button with color..

need help

Thank you

Dilli


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



apply color to Button

by Sundog » Fri, 13 Mar 2009 00:22:52 GMT


 Make sure the color you're sending has an alpha component.



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


Sponsored Links


apply color to Button

by dillirao malipeddi » Fri, 13 Mar 2009 12:18:34 GMT


 Thank you it works fine now..






-- 
Dilli Rao. M

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



Other Threads

1. about XMPP

Dear mates

I am trying to build a small XMPP client in android. Any ideas on what
library i can use?. I have tried using Smack API. I installed OpenFire (
xmpp server ) on my computer . Than I can connect OpenFire server
But i cannot login openfire server

       XMPPConnection connection = new XMPPConnection(connConfig);
        try {
            connection.connect();
            Log.i("XMPPClient", "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Connected to " +connection.getHost());
        }
        catch (XMPPException ex) {
            Log.e("XMPPClient", "[SettingsDialog] Failed to connect to " +
connection.getHost());
            xmppClient.setConnection(null);
        }
        try {
            Log.i("XMPPClient",
"-----------------------------------------------" );
            connection.login("de...@127.0.0.1", "demo1");
            Log.i("XMPPClient", "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Login USER " + connection.getUser());

i got a following errors:
--------------------------------------------------
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Connected to 10.0.2.2
I/XMPPClient(  219): -----------------------------------------------
E/dalvikvm(  219): Could not find class 'java.beans.PropertyDescriptor',
referenced from method
org.jivesoftware.smack.util.PacketParserUtils.parseWithIntrospection
W/dalvikvm(  219): VFY: unable to resolve new-instance 126
(Ljava/beans/PropertyDescriptor;) in
Lorg/jivesoftware/smack/util/PacketParserUtils;
W/dalvikvm(  219): VFY:  rejecting opcode 0x22 at 0x0016
W/dalvikvm(  219): VFY:  rejected
Lorg/jivesoftware/smack/util/PacketParserUtils;.parseWithIntrospection
(Ljava/lang/String;Ljava/lang/Class;Lorg/xmlpull/v1/XmlPullParser;)Ljava/lang/Object;
W/dalvikvm(  219): Verifier rejected class
Lorg/jivesoftware/smack/util/PacketParserUtils;
W/dalvikvm(  219): threadid=19: thread exiting with uncaught exception
(group=0x4001aa28)
E/AndroidRuntime(  219): Uncaught handler: thread Smack Packet Reader (0)
exiting due to uncaught exception
E/AndroidRuntime(  219): java.lang.VerifyError:
org.jivesoftware.smack.util.PacketParserUtils
E/AndroidRuntime(  219):     at
org.jivesoftware.smack.PacketReader.parseIQ(PacketReader.java:576)
E/AndroidRuntime(  219):     at
org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:275)
E/AndroidRuntime(  219):     at
org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)
E/AndroidRuntime(  219):     at
org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:76)

----------------------end error----------------------------

Help me please :)
Regards
Tsolmon

-- 

2. how to fix the runtimeexception:android.database.sqlite.SQLiteException: Unable to close due to unfinalised statements

Dear Alll,

        The log is as following, any suggestion will be grateful.

         Thanks,

Best Regards,
D.Y


E/XT9IME  (  218): onFinishInput()...no input view
I/ActivityManager(  140): Displayed activity
com.acer.android.musicer/.HistoryDetails: 332 ms (total 332 ms)
D/Activity(  492): SAVE_SNAPSHOT: Update snapshot
record[7](com.acer.android.musicer) done!
E/XT9IME  (  218): onFinishInput()...no input view
D/ViewFlipper(  492): updateRunning() mVisible=false, mStarted=false,
mUserPresent=true, mRunning=false
D/ViewFlipper(  492): updateRunning() mVisible=false, mStarted=false,
mUserPresent=true, mRunning=false
E/XT9IME  (  218): onFinishInput()...no input view
E/Database(  492): sqlite3_close(0x14d6b0) failed: 5
W/dalvikvm(  492): threadid=3: thread exiting with uncaught exception
(group=0x2aac6160)
E/AndroidRuntime(  492): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  492): java.lang.RuntimeException: Unable to destroy
activity
{com.acer.android.musicer/com.acer.android.musicer.HistoryActivity}:
android.database.sqlite.SQLiteException: Unable to close due to unfinalised
statements
E/AndroidRuntime(  492):     at
android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3468)
E/AndroidRuntime(  492):     at
android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3486)
E/AndroidRuntime(  492):     at
android.app.ActivityThread.access$2800(ActivityThread.java:119)
E/AndroidRuntime(  492):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1896)
E/AndroidRuntime(  492):     at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  492):     at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  492):     at
android.app.ActivityThread.main(ActivityThread.java:4362)
E/AndroidRuntime(  492):     at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(  492):     at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  492):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime(  492):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime(  492):     at dalvik.system.NativeStart.main(Native
Method)
E/AndroidRuntime(  492): Caused by: android.database.sqlite.SQLiteException:
Unable to close due to unfinalised statements
E/AndroidRuntime(  492):     at
android.database.sqlite.SQLiteDatabase.dbclose(Native Method)
E/AndroidRuntime(  492):     at
android.database.sqlite.SQLiteDatabase.onAllReferencesReleased(SQLiteDatabase.java:254)
E/AndroidRuntime(  492):     at
android.database.sqlite.SQLiteClosable.releaseReference(SQLiteClosable.java:42)
E/AndroidRuntime(  492):     at
android.database.sqlite.SQLiteProgram.onAllReferencesReleased(SQLiteProgram.java:67)
E/AndroidRuntime(  492):     at
android.database.sqlite.SQLiteClosable.releaseReference(SQLiteClosable.java:42)
E/AndroidRuntime(  492):     at
android.database.sqlite.SQLiteProgram.close(SQLiteProgram.java:221)
E/AndroidRuntime(  492):     at
android.database.sqlite.SQLiteQuery.close(SQLiteQuery.java:141)
E/AndroidRuntime(  492):     at
android.database.sqlite.SQLiteCursor.close(SQLiteCursor.java:507)
E/AndroidRuntime(  492):     at
android.app.Activity.onDestroy(Activity.java:1792)
E/AndroidRuntime(  492):     at
android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3455)
E/AndroidRuntime(  492):     ... 11 more
E/dalvikvm(  492): Unable to open stack trace file '/data/anr/traces.txt':
Permission denied

-- 

3. Use MediaRecorder for video without preview Surface

4. Android can't read wave files

5. Maintaining Aspect Ratio of Background Image

6. This is Why the Hummingbird Processor in the Samsung Galaxy S is Awesome

7. SOLD!WTS : EVO 4G 2nd *mint*