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


Java AppCompatSeekBar.setOnSeekBarChangeListener方法代码示例

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


在下文中一共展示了AppCompatSeekBar.setOnSeekBarChangeListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例4: 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

示例5: 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.setOnSeekBarChangeListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。