android.support.v7.widget.AppCompatSeekBar Java Examples

The following examples show how to use android.support.v7.widget.AppCompatSeekBar. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivity.java    From AndroidBarUtils with Apache License 2.0 6 votes vote down vote up
private void initView() {
        drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
                this, drawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
        drawerLayout.addDrawerListener(toggle);
        toggle.syncState();
        //修复DrawerLayout 在4.4 下出现白条的问题
//        AndroidBarUtils.setTranslucentDrawerLayout(drawerLayout);

        navigationView = (NavigationView) findViewById(R.id.nav_view);
        navigationView.setNavigationItemSelectedListener(this);
        //适配NavigationView 刘海屏
        AndroidBarUtils.setBarPaddingTop(this, navigationView.getHeaderView(0));

        fab = (FloatingActionButton) findViewById(R.id.fab);
        switchCompat = (SwitchCompat) findViewById(R.id.main_sc_mode);
        sb_alpha = (AppCompatSeekBar) findViewById(R.id.main_sb_alpha);
        sb_red = (AppCompatSeekBar) findViewById(R.id.main_sb_red);
        sb_green = (AppCompatSeekBar) findViewById(R.id.main_sb_green);
        sb_blue = (AppCompatSeekBar) findViewById(R.id.main_sb_blue);
        sb_alpha.setProgress(alpha);
        sb_red.setProgress(red);
        sb_green.setProgress(green);
        sb_blue.setProgress(blue);
    }
 
Example #2
Source File: LEDActivity.java    From styT with Apache License 2.0 5 votes vote down vote up
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_led);

    mContentLed = (TextInputEditText) findViewById(R.id.content_led);
    Button mFontcolorBtnLed = (Button) findViewById(R.id.fontcolor_btn_led);
    Button mBgcolorBtnLed = (Button) findViewById(R.id.bgcolor_btn_led);
    mPreviewLed = (TextView) findViewById(R.id.preview_led);

    ImageView mReverseColorLed = (ImageView) findViewById(R.id.reverseColor_led);

    mShowstyleRadiogroupLed = (RadioGroup) findViewById(R.id.showstyle_radiogroup_led);

    AppCompatRadioButton mSingleRadiobtnLed = (AppCompatRadioButton) findViewById(R.id.single_radiobtn_led);
    AppCompatRadioButton mSingleTossBtnLed = (AppCompatRadioButton) findViewById(R.id.single_toss_radiobtn_led);

    mRollspeedSeekbarLed = (AppCompatSeekBar) findViewById(R.id.rollspeed_seekbar_led);
    mAdaptiveRadiobtnLed = (AppCompatRadioButton) findViewById(R.id.adaptive_radiobtn_led);
    mLinesTextView = (TextView) findViewById(R.id.tv_lines_led);
    mlinesSeekbar = (AppCompatSeekBar) findViewById(R.id.lines_seekbar_led);
    AppCompatRadioButton mMagicRadiobtnLed = (AppCompatRadioButton) findViewById(R.id.magic_radiobtn_led);
    mCompatSpinner = (AppCompatSpinner) findViewById(R.id.spinner_magicstyle_led);
    Button mStartBtnLed = (AppCompatButton) findViewById(R.id.start_btn_led);

    if (mFontcolorBtnLed != null) {
        mFontcolorBtnLed.setOnClickListener(this);
    }
    if (mStartBtnLed != null) {
        mStartBtnLed.setOnClickListener(this);
    }
    if (mBgcolorBtnLed != null) {
        mBgcolorBtnLed.setOnClickListener(this);
    }

    initViewEvent();
}
 
Example #3
Source File: MaterialSeekBarPreference.java    From MaterialPreferences with Apache License 2.0 5 votes vote down vote up
@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());
}
 
Example #4
Source File: PerformanceTestActivity.java    From FileDownloader with Apache License 2.0 4 votes vote down vote up
private void assignViews() {
    ioPerformanceSb = (AppCompatSeekBar) findViewById(R.id.io_performance_sb);
    scrollView = (ScrollView) findViewById(R.id.scrollView);
    infoTv = (TextView) findViewById(R.id.info_tv);
}
 
Example #5
Source File: AppCompatv7DSL.java    From anvil with MIT License 4 votes vote down vote up
public static BaseDSL.ViewClassResult appCompatSeekBar() {
  return BaseDSL.v(AppCompatSeekBar.class);
}
 
Example #6
Source File: AppCompatv7DSL.java    From anvil with MIT License 4 votes vote down vote up
public static Void appCompatSeekBar(Anvil.Renderable r) {
  return BaseDSL.v(AppCompatSeekBar.class, r);
}