Is it possible to make an EditText in android 2.x that looks like an EditText from Android 4?

后端 未结 2 483
鱼传尺愫
鱼传尺愫 2021-01-23 09:53

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条回答
  •  难免孤独
    2021-01-23 10:51

    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

    
    

    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:

     
    

提交回复
热议问题