Tag Archives: progressbar

5,527 views

SeekBar listener Android Example Source

SeekBar setOnSeekBarChangeListener Example. Change TextView font size by SeekBar Example. TextView mTextView01 = (TextView)findViewById(R.id.textView01);   SeekBar mSeekBarTexSize = (SeekBar)findViewById(R.id.seekBarTextSize); mSeekBarTexSize.setMax(100); mSeekBarTexSize.setProgress(25);   mSeekBarTexSize.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { mTextView01.setTextSize((float)progress); }   public void onStartTrackingTouch(SeekBar … Continue reading

Posted in Android Examples Code | Tagged , , | Comments Off on SeekBar listener Android Example Source
29,593 views

Progressbar change background and fore color – Android sample

MainActivity.java ProgressBar mProgressBarScore; // onCreate mProgressBarScore = (ProgressBar)findViewById(R.id.progressBarScore); Resources res = getResources(); mProgressBarScore.setProgressDrawable(res.getDrawable( R.drawable.my_progress)); res/layout/main.xml <ProgressBar android:id="@+id/progressBarScore" style="?android:attr/progressBarStyleHorizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:max="100"/> res/drawable/my_progress.xml <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">   <item android:id="@android:id/background"> <shape> <!– radius background of progressbar –> <corners android:radius="10dip" /> … Continue reading

Posted in Android Examples Code | Tagged , | Comments Off on Progressbar change background and fore color – Android sample