Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RTL Support: Disabling it only for specific UI components

I have a custom video player Activity.

I am forced to enable RTL Support in my Application.

But doing so will result in a Right-To-Left aligned ProgressBar. (And that looks ugly)

I want my ProgressBar to stay LTR in my RTL enabled Application.

Is there any solution?

P.S. I am using Android 4.2.2

like image 868
Behnam Avatar asked Apr 09 '14 13:04

Behnam


People also ask

What is layout direction in Android?

A layout direction can be left-to-right (LTR) or right-to-left (RTL). It can also be inherited (from a parent) or deduced from the default language script of a locale.


1 Answers

Okay there is a simple solution for 4.2 and higher:

You can set the android:layoutDirection property in XML, it can have either rtl or ltr values.

The property overrides android:supportsRtl property in "application" segment of your manifest file.

like image 128
Behnam Avatar answered Oct 18 '22 01:10

Behnam