1

Is it possible to make an EditText in android 2.x that looks like an EditText from Android 4? I mean blue backlight with flanged edges below.

2 Answers 2

5

If you don't want to use an external library you can use the following code:

add the below code to res\values\styles.xml

<style name="HoloEditText">
    <item name="android:background">@drawable/edit_text_holo_dark</item>
</style>

After that from YOURPATH\android-sdk\platforms\android-16\data\res\ just copy the edit_text_holo_dark.xml and all referenced drawables to the corresponding directories in your project.

And then simply apply the style to your EditText:

 <EditText
   android:id="@+id/editText"
   style="@style/HoloEditText"
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"/>
4
  • how can i do the same for seek bar. because in android-16. It is showing seek_thumb as only drawable, which is not giving required result.
    – test
    Aug 26, 2013 at 7:03
  • 1
    Check the "Widget.Holo.Light.SeekBar" lines in the "/res/values/styles.xml" file. Copy that six lines and the two referenced scrubber-drawables as well. This should work.
    – reVerse
    Aug 26, 2013 at 19:58
  • and 1 more question can i change the color of seek bar to green..??
    – test
    Aug 27, 2013 at 5:57
  • 1
    Of course just check this site android-holo-colors.com and copy every file from the zip-archive to your project. Actually this is even easier than the "way" I suggested before. ;]
    – reVerse
    Aug 27, 2013 at 8:40
3

Yes there is a library called holoeverywhere, you'll get all 4.2 components in 2.1+:

https://github.com/ChristopheVersieux/HoloEverywhere

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.