• 大小: 140KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-14
  • 语言: Java
  • 标签:

资源简介

CircularSeekBar用于Android的定制圆形SeekBar(圆形,半圆形和椭圆形)

资源截图

代码片段和文件信息

package me.tankery.app.circularseekbar;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.util.Log;
import android.widget.TextView;

import me.tankery.lib.circularseekbar.CircularSeekBar;


public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        final TextView textEvent = findTheViewById(R.id.text_event);
        final TextView textProgress = findTheViewById(R.id.text_progress);

        CircularSeekBar seekBar = (CircularSeekBar) findViewById(R.id.seek_bar);
        seekBar.setOnSeekBarChangeListener(new CircularSeekBar.OnCircularSeekBarChangeListener() {
            @Override
            public void onProgressChanged(CircularSeekBar circularSeekBar float progress boolean fromUser) {
                String message = String.format(“Progress changed to %.2f fromUser %s“ progress fromUser);
                Log.d(“Main“ message);
                textProgress.setText(message);
            }

            @Override
            public void onstopTrackingTouch(CircularSeekBar seekBar) {
                Log.d(“Main“ “onstopTrackingTouch“);
                textEvent.setText(““);
            }

            @Override
            public void onstartTrackingTouch(CircularSeekBar seekBar) {
                Log.d(“Main“ “onstartTrackingTouch“);
                textEvent.setText(“touched | “);
            }
        });
    }

    @SuppressWarnings(“unchecked“)
    private  T findTheViewById(@IdRes int id) {
        return (T) super.findViewById(id);
    }

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\
     文件         538  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\.gitignore
     文件         985  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\.travis.yml
     文件       10273  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\LICENSE
     文件        2619  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\README.md
     文件         521  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\RELEASING.md
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\
     文件           7  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\.gitignore
     文件        1141  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\build.gradle
     文件         661  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\proguard-rules.pro
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\
     文件         726  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\AndroidManifest.xml
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\java\
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\java\me\
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\java\me\tankery\
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\java\me\tankery\app\
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\java\me\tankery\app\circularseekbar\
     文件        1701  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\java\me\tankery\app\circularseekbar\MainActivity.java
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\layout\
     文件        7205  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\layout\activity_main.xml
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\mipmap-hdpi\
     文件        3418  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\mipmap-hdpi\ic_launcher.png
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\mipmap-mdpi\
     文件        2206  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\mipmap-mdpi\ic_launcher.png
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\mipmap-xhdpi\
     文件        4842  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\mipmap-xhdpi\ic_launcher.png
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\mipmap-xxhdpi\
     文件        7718  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\mipmap-xxhdpi\ic_launcher.png
     目录           0  2019-05-17 02:38  tankery-CircularSeekBar-c03c551\app\src\main\res\values-w820dp\
............此处省略32个文件信息

评论

共有 条评论