Open Den368 opened 7 years ago
Actually it's enough to call I18nManager.forceRTL(true);
and face above problem!
I see there is no comment since Aug 1 17!!!
Doesn't this lib maintain anymore??
Hello @AlirezaAkbarix , I am sorry to have been delayed for so long. I am not familiar with this question, can this problem be solved through add I18nManager.forceRTL(true)
to project source?
It seems that this code should not be added to the library directly.
Hi @ascoders! No, I mean for testing the bug, you're not suppose to do a lot! just at your test app use I18nManager.forceRTL(true)
to make it RTL
. then make sure you have more than 1 image to show.
The problem will appear! you can see you have 2(e.g.) images and the first one is been showing correctly, but you are not able to switch to next one (it's placed al the left of the first one).
Thanks @AlirezaAkbarix ! I solved this problem in 2.2.1
.
@ascoders - There is still one issue with RTL - if I set the index to anything that is not 0 it will not show the image.
To fix it, change jumpToCurrentImage() as follows:
public jumpToCurrentImage() {
// 跳到当前图的位置
this.positionXNumber = this.width * (this.state.currentShowIndex || 0) * (I18nManager.isRTL? 1 : -1);
this.standardPositionX = this.positionXNumber;
this.positionX.setValue(this.positionXNumber);
}
The first line changed. If it is RTL we don't make it negative. From what I tested this works for me.
Will you be able to make the change? If you prefer I can create a pull request.
@noambonnie Look forward your pr!
@ascoders PR sent. Thank you. (Also sent another PR to remove a log message...)
Steps to produce: