How to make gui elements like a button on each device look like native gui in android?

Hi, I have a question about gui android application.

when i run the project and choose 2.3.3 as my api version. I add some gui elements as a button and then run the code on device 4.0.3.

Now the problem: the button looks like a button 2.3.3, and not version 4.0.3.

Is there any way to change this?

+5
source share
2 answers

You should use one of the themes Holofor API level 11 +:

  • Create a folder res/values
  • Define the application theme as follows:

    <style name="AppTheme" parent="@android:style/Theme" />
    
  • Create folder res/values-v11

  • Define the application theme as follows:

    <style name="AppTheme" parent="@android:style/Theme.Holo.Light" />
    
  • Use AppThemeinAndroidManifest.xml

Holo, Android 2.x .

+6

Holo 2.3.3, . , .

+1

All Articles