首页>代码>android 仿照 一键清理 式样>/SeekBarDemo/src/com/song/seekbardemo/MainActivity.java
package com.song.seekbardemo;

import android.os.Bundle;
import android.widget.SeekBar;
import android.widget.TextView;
import android.app.Activity;

public class MainActivity extends Activity implements SeekBar.OnSeekBarChangeListener{
	private SeekBar seekBar;
	private TextView textView1,textView2;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		
        seekBar = (SeekBar) this.findViewById(R.id.seekbar);
       textView1 = (TextView) this.findViewById(R.id.tv1);
       textView2 = (TextView) this.findViewById(R.id.tv2);
       seekBar.setOnSeekBarChangeListener(this);//添加事件监听
	}
	      //拖动中
	      @Override
	      public void onProgressChanged(SeekBar seekBar, int progress,
	              boolean fromUser) {
	          this.textView1.setText("当前值:"+progress+",共100");
	      }
	      //开始拖动
	      @Override
	      public void onStartTrackingTouch(SeekBar seekBar) {
	          this.textView2.setText("拖动中...");
	      }
	      //结束拖动
	      @Override
	      public void onStopTrackingTouch(SeekBar seekBar) {
	          this.textView2.setText("拖动完毕");
	      }
	  

	
}
最近下载更多
她是梦呀  LV1 2021年3月12日
wangshihua  LV19 2019年5月10日
还好好的不懂吧  LV1 2019年1月26日
pwpwpwpw5555  LV1 2017年8月11日
奋斗的蜗牛ing  LV1 2017年6月7日
hanzhiyuan  LV3 2017年2月15日
wf2216484127  LV1 2016年7月22日
jkcomkl  LV1 2016年7月6日
ybgybg  LV1 2016年6月28日
2557713223  LV2 2016年5月25日
最近浏览更多
121514713  LV2 2023年5月26日
139456  LV3 2021年5月31日
tomfish000  LV2 2021年5月31日
XcHyxa  LV7 2021年5月12日
她是梦呀  LV1 2021年3月12日
a566566  LV9 2020年12月29日
natism  LV9 2020年12月3日
bawe11  LV1 2020年6月17日
我超菜  LV2 2020年5月19日
可乐橙汁加冰  LV2 2020年5月16日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友