private ProgressButton addProgressButton ( LinearLayout container ) { final LinearLayout . LayoutParams layoutParams = new LinearLayout . LayoutParams ( 0 , LinearLayout . LayoutParams . WRAP_CONTENT , 1.0f ) ; final ProgressButton progressButton = new ProgressButton ( this ) ; progressButton . setLayoutParams ( layoutParams ) ; container . addView ( progressButton ) ; return progressButton ; }
Helper function that creates a new progress button adds it to the given layout . Returns a reference to the progress button for customization .