From 31185b77ce5c3a28a66c986d548ba50dd87bdaf9 Mon Sep 17 00:00:00 2001 From: MIPPL Date: Wed, 23 Oct 2019 16:49:42 +0200 Subject: [PATCH] Fix bet bar/text edit event loop, b 237 --- .../presenter/fragments/FragmentEventDetails.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java b/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java index 7c9278908..ceb924293 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java +++ b/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java @@ -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; @@ -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; } }); @@ -227,7 +230,7 @@ public void onFocusChange(View v, boolean hasFocus) { } catch (NumberFormatException e) { } - seekBar.setProgress(value-minvalue); + seekBar.setProgress( value - minvalue); } } }); @@ -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) {