Java 类android.support.v7.widget.AppCompatSeekBar 实例源码

项目:android-geohash    文件:ConverterFragment.java   
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    editGeohash = (AppCompatEditText) view.findViewById(R.id.edit_hash);
    editLat = (AppCompatEditText) view.findViewById(R.id.edit_lat);
    editLon = (AppCompatEditText) view.findViewById(R.id.edit_lon);
    textPrecision = (AppCompatTextView) view.findViewById(R.id.text_precision);
    seekPrecision = (AppCompatSeekBar) view.findViewById(R.id.seek_precision);

    editGeohash.addTextChangedListener(hashTextWatcher);
    editLat.addTextChangedListener(locationTextWatcher);
    editLon.addTextChangedListener(locationTextWatcher);
    seekPrecision.setOnSeekBarChangeListener(this);

    location = new Location("geohash_example");
    textPrecision.setText("Precision: " + 1);
}
项目:MovieGuide    文件:DiscoverFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.fragment_discover, container, false);

    moviesRadioButton = (RadioButton) view.findViewById(R.id.radio_movies);
    moviesRadioButton.setOnCheckedChangeListener(this);
    tvRadioButton = (RadioButton) view.findViewById(R.id.radio_tv);
    TextView discoverButton = (TextView) view.findViewById(R.id.discover_discover);
    discoverButton.setOnClickListener(this);
    LinearLayout genres = (LinearLayout) view.findViewById(R.id.genres_root);
    genres.setOnClickListener(this);
    genresView = (TextView) view.findViewById(R.id.discover_genres);
    Spinner sortSpinner = (Spinner) view.findViewById(R.id.discover_sort);
    ratingView = (TextView) view.findViewById(R.id.discover_rating);
    AppCompatSeekBar ratingSeekBar = (AppCompatSeekBar) view.findViewById(R.id.discover_rating_bar);

    mGenresList = new HashSet<>();
    mGenresValuesList = new HashSet<>();
    checkedGenres = new boolean[] {
            false, false, false, false, false, false, false, false, false,
            false, false, false, false, false, false, false, false, false, false
    };
    ratingSeekBar.setOnSeekBarChangeListener(this);

    final List<String> sort = Arrays.asList(getResources().getStringArray(R.array.sort));
    ArrayAdapter<String> adapter
            = new ArrayAdapter<>(getActivity(), R.layout.spinner_item, sort);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    sortSpinner.setAdapter(adapter);
    sortSpinner.setOnItemSelectedListener(this);

    return view;
}
项目:ListVideoViewBaseOnVitamio    文件:MediaControllerView.java   
public void init() {
    inflate(getContext(), R.layout.media_controller_layout, this);
    ibtPlayOrPause = (ImageButton) findViewById(R.id.ibt_play_pause);
    seekBarVideo = (AppCompatSeekBar) findViewById(R.id.seek_media_player);
    tvTime = (TextView) findViewById(R.id.tv_time);

    addListener();
}
项目:MaterialPreferences    文件:MaterialSeekBarPreference.java   
@Override
protected void onViewCreated() {
    value = (TextView) findViewById(R.id.mp_value);
    if (showValue) {
        value.setVisibility(VISIBLE);
    }

    seekBar = (AppCompatSeekBar) findViewById(R.id.mp_seekbar);
    seekBar.setOnSeekBarChangeListener(new ProgressSaver());
    seekBar.setMax(maxValue - minValue);
    setSeekBarValue(getValue());
}
项目:MovieGuide    文件:DiscoverFragment.java   
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.fragment_discover, container, false);

    moviesRadioButton = (RadioButton) view.findViewById(R.id.radio_movies);
    moviesRadioButton.setOnCheckedChangeListener(this);
    tvRadioButton = (RadioButton) view.findViewById(R.id.radio_tv);
    TextView discoverButton = (TextView) view.findViewById(R.id.discover_discover);
    discoverButton.setOnClickListener(this);
    LinearLayout genres = (LinearLayout) view.findViewById(R.id.genres_root);
    genres.setOnClickListener(this);
    genresView = (TextView) view.findViewById(R.id.discover_genres);
    Spinner sortSpinner = (Spinner) view.findViewById(R.id.discover_sort);
    ratingView = (TextView) view.findViewById(R.id.discover_rating);
    AppCompatSeekBar ratingSeekBar = (AppCompatSeekBar) view.findViewById(R.id.discover_rating_bar);

    mGenresList = new HashSet<>();
    mGenresValuesList = new HashSet<>();
    checkedGenres = new boolean[] {
            false, false, false, false, false, false, false, false, false,
            false, false, false, false, false, false, false, false, false, false
    };
    ratingSeekBar.setOnSeekBarChangeListener(this);

    final List<String> sort = Arrays.asList(getResources().getStringArray(R.array.sort));
    ArrayAdapter<String> adapter
            = new ArrayAdapter<>(getActivity(), R.layout.spinner_item, sort);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    sortSpinner.setAdapter(adapter);
    sortSpinner.setOnItemSelectedListener(this);

    return view;
}
项目:PercentSmoothHandler    文件:MainActivity.java   
private void assignViews() {
    smoothPb = (SmoothProgressBar) findViewById(R.id.smooth_pb);
    increaseDurationSmoothSb = (AppCompatSeekBar) findViewById(R.id.increase_duration_smooth_sb);
    increaseDurationSmoothBtn = (AppCompatButton) findViewById(R.id.increase_duration_smooth_btn);
    increaseSmoothlyBtn = (AppCompatButton) findViewById(R.id.increase_smoothly_btn);
    increaseNormalBtn = (AppCompatButton) findViewById(R.id.increase_normal_btn);
    resetBtn = (AppCompatButton) findViewById(R.id.reset_btn);
}
项目:DilatingDotsProgressBar    文件:MainActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    toolbar.setTitle(DilatingDotsProgressBar.class.getSimpleName());
    setSupportActionBar(toolbar);

    mDilatingDotsProgressBar = (DilatingDotsProgressBar) findViewById(R.id.progress);
    mDilatingDotsProgressBar.show(500);

    mNumberDotsSeekbar = (AppCompatSeekBar) findViewById(R.id.seekbar_number_dots);
    mRadiusSeekbar = (AppCompatSeekBar) findViewById(R.id.seekbar_radius);
    mSpacingSeekbar = (AppCompatSeekBar) findViewById(R.id.seekbar_spacing);
    mAnimationDurationSeekbar = (AppCompatSeekBar) findViewById(R.id.seekbar_animation_duration);
    mColorSeekbar = (AppCompatSeekBar) findViewById(R.id.seekbar_color);
    mColor2Seekbar = (AppCompatSeekBar) findViewById(R.id.seekbar_color_2);
    mScaleMultiplierSeekbar = (AppCompatSeekBar) findViewById(R.id.seekbar_scale_multiplier);

    mNumDotsTextView = (TextView) findViewById(R.id.textview_num_dots);
    mScaleMultiplierTextView = (TextView) findViewById(R.id.textview_scale_multiplier);
    mAnimationDurationTextView = (TextView) findViewById(R.id.textview_animation_duration);
    mColorTextView = (TextView) findViewById(R.id.textview_color);
    mColor2TextView = (TextView) findViewById(R.id.textview_color_2);
    mRadiusTextView = (TextView) findViewById(R.id.textview_radius);
    mSpacingTextView = (TextView) findViewById(R.id.textview_spacing);
}
项目:GaussianBlur    文件:MainActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
    ViewPager viewPager = (ViewPager) findViewById(R.id.pager);

    viewPager.setAdapter(new DinosaurPagerAdapter(getSupportFragmentManager(), this));
    ((TabLayout) findViewById(R.id.tabs)).setupWithViewPager(viewPager);

    sbRadius = (AppCompatSeekBar) findViewById(R.id.radius);
    sbSize = (AppCompatSeekBar) findViewById(R.id.size);

    sbRadius.setTag(R.id.label, findViewById(R.id.radius_label));
    sbSize.setTag(R.id.label, findViewById(R.id.size_label));

    sbRadius.setTag(R.id.label_title, R.string.radius);
    sbSize.setTag(R.id.label_title, R.string.size);

    sbRadius.setOnSeekBarChangeListener(this);
    sbSize.setOnSeekBarChangeListener(this);


    sbSize.setMax(GaussianBlur.MAX_RADIUS);
    sbSize.setMax(GaussianBlur.MAX_SIZE);
    sbRadius.setProgress(GaussianBlur.MAX_RADIUS);
    sbSize.setProgress(GaussianBlur.MAX_SIZE);
}
项目:CodeColors    文件:AppCompatDefStyleHandler.java   
@SuppressLint({"PrivateResource", "InlinedApi"})
@Override
protected int getDefaultViewDefStyleAttr(View view) {
    if (view instanceof AppCompatRadioButton) {
        return R.attr.radioButtonStyle;
    } else if (view instanceof AppCompatCheckBox) {
        return R.attr.checkboxStyle;
    } else if (view instanceof AppCompatButton) {
        return R.attr.buttonStyle;
    } else if (view instanceof AppCompatMultiAutoCompleteTextView) {
        return R.attr.autoCompleteTextViewStyle;
    } else if (view instanceof AppCompatAutoCompleteTextView) {
        return R.attr.autoCompleteTextViewStyle;
    } else if (view instanceof AppCompatEditText) {
        return R.attr.editTextStyle;
    } else if (view instanceof AppCompatCheckedTextView) {
        return Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 ?
                android.R.attr.checkedTextViewStyle : 0;
    } else if (view instanceof AppCompatTextView) {
        return android.R.attr.textViewStyle;
    } else if (view instanceof AppCompatSpinner) {
        return R.attr.spinnerStyle;
    } else if (view instanceof AppCompatImageButton) {
        return R.attr.imageButtonStyle;
    } else if (view instanceof AppCompatRatingBar) {
        return R.attr.ratingBarStyle;
    } else if (view instanceof AppCompatSeekBar) {
        return R.attr.seekBarStyle;
    } else {
        return super.getDefaultViewDefStyleAttr(view);
    }
}
项目:FRC-Krawler    文件:SliderMetricWidget.java   
@Override
public void initViews() {
    inflater.inflate(R.layout.widget_metric_slider, this);
    seekBar = (AppCompatSeekBar) findViewById(R.id.sliderVal);
    valueText = (TextView) findViewById(R.id.value);
    nameText = ((TextView) findViewById(R.id.name));
    minText = ((TextView) findViewById(R.id.min));
    maxText = ((TextView) findViewById(R.id.max));

    RxSeekBar.userChanges(seekBar).subscribeOn(AndroidSchedulers.mainThread()).subscribe(seekValue -> {
        value = seekValue + min;
        valueText.setText(Integer.toString(value));
    });
}
项目:GitHub    文件:PerformanceTestActivity.java   
private void assignViews() {
    ioPerformanceSb = (AppCompatSeekBar) findViewById(R.id.io_performance_sb);
    scrollView = (ScrollView) findViewById(R.id.scrollView);
    infoTv = (TextView) findViewById(R.id.info_tv);
}
项目:FileDownloader-master    文件:PerformanceTestActivity.java   
private void assignViews() {
    ioPerformanceSb = (AppCompatSeekBar) findViewById(R.id.io_performance_sb);
    scrollView = (ScrollView) findViewById(R.id.scrollView);
    infoTv = (TextView) findViewById(R.id.info_tv);
}
项目:qiscus-sdk-android    文件:QiscusBaseAudioMessageViewHolder.java   
@NonNull
protected abstract AppCompatSeekBar getSeekBar(View itemView);
项目:qiscus-sdk-android    文件:QiscusAudioViewHolder.java   
@NonNull
@Override
protected AppCompatSeekBar getSeekBar(View itemView) {
    return (AppCompatSeekBar) itemView.findViewById(R.id.seekbar);
}
项目:euphoria-vk-client    文件:ProgressBarPreference.java   
public ProgressBarPreference(Context context) {
    super(context);

    seekBar = new AppCompatSeekBar(context);
    RefreshManager.registerForChangePreferences(this, SettingsFragment.KEY_BLUR_RADIUS);
}
项目:euphoria-vk-client    文件:ProgressBarPreference.java   
public AppCompatSeekBar getSeekBar() {
    return seekBar;
}
项目:Autographa-Go    文件:SettingsActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    getTheme().applyStyle(SharedPrefs.getFontSize().getResId(), true);
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_settings);

    UtilFunctions.applyReadingMode();

    if (android.os.Build.VERSION.SDK_INT > 9)
    {
        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);
    }

    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white);
    toolbar.setContentInsetStartWithNavigation(0);
    setSupportActionBar(toolbar);

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setDisplayShowHomeEnabled(true);
    getSupportActionBar().setDisplayShowTitleEnabled(true);

    mTvDownload = (TextView) findViewById(R.id.download_bible);
    mProgressBar = (ProgressBar) findViewById(R.id.progress_bar);
    mDayMode = (ImageView) findViewById(R.id.iv_day_mode);
    mNightMode = (ImageView) findViewById(R.id.iv_night_mode);
    mInflateLayout = (LinearLayout) findViewById(R.id.inflate_layout);
    mSeekBarTextSize = (AppCompatSeekBar) findViewById(R.id.seekbar_text_size);

    findViewById(R.id.open_hints).setOnClickListener(this);
    mTvDownload.setOnClickListener(this);
    mDayMode.setOnClickListener(this);
    mNightMode.setOnClickListener(this);
    findViewById(R.id.tv_about_us).setOnClickListener(this);
    findViewById(R.id.backup).setOnClickListener(this);

    mFontSize = SharedPrefs.getFontSize();
    mReadingMode = SharedPrefs.getReadingMode();

    mSeekBarTextSize.setMax(4);
    mSeekBarTextSize.setOnSeekBarChangeListener(this);
    mSeekBarTextSize.setProgress(getFontSizeInt(SharedPrefs.getFontSize()));

    switch (SharedPrefs.getReadingMode()) {
        case Day: {
            mDayMode.setColorFilter(ContextCompat.getColor(this, R.color.colorAccent));
            mNightMode.setColorFilter(ContextCompat.getColor(this, R.color.black_40));
            break;
        }
        case Night: {
            mDayMode.setColorFilter(ContextCompat.getColor(this, R.color.black_40));
            mNightMode.setColorFilter(ContextCompat.getColor(this, R.color.colorAccent));
            break;
        }
    }

    downloadManager = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);

    if (getIntent().getBooleanExtra(Constants.Keys.IMPORT_BIBLE, false)) {
        getIntent().removeExtra(Constants.Keys.IMPORT_BIBLE);
        mTvDownload.performClick();
    }
}
项目:FileDownloader    文件:PerformanceTestActivity.java   
private void assignViews() {
    ioPerformanceSb = (AppCompatSeekBar) findViewById(R.id.io_performance_sb);
    scrollView = (ScrollView) findViewById(R.id.scrollView);
    infoTv = (TextView) findViewById(R.id.info_tv);
}