Custom progrebar. Here, the progrebar (small) is used as an example to display the holo style in the 2.x system.
1) Find the System File styles. xml and themes. xml.
Find styles. xml and themes. XML in the directory ADT-bundle \ SDK \ platforms \ Android-19 \ data \ res \ values and open them with uedit;
2) Search for the Control name progrebar in styles. xml and find
"<Style name =" widget. holo. progressbar. Small "parent =" widget. progressbar. Small ">
<Item name = "Android: indeterminatedrawable"> @ Android: drawable/progress_small_holo </item>
</Style> ", where @ Android: drawable/progress_small_holo is an attribute;
3) Copy progress_small_holo and search "progress_small_holo" in the folder ADT-bundle \ SDK \ platforms \ Android-19 \ data \ res \ values \ drawable ",
Find the corresponding XML file and copy it to the drawable folder under Res of our own project (this folder should be created by yourself)
Note: If the property value is? Start with themes. XML, and repeat Step 3.
The content of the XML file is as follows:
<Layer-list xmlns: Android = "http://schemas.android.com/apk/res/android">
<Item>
<Rotate
Android: drawable = "@ drawable/spinner_16_outer_holo"
Android: Required Tx = "50%"
Android: Ty = "50%"
Android: fromdegrees = "0"
Android: todegrees = "1080"/>
</Item>
<Item>
<Rotate
Android: drawable = "@ drawable/spinner_16_inner_holo"
Android: Required Tx = "50%"
Android: Ty = "50%"
Android: fromdegrees = "720"
Android: todegrees = "0"/>
</Item>
</Layer-List>
4) modification error. Because the copied progress_small_holo contains an image, which must be copied to your project.
Search for image name spinner_16_outer_holo in adt-bundle-windows-x86-20130917 \ SDK \ platforms \ Android-18 \ data \ res \ drawable-hdpi,
And copy it to the drawable-hdpi folder in your project;
4) modify the control properties. Pull a smbar (small) control, set it to preview in 2. x system, and add
Android: indeterminatedrawable = "@ drawable/progress_small_holo ".