當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。