当前位置: 首页>>代码示例>>Java>>正文


Java AppCompatSeekBar类代码示例

本文整理汇总了Java中android.support.v7.widget.AppCompatSeekBar的典型用法代码示例。如果您正苦于以下问题:Java AppCompatSeekBar类的具体用法?Java AppCompatSeekBar怎么用?Java AppCompatSeekBar使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AppCompatSeekBar类属于android.support.v7.widget包,在下文中一共展示了AppCompatSeekBar类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onViewCreated

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
@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);
}
 
开发者ID:drfonfon,项目名称:android-geohash,代码行数:18,代码来源:ConverterFragment.java

示例2: onCreateView

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
@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;
}
 
开发者ID:an-garcia,项目名称:MovieGuide,代码行数:36,代码来源:DiscoverFragment.java

示例3: init

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
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();
}
 
开发者ID:wy353208214,项目名称:ListVideoViewBaseOnVitamio,代码行数:9,代码来源:MediaControllerView.java

示例4: onViewCreated

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
@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());
}
 
开发者ID:yarolegovich,项目名称:MaterialPreferences,代码行数:13,代码来源:MaterialSeekBarPreference.java

示例5: assignViews

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
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);
}
 
开发者ID:Jacksgong,项目名称:PercentSmoothHandler,代码行数:9,代码来源:MainActivity.java

示例6: onCreate

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
@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);
}
 
开发者ID:JustZak,项目名称:DilatingDotsProgressBar,代码行数:29,代码来源:MainActivity.java

示例7: onCreate

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
@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);
}
 
开发者ID:jrvansuita,项目名称:GaussianBlur,代码行数:30,代码来源:MainActivity.java

示例8: getDefaultViewDefStyleAttr

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
@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);
    }
}
 
开发者ID:Leao,项目名称:CodeColors,代码行数:33,代码来源:AppCompatDefStyleHandler.java

示例9: initViews

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
@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));
    });
}
 
开发者ID:frc2052,项目名称:FRC-Krawler,代码行数:15,代码来源:SliderMetricWidget.java

示例10: assignViews

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
private void assignViews() {
    ioPerformanceSb = (AppCompatSeekBar) findViewById(R.id.io_performance_sb);
    scrollView = (ScrollView) findViewById(R.id.scrollView);
    infoTv = (TextView) findViewById(R.id.info_tv);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:PerformanceTestActivity.java

示例11: getSeekBar

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
@NonNull
protected abstract AppCompatSeekBar getSeekBar(View itemView);
 
开发者ID:qiscus,项目名称:qiscus-sdk-android,代码行数:3,代码来源:QiscusBaseAudioMessageViewHolder.java

示例12: getSeekBar

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
@NonNull
@Override
protected AppCompatSeekBar getSeekBar(View itemView) {
    return (AppCompatSeekBar) itemView.findViewById(R.id.seekbar);
}
 
开发者ID:qiscus,项目名称:qiscus-sdk-android,代码行数:6,代码来源:QiscusAudioViewHolder.java

示例13: ProgressBarPreference

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
public ProgressBarPreference(Context context) {
    super(context);

    seekBar = new AppCompatSeekBar(context);
    RefreshManager.registerForChangePreferences(this, SettingsFragment.KEY_BLUR_RADIUS);
}
 
开发者ID:EuphoriaDev,项目名称:euphoria-vk-client,代码行数:7,代码来源:ProgressBarPreference.java

示例14: getSeekBar

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
public AppCompatSeekBar getSeekBar() {
    return seekBar;
}
 
开发者ID:EuphoriaDev,项目名称:euphoria-vk-client,代码行数:4,代码来源:ProgressBarPreference.java

示例15: onCreate

import android.support.v7.widget.AppCompatSeekBar; //导入依赖的package包/类
@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();
    }
}
 
开发者ID:friendsofagape,项目名称:Autographa-Go,代码行数:66,代码来源:SettingsActivity.java


注:本文中的android.support.v7.widget.AppCompatSeekBar类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。