EditText appearance

by Mr.No » Tue, 10 Mar 2009 17:06:52 GMT


Sponsored Links
 Hello,
how do i change the size, style, typeface of a hint?
If the EditText gains the focus the border-color changes to orange,
how do i set a other color?

rgds
       Mr.No
--~--~---------~--~----~------------~-------~--~----~



EditText appearance

by Mr.No » Tue, 10 Mar 2009 18:31:04 GMT


 Hello,
how do i change the size, style, typeface of a hint?
If the EditText gains the focus the border-color changes to orange,
how do i set a other color?

rgds
       Mr.No
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


EditText appearance

by Tseng » Wed, 11 Mar 2009 19:42:09 GMT


 You could create a colorstate list (xml file in res/drawable), for
example
 http://developer.android.com/reference/android/content/res/ColorStateList.html 

Here is an example i used for textcolors. Should work for HintColors
too!

res/drawabale/myedittextcolors.xml:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android=" http://schemas.android.com/apk/res/android" ;>
    <item
        android:state_focused="true"
        android:state_pressed="false"
                android:color="@android:color/secondary_text_dark" />
    <item
        android:state_focused="true"
        android:state_pressed="true"
                android:color="@android:color/secondary_text_dark" />
    <item
        android:state_focused="false"
        android:state_pressed="true"
                android:color="@android:color/secondary_text_dark" />
    <item
        android:color="@android:color/secondary_text_dark" />
</selector>

Now you only have to assign it to your EditText widget.

Edit the XML and change

android:textColorHint="#FFFFFF"

to

android:textColorHint="@drawable/myedittextcolors"

and it should work. This is usefull if you want to have different
colors depending on the state of the edittext (i.e. if its focused,
clicked, etc).

For one color,
use android:textColorHint="#FFFFFF" or android:textColorHint="@color/
mycustomcolor" if you have defined your color in /res/values/
colors.xml









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



EditText appearance

by Mr.No » Thu, 12 Mar 2009 17:36:28 GMT


 thx a lot :)



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



EditText appearance

by Mr.No » Thu, 12 Mar 2009 18:06:37 GMT


 Can i assigne a colorstate list to the background?
And how do i change the bordercolor when the edittext gains the focus,
without placing a backgroundimage?

Tseng schrieb:

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



Other Threads

1. SQLiteDiskIOException happens when querying 4000 rows data with order by japanese kanji

This topic is moved from plateform.

Below is stack trace:

E/DatabaseUtils(  260): Writing exception to parcel
E/DatabaseUtils(  260): android.database.sqlite.SQLiteDiskIOException:
disk I/O error
E/DatabaseUtils(  260):         at
android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
E/DatabaseUtils(  260):         at
android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
E/DatabaseUtils(  260):         at
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)
E/DatabaseUtils(  260):         at
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)
E/DatabaseUtils(  260):         at
android.database.CursorToBulkCursorAdaptor.count(CursorToBulkCursorAdaptor.java:
132)
E/DatabaseUtils(  260):         at
android.database.BulkCursorNative.onTransact(BulkCursorNative.java:79)
E/DatabaseUtils(  260):         at android.os.Binder.execTransact(Binder.java:
287)
E/DatabaseUtils(  260):         at dalvik.system.NativeStart.run(Native
Method)
D/AndroidRuntime(  253): Shutting down VM
W/dalvikvm(  253): threadid=3: thread exiting with uncaught exception
(group=0x4001aa38)
E/AndroidRuntime(  253): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(  253):
android.database.sqlite.SQLiteDiskIOException: disk I/O error
E/AndroidRuntime(  253):        at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
141)
E/AndroidRuntime(  253):        at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
111)
E/AndroidRuntime(  253):        at
android.database.BulkCursorProxy.count(BulkCursorNative.java:255)
E/AndroidRuntime(  253):        at
android.database.BulkCursorToCursorAdaptor.set(BulkCursorToCursorAdaptor.java:
44)
E/AndroidRuntime(  253):        at
android.content.ContentProviderProxy.query(ContentProviderNative.java:
304)
E/AndroidRuntime(  253):        at
android.content.ContentResolver.query(ContentResolver.java:152)
E/AndroidRuntime(  253):        at com.mycompany.test.MainActivity
$1.onClick(MainActivity.java:39)
E/AndroidRuntime(  253):        at android.view.View.performClick(View.java:
2344)
E/AndroidRuntime(  253):        at android.view.View.onTouchEvent(View.java:
4133)
E/AndroidRuntime(  253):        at
android.widget.TextView.onTouchEvent(TextView.java:6504)
E/AndroidRuntime(  253):        at
android.view.View.dispatchTouchEvent(View.java:3672)
E/AndroidRuntime(  253):        at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime(  253):        at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime(  253):        at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime(  253):        at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
E/AndroidRuntime(  253):        at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1712)
E/AndroidRuntime(  253):        at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:
1202)
E/AndroidRuntime(  253):        at
android.app.Activity.dispatchTouchEvent(Activity.java:2018)
E/AndroidRuntime(  253):        at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1696)
E/AndroidRuntime(  253):        at
android.view.ViewRoot.handleMessage(ViewRoot.java:1658)
E/AndroidRuntime(  253):        at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  253):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  253):        at
android.app.ActivityThread.main(ActivityThread.java:4203)
E/AndroidRuntime(  253):        at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  253):        at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  253):        at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(  253):        at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
E/AndroidRuntime(  253):        at dalvik.system.NativeStart.main(Native
Method)

we are using such sql "select column1,column2 from table order by
kanji asc" to select 4000 rows data from our table and got above
error.

we did reproduce this error by executing above sql by command "adb
shell sqlite3".

If we select only one column, no error happens.

I guess android imposes size limit on sqlite3's cache or something
else.

I have two question:
1. Is this a android's bug?
2. How can we avoid it?

-- 

2. Flight information apk :)

Iya wol, biasanya gw pancing dulu, buka inbox baru buka astro trus send file

@jakontil
powered by snapdragontil




Sorry guys, baru diaplod skrg. Td rupanya jaringan enwan bengong :p

Hmm, blom ada apps ya yg bisa attach apk ke imel address yg kita mau di
enwan?
Kudu pake imel address default untuk ngirim kalo pake astro

_____
have you googled anything today?
------------------------------
*From: * Willy Gunawan <wol...@gmail.com>
*Date: *Wed, 10 Feb 2010 10:39:44 +0700
*To: *mi...@robot-ijo.com<mi...@robot-ijo.com>
*Subject: *

 --
"Indonesian Android Community [id-android]"

3. How can we know if Android is currently locked or not ?

4. Can i use ellipsize at alert List?

5. apa beda android sama RIM and Apple

6. what's the IP address of development computer when dev phone try to connect it

7. i want to control speed "ellipsize=marquee"