Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3631752
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:26:16+00:00 2026-05-19T00:26:16+00:00

How can I change the focus color (orange) on an EditText box? The focus

  • 0

How can I change the focus color (orange) on an EditText box?

The focus color is a small rim around the entire control and is bright
orange when the control has focus. How can I change the color of that
focus to a different color?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:26:16+00:00Added an answer on May 19, 2026 at 12:26 am

    You’ll have to create/modify your own NinePatch image to replace the default one, and use that as the background of your EditText. If you look in your SDK folder, under your platform, then res/drawable, you should find the NinePatch image for the EditText focus state. If that’s all you want to change, you can just pull it into Photoshop, or whatever image editing software you have, and change the orange color to a color of your choosing. Then save that into your drawable folder, and build a new StateListDrawable, for example something like the below:

    edittext_modified_states.xml

    <?xml version="1.0" encoding="utf-8"?>
    <selector 
        xmlns:android="http://schemas.android.com/apk/res/android"
        >
        <item 
            android:state_pressed="true"
            android:drawable="@android:drawable/edittext_pressed" 
            /> <!-- pressed -->    
        <item 
            android:state_focused="true"
            android:drawable="@drawable/edittext_focused_blue" 
            /> <!-- focused -->    
        <item 
            android:drawable="@android:drawable/edittext_normal" 
            /> <!-- default -->
    </selector>
    

    I don’t know offhand the actual names for the default NinePatches for the EditText, so replace those as necessary, but the key here is to just use the @android:drawable images for the ones you haven’t modified (or you can copy them over to your project’s drawable folder), and then use your modified drawable for your focused state.

    You can then set this StateListDrawable as the background for your TextView, like so:

    <TextView
        android:background="@drawable/edittext_modified_states"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how can I change the focus color/drawable in WebView via Java or XML, that
Can we change default yellow focus that will appear when ListView items end while
I wanna ask how i can change EditText border then it on focus. I
How i can change the color with gradient??? I have this now,but is different
I understand that I can change a sql table using the follow sp: EXEC
How I can change the individual region background color of viewport extjs 4. Here
How can I style WPF DataGrid to change the color of selected row when
today I wanted to change the border color of TextInput when user has a
Is it possible to easily change color of dotted focus rectangle for items (rows
I can change SQL at runtime. Can I do the same with LINQ ?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.