zoukankan      html  css  js  c++  java
  • 每日总结

    1.SeekBar(拖动条)

    布局省略

    重点是 private SeekBar sb_normal;

    private TextView txt_cur;

    private Context mContext;

    private void bindViews() {
            sb_normal = (SeekBar) findViewById(R.id.sb_normal);
            txt_cur = (TextView) findViewById(R.id.txt_cur);
            sb_normal.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
                @Override
                public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
                    txt_cur.setText("当前进度值:" + progress + "  / 100 ");
                }
    
                @Override
                public void onStartTrackingTouch(SeekBar seekBar) {
                    Toast.makeText(mContext, "触碰SeekBar", Toast.LENGTH_SHORT).show();
                }
    
                @Override
                public void onStopTrackingTouch(SeekBar seekBar) {
                    Toast.makeText(mContext, "放开SeekBar", Toast.LENGTH_SHORT).show();
                }
            });
        }
  • 相关阅读:
    git 常用命令
    centos 7 mini 安装
    python打印杨辉三角
    python 求100内的素数/质数
    字符串与bytes
    format
    Python字符串格式化
    数据结构
    ARM工作模式
    C语言实现字符串逆序输出
  • 原文地址:https://www.cnblogs.com/chenghaixiang/p/14908320.html
Copyright © 2011-2022 走看看