Android programming ProgressBar Custom Style animation mode implementation Method _android

Source: Internet
Author: User

The example of this article describes the implementation of the animation mode of the Android programming ProgressBar custom style. Share to everyone for your reference, specific as follows:

Forget where to see the man wrote, is through the animation effect to achieve, now by the way also write out, I hope that the man don't take offense.

Effect:

As before, in the layout file:

<progressbar 
  android:id= "@+id/progressbar3" 
  android:layout_width= "wrap_content" 
  android:layout_ height= "Wrap_content" 
  android:indeterminate= "false" 
  

Then build a Anim folder under values and put the progressbar_bar_loading file in:

 <?xml version= "1.0" encoding= "UTF-8"?> <animation-list "xmlns:android=" /schemas.android.com/apk/res/android "android:oneshot=" false "> <item android:duration="-"-" Android: drawable= "@drawable/progress_bar_loading_01"/> <item android:duration= "android:drawable=" @drawabl E/progress_bar_loading_02 "/> <item android:duration=" "android:drawable=" @drawable/progress_bar_loa 
  Ding_03 "/> <item android:duration=" android:drawable= "@drawable/progress_bar_loading_04"/> <item android:duration= "android:drawable=" "@drawable/progress_bar_loading_05"/> <item Andr  
    oid:duration= "android:drawable=" "@drawable/progress_bar_loading_06"/> <item android:duration= "250" android:drawable= "@drawable/progress_bar_loading_07"/> </animation-list> 

Those are all a picture, just like replacing a picture.

I hope this article will help you with the Android program.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.