right-to-left

ListView's first entry always incorrect for RTL

混江龙づ霸主 提交于 2020-08-06 21:38:04
问题 For some reason, the first entry in my ListView is always flipped the wrong way around when I use RTL. For example: Additional information: The ListView is in a DialogFragment. I HAVE updated my manifest to support RTL (the rest of the app works fine) The ListView has an Adapter, the layout per item looks like: <ImageView android:id="@+id/dropdown_icon" android:layout_width="wrap_content" android:layout_height="match_parent" android:adjustViewBounds="true" android:scaleType="fitCenter"

ListView's first entry always incorrect for RTL

不想你离开。 提交于 2020-08-06 21:33:43
问题 For some reason, the first entry in my ListView is always flipped the wrong way around when I use RTL. For example: Additional information: The ListView is in a DialogFragment. I HAVE updated my manifest to support RTL (the rest of the app works fine) The ListView has an Adapter, the layout per item looks like: <ImageView android:id="@+id/dropdown_icon" android:layout_width="wrap_content" android:layout_height="match_parent" android:adjustViewBounds="true" android:scaleType="fitCenter"

RTL issue in string containing English, Hebrew and digits in Android (Java)

杀马特。学长 韩版系。学妹 提交于 2020-06-01 06:44:25
问题 I have an issue when mixing in one string English, Hebrew and digits. The order of digits next to Hebrew is getting reversed, no matter what order I make - fist digit and then text, of first text and then Hebrew - it's getting reversed to: on the left digit, on the right text. My text example is: String leftPart = "10 gr"; int numder = 8; String hebrewText = "כפות"; String rightPart = hebrewText + " " + number; String finalString = leftPart + " · " + rightPart; //10 gr · כפות 8 I want to

Force LTR on Expo on Android

*爱你&永不变心* 提交于 2020-05-15 02:43:05
问题 I am creating an app with React Native with Expo and I can't find a solution do force LTR (left-to-right) direction. Some of my users have its phone with RTL languages, but I only have English and Norwegian, so it doesn't make sense to show text in RTL in English. I am also using i18next for translation. Any ideas on how to solve this? Force LTR. 回答1: Just found my solution after more digging. On App.js import the following library: import { I18nManager } from "react-native"; Then right after

Force LTR on Expo on Android

笑着哭i 提交于 2020-05-15 02:43:04
问题 I am creating an app with React Native with Expo and I can't find a solution do force LTR (left-to-right) direction. Some of my users have its phone with RTL languages, but I only have English and Norwegian, so it doesn't make sense to show text in RTL in English. I am also using i18next for translation. Any ideas on how to solve this? Force LTR. 回答1: Just found my solution after more digging. On App.js import the following library: import { I18nManager } from "react-native"; Then right after

Set Toolbar layout direction to RTL, with `supportsRtl=“false”`

人盡茶涼 提交于 2020-04-13 04:03:15
问题 I have a special situation that I am not able to find a solution for. I am trying to force a view to be laid-out in RTL, but one of the restrictions is that supportsRtl must be false in the manifest. <!-- AndroidManifest.xml --> <application android:supportsRtl="false"> <!-- layout/activity.xml --> <android.support.v7.widget.Toolbar android:layoutDirection="rtl" android:layout_width="match_parent" android:layout_height="wrap_content"/> The problem I'm having is that android:layoutDirection

Set Toolbar layout direction to RTL, with `supportsRtl=“false”`

只谈情不闲聊 提交于 2020-04-13 04:03:08
问题 I have a special situation that I am not able to find a solution for. I am trying to force a view to be laid-out in RTL, but one of the restrictions is that supportsRtl must be false in the manifest. <!-- AndroidManifest.xml --> <application android:supportsRtl="false"> <!-- layout/activity.xml --> <android.support.v7.widget.Toolbar android:layoutDirection="rtl" android:layout_width="match_parent" android:layout_height="wrap_content"/> The problem I'm having is that android:layoutDirection

In right-to-left language(like Arabic and Hebrew),bracket reversed

♀尐吖头ヾ 提交于 2020-02-27 22:26:22
问题 Now I have a string like (in ltr) Hebrew text(3) and when I use dir="rtl" or direction:rtl to redirect the string it actually goes: מחיר אחד(3) (actually i entered Hebrew charactor(3) just now it automaticlly became like above↑) is there any way to make it like (3)Hebrew text (using html or css) 回答1: You don't need to wrap the bracketed text in a separate span. Rather, to fix this problem add a RLM control character ( ‏ ) after the closing bracket. The RLM character acts as another Hebrew

Numbers inside TextView getting reversed when formatted in RTL

谁说胖子不能爱 提交于 2020-02-27 03:32:47
问题 Numbers inside TextView are getting reversed when formatted in RTL. When numbers are at the end of a text inside a TextView they getting reversed. How can I solve this programmatically? As an example, the numbers below are reversed: They should be displayed like: 回答1: The misunderstand: Digits in RTL languages like ARABIC should be written from RTL with the arabic digits to avoid any problems i.e: "تم إرسال رسالة نصية للرقم ١٢٣٤" Note that I wrote "رسالة نصية" NOT "SMS رسالة". The problem and

Width of string to the right of a point, in a bi-directional text

限于喜欢 提交于 2020-01-30 06:23:05
问题 *Sorry if the title is not great. I am not sure how to summarize this question into a few words. I have a DataGridView and a search box. When the user types a query, any matching result in the DataGridView cells, is highlighted. To achieve this I use the CellPainting event of DataGridView and draw a rectangle behind the results. Some of the cells are oriented Right-To-Left: And some are oriented Left-To-Right: When the orientation is RTL, I use the following formula to calculate the highlight