Skip to content

Commit

Permalink
* updated builder methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Iojjj committed May 17, 2016
1 parent 1a2abb7 commit ed43417
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public static AudioVisualizationFragment newInstance() {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return new GLAudioVisualizationView.Builder(getContext())
.setBubbleSize(R.dimen.bubble_size)
.setRandomizeBubbleSize(true)
.setWaveHeight(R.dimen.wave_height)
.setFooterHeight(R.dimen.footer_height)
.setBubblesSize(R.dimen.bubble_size)
.setBubblesRandomizeSize(true)
.setWavesHeight(R.dimen.wave_height)
.setWavesFooterHeight(R.dimen.footer_height)
.setWavesCount(7)
.setLayersCount(4)
.setBackgroundColorRes(R.color.av_color_bg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public Builder setLayersCount(int layersCount) {
*
* @param bubbleSize bubbles size in pixels
*/
public Builder setBubbleSize(float bubbleSize) {
public Builder setBubblesSize(float bubbleSize) {
this.bubbleSize = bubbleSize;
return this;
}
Expand All @@ -321,16 +321,16 @@ public Builder setBubbleSize(float bubbleSize) {
*
* @param bubbleSize dimension resource
*/
public Builder setBubbleSize(@DimenRes int bubbleSize) {
return setBubbleSize((float) context.getResources().getDimensionPixelSize(bubbleSize));
public Builder setBubblesSize(@DimenRes int bubbleSize) {
return setBubblesSize((float) context.getResources().getDimensionPixelSize(bubbleSize));
}

/**
* Set wave height in pixels
*
* @param waveHeight wave height in pixels
*/
public Builder setWaveHeight(float waveHeight) {
public Builder setWavesHeight(float waveHeight) {
this.waveHeight = waveHeight;
return this;
}
Expand All @@ -340,16 +340,16 @@ public Builder setWaveHeight(float waveHeight) {
*
* @param waveHeight dimension resource
*/
public Builder setWaveHeight(@DimenRes int waveHeight) {
return setWaveHeight((float) context.getResources().getDimensionPixelSize(waveHeight));
public Builder setWavesHeight(@DimenRes int waveHeight) {
return setWavesHeight((float) context.getResources().getDimensionPixelSize(waveHeight));
}

/**
* Set footer height in pixels
*
* @param footerHeight footer height in pixels
*/
public Builder setFooterHeight(float footerHeight) {
public Builder setWavesFooterHeight(float footerHeight) {
this.footerHeight = footerHeight;
return this;
}
Expand All @@ -359,16 +359,16 @@ public Builder setFooterHeight(float footerHeight) {
*
* @param footerHeight dimension resource
*/
public Builder setFooterHeight(@DimenRes int footerHeight) {
return setFooterHeight((float) context.getResources().getDimensionPixelSize(footerHeight));
public Builder setWavesFooterHeight(@DimenRes int footerHeight) {
return setWavesFooterHeight((float) context.getResources().getDimensionPixelSize(footerHeight));
}

/**
* Set flag indicates that size of bubbles should be randomized
*
* @param randomizeBubbleSize true if size of bubbles should be randomized, false if size of bubbles must be the same
*/
public Builder setRandomizeBubbleSize(boolean randomizeBubbleSize) {
public Builder setBubblesRandomizeSize(boolean randomizeBubbleSize) {
this.randomizeBubbleSize = randomizeBubbleSize;
return this;
}
Expand Down

0 comments on commit ed43417

Please sign in to comment.