How can I specify a border color for an ImageView when it has focus

by Roy » Tue, 04 Aug 2009 23:15:00 GMT


Sponsored Links
 You can create a xml file under res/drawable. For example: res/
drawable/text_style.xml

Here is the content:
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android=" http://schemas.android.com/apk/res/android" ;>
        <item android:state_pressed="true" android:drawable="@drawable/
shape_2" />
        <item android:state_focused="true" android:state_enabled="true"
android:drawable="@drawable/shape_5" />
</selector>

Here is shape_2.xml
<shape xmlns:android=" http://schemas.android.com/apk/res/android" ;>
    <solid android:color="#FF0000FF"/>
    <stroke android:width="4dp" android:color="#FFFFFFFF"
            android:dashWidth="1dp" android:dashGap="2dp" />
    <padding android:left="7dp" android:top="7dp"
            android:right="7dp" android:bottom="7dp" />
    <corners android:radius="4dp" />
</shape>






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



Other Threads

1. Multi markers in MapActivity

Hello everyone,

After various research, I have not answered my question, then:

Is there a way to differentiate several markers in the same places in
a "MapActivity?

I placed markers at the same place but only the first reaction to an
event "OnTap."

I have seen solutions based on Javascript, but it seems that we can't
insert Javascript in MapActivity.

Thank you in advance for your help.
Cedric.

-- 

2. Maximum character that we can send to SMS application

Hi group

I facing one strange problem.

I am sending some text to SMS app as a body. But when the text size
increases more than 200 characters, it cuts the body from there. Only
first 200 characters are appearing in the SMS body. But I can write
more text when SMS gets launched :(

Is there any limitation while sending characters to SMS?
if yes then its ok
But if no then where i am doing wrong?

My code looks like :-

String txt = " characters .... more than 200 ";

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra("sms_body", txt);
intent.putExtra(Intent.EXTRA_TEXT, txt);
_activity.startActivity(Intent.createChooser(intent,
_activity.getText("text titte")));

Thanks,
Ajeet Singh

-- 

3. the process android.process.media has stopped unexpectedly

4. Importing a class from another project in Eclipse. Application fails to run with ClassNotFoundException

5. Basic IME help.

6. Midi Synthetizer

7. dev phone 2, 1.6 and bluetooth?