right-to-left

Force RTL layout direction not working for app

末鹿安然 提交于 2019-11-27 13:33:23
问题 I'm trying to add RTL language support in my app (specifically Arabic right now). I'll be supporting English as well. What I've done: Set minSdkVersion to 17 Added android:supportsRtl="true" to my application tag in AndroidManifest.xml Switched my left/right attributes to start/end At first I made these changes manually, then I used Android Studio's "Refactor -> Add RTL Support Where Possible..." menu item. When I preview my layout files, I can see the RTL preview is properly mirroring the UI

The project references RTL attributes, but does not explicitly enable or disable RTL support [duplicate]

六眼飞鱼酱① 提交于 2019-11-27 12:58:25
问题 This question already has an answer here: What is use of android:supportsRtl=“true” in AndroidManifest xml file 3 answers In Eclipse manifest file , i get a warning message. Application language is Turkish ( Not right to left ). "The project references RTL attributes, but does not explicitly enable or disable RTL support with android:supportsRtl in the manifest " I can not add android:supportsRtl line, because my min sdk versionn is 9. This warning is important? Thanks 回答1: If you do not

Javascript - how to find hebrew?

眉间皱痕 提交于 2019-11-27 12:49:07
i"m trying to fint if a string starts(first letter) width an RTL language/ hebrew. any ideas? Oded This will find hebrew letters encoded in the Hebrew Unicode code point range: [\u0590-\u05FF] Bart Kiers JavaScript does not support regex scripts like \p{InHebrew} (or something similar). However, it does support Unicode escapes, so you could use a regex like: /[\u0590-\u05FF]/ which will match a single Hebrew character. See: http://unicode.org/charts/PDF/U0590.pdf and: http://www.regular-expressions.info/unicode.html Oranit Dar // First choose the required validation HebrewChars = new RegExp("^

UICollectionView iOS 9 issue on project with RTL languages support

大憨熊 提交于 2019-11-27 12:03:35
问题 It seems like Apple's new feature of auto-flip interface on RTL languages cause problems when using UICollectionView . I used constraints of type Trailing/Leading for the collection view and they switched their values, as they should, on RTL language. The problem is that the data actually presented is of the last indexPath in the collection's data source but the UIScrollView.contentOffset.x of the first cell is 0. A proper behaviour would have been one of the following: Displaying the first

use text-align smartly (if english dir=ltr if arabic dir=rtl)

本秂侑毒 提交于 2019-11-27 11:59:05
I have a community web site and I want that users write English posts with direction LTR / text-align: left) and Arabic posts with direction RTL / text-align: right. E.g. Google+ and twitter provides such an POST solution. I want add automatically direction attribute to post when i read it from data base post load in rtl or ltr ! but i don't know how ?! You'll need to create a function that has all the letters you know are RTL and check when loading. To display RTL you need the CSS attributes, direction , text-align , and unicode-bidi . Demo: Script function checkRtl( character ) { var RTL = [

Aligning right to left on UICollectionView

吃可爱长大的小学妹 提交于 2019-11-27 10:55:51
this is a pretty straightforward question, but I haven't been able to find a definitive answer to it on SO (if I missed it, please correct me). Basically, my question is: Is it possible to align UICollectionView row contents from right to left instead of from left to right? In my research I've seen answers suggesting subclassing UICollectionViewFlowLayout , but I haven't been able to find an example where one was created for right-alignment. My goal is to have 2 collection views set up like this: Any help is greatly appreciated! You can get similar result by performing a transform on the

How to draw RTL text (Arabic) onto a Bitmap and have it ordered properly?

…衆ロ難τιáo~ 提交于 2019-11-27 07:13:16
问题 I'm trying to draw Arabic text onto a Bitmap for display: Bitmap img = Bitmap.createBitmap( (int) f+100, 300, Config.RGB_565); Canvas c = new Canvas(); c.setBitmap( img ); mFace = Typeface.createFromAsset(getAssets(),"DejaVuSansCondensed.ttf"); mPaint.setTypeface(mFace); content = "يجري"; content = ArabicUtilities.reshape( content ); System.out.println("Drawing text: " + content); c.drawText(content, 30, 30, mPaint); The ArabicUtilities class is a tool to reshape the unicode text so the

how to write text right to left (Arabic Text)in Android ?

早过忘川 提交于 2019-11-27 06:42:07
问题 I used Arabic text so, I want to write text from right to left so how i can write right to left text in android ? Regards, Girish 回答1: Try with Bidi 回答2: Declare in your app manifest that your app supports RTL mirroring: add android:supportsRtl="true" to the element in your manifest file. Change all of your app's "left/right" layout properties to new "start/end" equivalents. Native RTL support in Android 4.2 回答3: It looks like this is only possible starting with jelly bean 回答4: use this

JavaScript: how to check if character is RTL?

爷,独闯天下 提交于 2019-11-27 05:29:39
问题 How can I programmatically check if the browser treats some character as RTL in JavaScript? Maybe creating some transparent DIV and looking at where text is placed? A bit of context. Unicode 5.2 added Avestan alphabet support. So, if the browser has Unicode 5.2 support, it treats characters like U+10B00 as RTL (currently only Firefox does). Otherwise, it treats these characters as LTR, because this is the default. How do I programmatically check this? I'm writing an Avestan input script and I

Parsing through Arabic / RTL text from left to right

浪尽此生 提交于 2019-11-27 05:20:29
Let's say I have a string in an RTL language such as Arabic with some English chucked in: string s = "Test:لطيفة;اليوم;a;b" Notice there are semicolons in the string. When I use the Split command like string[] spl = s.Split(';'); , then some of the strings are saved in reverse order. This is what happens: ‏‏‏‏‏spl[0] = "‏Test:لطيفة" spl[1] = "‏"اليوم spl[2] = ‏"a" spl[3] = ‏"b" The above is out of order compared to the original. Instead, I expect to get this: ‏‏spl[0] = ‏"Test:اليوم" spl[1] = "‏لطيفة" spl[2] = ‏"a" spl[3] = ‏"b" I'm prepared to write my own split function. However, the chars