right-to-left

make a RTL navigation Drawer in android

天涯浪子 提交于 2019-12-06 15:37:05
I want to make my navigation open from right to left . But as soon as I change any of these steps my program face to error force closed after click on navigation after running the app. My main_activity.xml <include layout="@layout/app_bar_main" android:layout_width="match_parent" android:layout_height="match_parent" /> <android.support.design.widget.NavigationView android:id="@+id/nav_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" android:fitsSystemWindows="true" app:headerLayout="@layout/nav_header_main" app:menu="@menu/activity

Change navigation bar orientation (RTL) programmatically

萝らか妹 提交于 2019-12-06 10:17:17
问题 My application supports 4 different languages, being two of them written from right to left. If I change the language from the android system and then start my application, everything works fine. I get a mirrored layout (RTL) and even the navigation bar is mirrored. My problem is that I have a button in my application to change the language. To change the Locale programmatically I'm doing this: Locale locale = new Locale("ar") Locale.setDefault(locale); Configuration config = new

Angular2 material sidenav - changing rtl/ltr direction dynamically

Deadly 提交于 2019-12-06 09:27:09
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 object has an eventEmitter that should watch for on change events of _dir and recalculate the margins

UICollectionView items order not reversed in right to left languages

心不动则不痛 提交于 2019-12-06 05:29:23
问题 I noticed a big issue where in right to left languages, the cells order is not properly reversed, only the alignment is correct. But only for horizontal flow layout, and if the collection view contain different cell sizes ! Yes, I know this sound insane. If all the cells are the same size, the ordering and alignment is good! Here is what I got so far with a sample app (isolated to make sure this is the actual issue, and not something else): (First bar should always be drawn blue, then size

How can I recognize RTL strings in C++

末鹿安然 提交于 2019-12-06 04:11:40
I need to know the direction of my text before printing. I'm using Unicode Characters. How can I do that in C++? 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 types (like numerals), which I guess you'd want to ignore. Using that info, you can generate a lookup table

android decimalformat for arabic, symbol is on right side of number

有些话、适合烂在心里 提交于 2019-12-06 03:48:15
问题 I'm trying to support RTL to left languages, and I'm testing with Arabic (which I know nothing about). Is the negative/positive symbol supposed to be on the right or left of the number? I think it's supposed to be on the left, but when I use Android's DecimalFormat to put the number in the locale the device is set to, the symbol appears on the right.. Has anyone encountered this, know how to work around it? Best I can think is to print it with parentheses if it's negative, that should get

Right to left navigation drawer menu using android design support library

对着背影说爱祢 提交于 2019-12-06 02:34:46
I'm using the android design support library and i want to know how can i have a right to left navigation drawer,I set the gravity to right but only the navigation drawer itself moved to right, I want to know how can i put the menu items on the right side ? Navigation View : <android.support.design.widget.NavigationView android:id="@+id/navigation_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="right" android:foregroundGravity="right" app:headerLayout="@layout/header" app:menu="@menu/drawer" /> Drawer layout : <android.support.v4.widget

Change text direction for all pages

孤街浪徒 提交于 2019-12-06 02:16:36
问题 I am working on a web project that can be in multi langauges, i have done all of that, i still have one thing. the pages when shows in english is from left to right. some languages on my website needs to be from right to left Note please, my question is about the whole page not the text in fields. how can i do that please? I am using this code for launching threads for many languages. Thread.CurrentThread.CurrentCulture = new CultureInfo(CultureName); Thread.CurrentThread.CurrentUICulture =

Master Detail Page on the right side using Xamarin.Forms

冷暖自知 提交于 2019-12-05 22:00:37
问题 I've created a master detail page on the left side using Xamarin.Forms, how about creating the same for the right side? Below is my sample code for the left slider menu; public class App { static MasterDetailPage MDPage; public static Page GetMainPage() { return MDPage = new MasterDetailPage { Master = new ContentPage { Title = "Master", BackgroundColor = Color.Silver, Icon = Device.OS == TargetPlatform.iOS ? "menu.png" : null, Content = new StackLayout { Padding = new Thickness(5, 50),

Best approach to change Xib direction programmatically

岁酱吖の 提交于 2019-12-05 21:37:49
I have an app that has a settings page in which the user can change the app's language. Eventually, the direction of the xibs will change. To explain a bit more, if the language is English for example, the direction will be LTR; However if it's Arabic, it will be RTL. Question What is the best approach to achieve this? Approaches tried with issues NSUserDefaults : When setting the language to "ar-SA", the direction changes successfully but only when it's called in the main class. When I do it in runtime, the app must be restarted to take effect. Even if there's a way to restart the app, it's