Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is use of android:supportsRtl="true" in AndroidManifest xml file

Whenever I created new project in android studio, I got android:supportsRtl="true" in my app AndroidManifest File.

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
...
</application>

What is use in app, or what is advantages & disadvantage when I add or not add in my app AndroidManifest .

like image 276
pRaNaY Avatar asked Dec 09 '15 12:12

pRaNaY


People also ask

What is the Android name attribute used for in the AndroidManifest xml file?

<activity> android:label represents a label i.e. displayed on the screen. android:name represents a name for the activity class. It is required attribute.

What is Android exported true?

android:exported Whether or not the broadcast receiver can receive messages from sources outside its application — "true" if it can, and "false" if not. If "false", the only messages the broadcast receiver can receive are those sent by components of the same application or applications with the same user ID.

Where is Android app SRC main AndroidManifest xml?

xml ​ Android apps manage permissions, device features, and other settings in the AndroidManifest. xml file, which is located at android/app/src/main/AndroidManifest.

How do I open AndroidManifest xml on Android?

Just open your APK and in treeview select "AndroidManifest. xml". It will be readable just like that.


3 Answers

Declares whether your application is willing to support right-to-left (RTL) layouts. If set to true and targetSdkVersion is set to 17 or higher, various RTL APIs will be activated and used by the system so your app can display RTL layouts. If set to false or if targetSdkVersion is set to 16 or lower, the RTL APIs will be ignored or will have no effect and your app will behave the same regardless of the layout direction associated to the user's Locale choice (your layouts will always be left-to-right).

The default value of this attribute is false.

This attribute was added in API level 17.

(Source: http://developer.android.com/guide/topics/manifest/application-element.html)

like image 84
Gex Avatar answered Oct 16 '22 23:10

Gex


if you are building an app in Arabic, Urdu, Hebrew, etc... or any language that is written from right to left you should set android:supportsRtl to true, that's how you tell the layout to be from right to left, and The default value of this attribute is false.

like image 86
Sarah Avatar answered Oct 17 '22 00:10

Sarah


From Android API-Guides:

(developer.android.com/guide/topics/manifest/application-element.html)

Declares whether your application is willing to support right-to-left (RTL) layouts.

If set to true and targetSdkVersion is set to 17 or higher, various RTL APIs will be activated and used by the system so your app can display RTL layouts. If set to false or if targetSdkVersion is set to 16 or lower, the RTL APIs will be ignored or will have no effect and your app will behave the same regardless of the layout direction associated to the user's Locale choice (your layouts will always be left-to-right).

The default value of this attribute is false.

This attribute was added in API level 17.

like image 10
wasntme Avatar answered Oct 17 '22 00:10

wasntme