Code example for View

Methods: getLayoutParams, setLayoutParams

0
   
  SeekBar.OnSeekBarChangeListener h=new SeekBar.OnSeekBarChangeListener() {
    public void onProgressChanged(SeekBar seekBar, 
                                  int progress, 
                                  boolean fromTouch) { 
      ViewGroup.LayoutParams old=thingToResize.getLayoutParams(); 
      ViewGroup.LayoutParams current=new LinearLayout.LayoutParams(64+progress, 
                                                                   old.height); 
       
      thingToResize.setLayoutParams(current); 
    } 
     
    public void onStartTrackingTouch(SeekBar seekBar) { 
      // unused 
    } 
     
    public void onStopTrackingTouch(SeekBar seekBar) { 
      // unused 
    } 
  };