Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android - how can i use the "android:layoutDirection"?

it seems that android 4 provides "android:layoutDirection" for linearLayout and "android:textDirection" for textView , but when i choose them , i get a compilation error that it doesn't recognize them like that:

error: No resource identifier found for attribute 'layoutDirection' in package 'android'

i also can't find out more information on the internet about those attributes. what do they mean, and how come i can't use them?

like image 529
Khalid ElSayed Avatar asked May 17 '12 10:05

Khalid ElSayed


People also ask

How do I enable RTL support on android?

First of all, you must add android:supportsRtl="true" to the <application> element in your manifest file for your app to supporting RTL design. Trick: If your app supports multiple languages and if you have code snippet like config. setLayoutDirection(Locale.US) you must change it.

How do I disable RTL on android?

How do I disable RTL support on android? Change all of your app's "left/right" layout properties to new "start/end" equivalents. If you are targeting your app to Android 4.2 (the app's targetSdkVersion or minSdkVersion is 17 or higher), then you should use “start” and “end” instead of “left” and “right”.

What is an android view?

What is Android View? A View is a simple building block of a user interface. It is a small rectangular box that can be TextView, EditText, or even a button. It occupies the area on the screen in a rectangular area and is responsible for drawing and event handling.

What is android padding?

The padding is expressed in pixels for the left, top, right and bottom parts of the view. Padding can be used to offset the content of the view by a specific number of pixels. For instance, a left padding of 2 will push the view's content by 2 pixels to the right of the left edge.


1 Answers

It works if you change your project properties to API Level 17.

like image 200
friedflow Avatar answered Sep 20 '22 17:09

friedflow