SHARE
TWEET

Untitled

a guest Jun 18th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package devcrew.projeto;
  2.  
  3. import android.support.v7.app.AppCompatActivity;
  4. import android.os.Bundle;
  5. import android.widget.ProgressBar;
  6. import android.widget.SeekBar;
  7. import android.widget.TextView;
  8.  
  9. public class comoestou extends AppCompatActivity {
  10.     public TextView caixa;
  11.     public ProgressBar progressbar;
  12.     public SeekBar seek1;
  13.  
  14.     @Override
  15.     protected void onCreate(Bundle savedInstanceState) {
  16.         super.onCreate(savedInstanceState);
  17.         setContentView(R.layout.activity_comoestou);
  18.         caixa = (TextView)findViewById(R.id.caixa);
  19.         progressbar = (ProgressBar)findViewById(R.id.progressbar);
  20.         seek1 = (SeekBar)findViewById(R.id.seek1);
  21.  
  22.  
  23.         seek1.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
  24.             @Override
  25.             public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
  26.                 progressbar.setProgress(progress);
  27.                 caixa.setText("" + progress + "%");
  28.             }
  29.  
  30.             @Override
  31.             public void onStartTrackingTouch(SeekBar seekBar) {
  32.  
  33.             }
  34.  
  35.             @Override
  36.             public void onStopTrackingTouch(SeekBar seekBar) {
  37.  
  38.             }
  39.  
  40.         });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top