right-to-left

HorizontalScrollView doesn't scroll to left in RTL mode

不问归期 提交于 2019-12-10 13:49:57
问题 I have HorizontalScrollView with android:supportsRtl="true" in my application. But instead of scrolling to left, it scrolling to right anyway. How would i fix this? <HorizontalScrollView android:id="@id/audioScrollView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/size_normal" android:layout_toStartOf="@+id/retakeBtn" android:layout_toEndOf="@+id/recordBtn" android:background="@drawable/border_drawable" android:paddingBottom="@dimen

How to detemine the current direction of a View (RTL/LTR)?

百般思念 提交于 2019-12-10 13:19:04
问题 Background It's possible to get the current locale direction, using this: val isRtl=TextUtilsCompat.getLayoutDirectionFromLocale(Locale.getDefault()) == ViewCompat.LAYOUT_DIRECTION_RTL It's also possible to get the layout direction of a view, if the developer has set it: val layoutDirection = ViewCompat.getLayoutDirection(someView) The problem The default layoutDirection of a view isn't based on its locale. It's actually LAYOUT_DIRECTION_LTR . When you change the locale of the device from LTR

Scaling in MathJax with respect to text direction

一笑奈何 提交于 2019-12-10 12:22:04
问题 I'm working on a site which is in Arabic (default text direction is "right to left") and I'm using "Noto Naskh Arabic" font for arabic text and Latin-Modern for latin text which I'm definig by the following css code: *[dir="ltr"] { font-size: 20px !important; font-family:"Latin-Modern"; } Users may need to enter mathematical equations and I'm using 'Mathjax' for this purpose, the problem is that: Fractions are displayed without the horizontal line Equations are displayed with different sizes

Angular2 material sidenav - changing rtl/ltr direction dynamically

时间秒杀一切 提交于 2019-12-10 10:46:44
问题 I'm trying to change my layout dynamically according to users' language selection and switch from LTR to RTL on the fly. I'm using Angular 2 rc6, material 2.0.0-alpha.9-3 It looks like when the page is loaded, it works perfectly with either rtl or ltr. However, when it's changed dynamically from within the app (see plunker), the direction changes but the generated element md-sidenav-content has a miscalculated margin-right and margin-left. Digging further, I managed to see that the _dir

How can I recognize RTL strings in C++

蓝咒 提交于 2019-12-10 10:18:14
问题 I need to know the direction of my text before printing. I'm using Unicode Characters. How can I do that in C++? 回答1: If you don't want to use ICU, you can always manually parse the unicode database (.e.g., with a python script). It's a semicolon-separated text file, with each line representing a character code point. Look for the fifth record in each line - that's the character class. If it's R or AL , you have an RTL character, and 'L' is an LTR character. Other classes are weak or neutral

Irrelevant change of button size in Right to Left orientation

回眸只為那壹抹淺笑 提交于 2019-12-10 08:23:25
问题 I have 9 jbuttons added to jpanel and the panel added to jscrollpane and it added to jframe. http://www.pic1.iran-forum.ir/images/up9/95426323683658592564.jpg when i change frame orientation by: applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); the panel move to right and size of buttons got fixed and wouldn`t fill the panel but you see in the image below that scrolbar is fill all width of panel http://www.pic1.iran-forum.ir/images/up9/60975202722295688553.jpg (i used

Right-to-Left Email

我的未来我决定 提交于 2019-12-09 15:15:54
问题 I'm trying to generate email from my code that will read correctly for people using right-to-left-reading languages such as Arabic. My question is: what are my options for acheiving this? I am aware that I can create a multipart email and encode the message body as "text/html", then specify a text direction in the <html> tag (e.g. <html dir="rtl"> ), but ideally I would like use plain-text email and not have to rely on HTML formatting, because not all users will have HTML support in their

Right to left languages support in R, using Mac

帅比萌擦擦* 提交于 2019-12-09 07:53:47
问题 I am wondering if there is anyway to support right-to-left languages in R while using Mac For instance suppose the following code: x <- data.frame(a=runif(10),b=runif(10)) ggplot(x, aes(a,b)) + geom_point() + xlab("سلام") Here is the result: Here I tried to change the x-label as a Persian/Arabic word (سلام = Hello). While displayed correctly in the code (using R-Studio), in the graph the characters of سلام are displayed in the reverse order (left-to-right). Also the linkage between two

Change EditText setError drawable gravity

此生再无相见时 提交于 2019-12-08 17:43:25
问题 For EditText that going be filled with RTL text, is there a way to change the gravity of the error drawable (and popup of course) ? here is an example of regular error drawable so since the text entered is RTL i would like the pop up to show up at the LEFT side of the EditText i tried to apply custom drawable , but Drawable doesnt seem to have any setGravity method. thanks in advance. 回答1: It's not possible by normal means, however you can extend the Android TextView class and change the

Develop an Android App to support English and Arabic “layout alignment”

别等时光非礼了梦想. 提交于 2019-12-08 14:59:58
问题 I am developing an Android app to support both En/Ar. But I faced a problem that if the user changes from En to Ar the alignment of the user interface must turns from "left to right" to "right to left". Example: (TextView)(EditText) this is in En But in Ar it should be: (EditText)(TextView) . Is there a way to do this without creating two different layouts or two different versions? 回答1: Why can't this be done with two layouts (you never said why this is not desireable)? As described by the