Skip to content

Commit

Permalink
Merge pull request #9547 from maggieaxway/6_3_X
Browse files Browse the repository at this point in the history
[6_3_X][TIMOB-25423] Android: Ti.UI.Slider on Android 4.x is not working
  • Loading branch information
Lokesh Choudhary committed Oct 26, 2017
2 parents c82d439 + 652fc51 commit 15ace51
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import android.graphics.drawable.ClipDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.os.Build;
import android.view.Gravity;
import android.widget.SeekBar;

Expand Down Expand Up @@ -95,7 +96,9 @@ public void processProperties(KrollDict d)
updateThumb(seekBar, d);
}
if (d.containsKey(TiC.PROPERTY_SPLIT_TRACK)) {
seekBar.setSplitTrack(TiConvert.toBoolean(d.get(TiC.PROPERTY_SPLIT_TRACK)));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
seekBar.setSplitTrack(TiConvert.toBoolean(d.get(TiC.PROPERTY_SPLIT_TRACK)));
}
}
if (d.containsKey("leftTrackImage") || d.containsKey("rightTrackImage")) {
updateTrackingImages(seekBar, d);
Expand Down Expand Up @@ -269,7 +272,9 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP
//seekBar.invalidate();
Log.i(TAG, "Dynamically changing thumbImage is not yet supported. Native control doesn't draw");
} else if (key.equals(TiC.PROPERTY_SPLIT_TRACK)) {
seekBar.setSplitTrack(TiConvert.toBoolean(newValue));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
seekBar.setSplitTrack(TiConvert.toBoolean(newValue));
}
} else if (key.equals("leftTrackImage") || key.equals("rightTrackImage")) {
//updateTrackingImages(seekBar, proxy.getDynamicProperties());
//seekBar.invalidate();
Expand Down

0 comments on commit 15ace51

Please sign in to comment.