Android 控件之ProgressBar进度条(3)

         button = (Button) findViewById(R.id.increase_secondary);
         button.setOnClickListener(new Button.OnClickListener() {
             public void onClick(View v) {
                 progressHorizontal.incrementSecondaryProgressBy(1);
                 // Title progress is in range 0..10000
                 setSecondaryProgress(100 * progressHorizontal.getSecondaryProgress());
             }
         });

         button = (Button) findViewById(R.id.decrease_secondary);
         button.setOnClickListener(new Button.OnClickListener() {
             public void onClick(View v) {
                 progressHorizontal.incrementSecondaryProgressBy(-1);
                 // Title progress is in range 0..10000
                 setSecondaryProgress(100 * progressHorizontal.getSecondaryProgress());
             }
         });
        
 }

}

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwzzzg.html