SeekBar 拖动条
来源:互联网 发布:提额神器软件 编辑:程序博客网 时间:2024/06/05 06:09
转载请注明出处:http://blog.csdn.net/mr_leixiansheng/article/details/64125076
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <SeekBar android:id="@+id/seek_bar" android:progress="50" android:max="100" android:layout_width="match_parent" android:layout_height="wrap_content" /> <TextView android:id="@+id/tv1" android:layout_width="match_parent" android:layout_height="wrap_content" /> <TextView android:id="@+id/tv2" android:layout_width="match_parent" android:layout_height="wrap_content" /></LinearLayout>
package com.example.leixiansheng.myseekbar;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.widget.SeekBar;import android.widget.TextView;public class MainActivity extends AppCompatActivity implements SeekBar.OnSeekBarChangeListener{ private SeekBar seekBar; private TextView textView_1; private TextView textView_2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); seekBar = (SeekBar) findViewById(R.id.seek_bar); textView_1 = (TextView) findViewById(R.id.tv1); textView_2 = (TextView) findViewById(R.id.tv2); seekBar.setOnSeekBarChangeListener(this); } @Override public void onProgressChanged(SeekBar seekBar, int i, boolean b) { textView_1.setText("正在拖动"); textView_2.setText("当前值是:" + i); } @Override public void onStartTrackingTouch(SeekBar seekBar) { textView_1.setText("开始拖动"); } @Override public void onStopTrackingTouch(SeekBar seekBar) { textView_1.setText("停止拖动"); }}
0 0
- 拖动条(SeekBar)
- [控件]SeekBar拖动条
- android 拖动条 SeekBar
- Android SeekBar拖动条
- android 拖动条(SeekBar)
- android SeekBar 拖动条
- 拖动条(seekbar)
- 拖动条SeekBar
- SeekBar拖动条控件
- seekbar拖动条
- Android:拖动条SeekBar
- 拖动条SeekBar
- 拖动条 SeekBar 实例
- Android SeekBar拖动条
- SeekBar 拖动条
- SeekBar拖动条
- Android SeekBar(拖动条)
- SeekBar(拖动条)
- 凯撒密码
- 我也来到这里了
- iOS开发笔记--添加cell动画
- mapreduce系列(6)---倒排索引的建立
- 初来乍到
- SeekBar 拖动条
- [转载]ORA-00942 表或视图不存在 问题的解决
- webstorm js中文乱码
- Java排序总结
- mysql 格式化日期
- zabbix_配置
- MySQL索引原理
- 容器学习list
- 嵌入式软件异步编程:同步转为异步