Skip to content

Commit

Permalink
Fix bet bar/text edit event loop, b 237
Browse files Browse the repository at this point in the history
  • Loading branch information
MIPPL committed Oct 23, 2019
1 parent aa212cd commit 31185b7
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public class FragmentEventDetails extends DialogFragment implements View.OnClick
private boolean bHasMoneyLine = true;
private boolean bHasSpreads = false;
private boolean bHasTotals = false;
private boolean bBarSliding = false;
LinearLayout rlToPutBelowBetSlider = null;
LinearLayout rlToPutBelowPrevious = null;
RelativeLayout rlLastContainer = null;
Expand Down Expand Up @@ -197,17 +198,19 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
int posX = seekBar.getThumb().getBounds().centerX();
int coinAmount = progress + min;
updateSeekBar(coinAmount, 0);
if (bBarSliding) {
mTxAmount.setText("" + coinAmount);
}
//textView.setY(100); just added a value set this properly using screen with height aspect ratio , if you do not set it by default it will be there below seek bar
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
//Toast.makeText(getApplicationContext(), "Started tracking seekbar", Toast.LENGTH_SHORT).show();
bBarSliding = true;
}

@Override
public void onStopTrackingTouch(SeekBar seekBar) {
//textView.setText("Covered: " + progress + "/" + seekBar.getMax());
//Toast.makeText(getApplicationContext(), "Stopped tracking seekbar", Toast.LENGTH_SHORT).show();
bBarSliding = false;
}
});

Expand All @@ -227,7 +230,7 @@ public void onFocusChange(View v, boolean hasFocus) {
}
catch (NumberFormatException e) {
}
seekBar.setProgress(value-minvalue);
seekBar.setProgress( value - minvalue);
}
}
});
Expand Down Expand Up @@ -382,10 +385,8 @@ protected void updateSeekBar( int amount, int posX ) {
mPotentialReward.setText("---");
}
}
mTxAmount.setText("" + amount);
mTxCurrency.setText(" WGR (" + fiatAmountStr +")" );

//mTxAmount.setX(seekBar.getX() + posX);
}

protected void setRewardAmount(long stake, float odds) {
Expand Down

0 comments on commit 31185b7

Please sign in to comment.