right-to-left

Right to left menu items Android in NavigationView

99封情书 提交于 2019-11-28 09:06:42
问题 im beginer of android. i design a navigation drawer like this: as you see all items in menu are on the right Except "SubHeader". how can i move "SubHeader" item to the right of this menu? i use all properties like gravity, layout gravity, layoutDirection to the SubHeaderItem but it doesn't work. my code is <android.support.design.widget.NavigationView android:layout_width="wrap_content" android:layout_height="match_parent" android:id="@+id/navigation_view" android:layout_gravity="end" android

Why is a trailing punctuation mark rendered at the start with direction:rtl?

本秂侑毒 提交于 2019-11-28 09:01:06
This is more a sort of curiosity. While working on a multilingual web application I noticed that certain characters like punctuation marks (!?.;,) at the end of a block element are rendered as if they were placed at the beginning instead when the writing direction is right-to-left (as it is the case for certain Asian languages I do not speak). In other words, The string Hello, World! is rendered as !Hello, World when placed in a div block with direction: rtl This becomes even more evident if the text is split in two parts and given different colors: a contiguous chunk of text at the end is

How to get the “up” button used on the Toolbar?

若如初见. 提交于 2019-11-28 08:11:08
问题 This is a short question: I'm trying to force the action bar (used by a Toolbar) to use LTR alignment. I've succeeded making the layout itself use LTR, but not the "up" button (as I've done here, before Toolbar was introduced) . It seems this view doesn't have an ID, and I think using getChildAt() is too risky. Can anyone help? The answer Here's one way I've found to solve this, based on this answer . I made it so that it is guarranteed to find only the "up" button, and whatever it does, it

LESS combine ruleset into two with different variables

社会主义新天地 提交于 2019-11-28 06:26:38
问题 I'm trying to combine one ruleset into two different rulesets with variable values swapped. Main purpose is LTR/RTL internationalization. Usage: h1 { margin-top: 10px; .directions({ margin-@{left}: 5px; }); } Expected output: h1 { margin-top: 10px; } .ltr h1 { margin-left: 5px; } .rtl h1 { margin-right: 5px; } I was able to get some results with the Passing Rulesets to Mixins function available in Less 1.7 .directions(@rules) { @left: left; .ltr & { @rules(); } @left: right; .rtl & { @rules()

Kivy Text Input for Arabic Text

故事扮演 提交于 2019-11-28 05:58:29
问题 I'm trying to use Kivy's text input for Arabic text. I have an Arabic font set up with my text input but when I type into the input (in Arabic) I just get Arabic letters appearing from left to right (and they're not connected as Arabic letters should be when they're adjacent to each other). Is there a way to get Kivy/text input to support RTL languages input that I'm missing (esp Arabic). Here's my code, from kivy.app import App from kivy.uix.floatlayout import FloatLayout Config.set(

How to set Arabic text to right and English text to left on same label

跟風遠走 提交于 2019-11-28 05:11:08
问题 I learned how to make English and Arabic project from previous question I asked. Same Project at github Now what I did is added a label in this project and wrote "Welcome" . The problem is the layout. When I have English text it is at left side (obviously), but when the Arabic text comes, it should start from right to left. But it is aligned to left only. Any idea how to deal with such case? Below are the screenshots... English Arabic 回答1: Below is what I did... Added fonts in projects folder

JavaScript: how to check if character is RTL?

ぐ巨炮叔叔 提交于 2019-11-28 05:05:04
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 want to override the bidi direction if the browser is too dumb. But, if browser does support Unicode,

RTL shows numbers at the end of lines

三世轮回 提交于 2019-11-28 04:45:31
Trying to display a hebrew string that starts with a number, always displays the number at the end of the string like so: 1. יום שישי בבוקר but I need the number to be displayed at the right side of the text- any solution to that? It happens with UILabel & UITextField & UITextView and trying to write the number at the left side also produce the same resault. Playing with combinations of UITextAlignment will doesn't help. You don't need to change any setting on UILabel, just put the character with unicode 0x200F before your string. This is the reason: In Unicode many characters have a specific

jQuery.scrollLeft() when direction is rtl - different values in different browsers

☆樱花仙子☆ 提交于 2019-11-28 03:55:52
问题 The scrollLeft property of a div seems to return different values in different browsers when the body direction is rtl. An example can be seen here - http://jsfiddle.net/auVLZ/2/ body { direction: rtl; } div.Container { border: 5px solid #F00; width: 500px; height: 400px; overflow: auto; } div.Content { background-color: #00F; width: 900px; height: 380px; }​ <div id="divContainer" class="Container"> <div class="Content"></div> </div> <br /> <input id="showScrollLeft" type="button" value="Show

Control alignment switching between LTR and RTL languages

回眸只為那壹抹淺笑 提交于 2019-11-28 02:15:40
Although this question is general enough to apply to the web, I'm interested in WinForms in particular. The application UI switches between LTR and RTL languages without incident. The only obstacle is placement of labels that are associated with input controls such as text boxes. Left to Right: Right to Left: The label placement on the RTL image should also change accordingly. Is there a generalized, programmatic way to achieve this? Option 1 - Mirror Form (mirrors titlebar too) If both the RightToLeftLayout and RightToLeft properties are true, mirroring will be turned on for the form, and