Questions tagged [android-layout-direction]
15 questions
7
votes
2 answers
How to position Floating Action Button to Left or Start in Jetpack Compose
I want to create animated bottomAppBar in jetpack compose (something like image) but Fab position in jetpack compose is only center or end and i need to move FAB to left at least, my code is :
@Composable
fun BottomBarSample() {
Scaffold(
…

Richard Víquez Pérez
- 210
- 2
- 9
3
votes
0 answers
android textview drawable auto mirror not working for RTL support
I have given RTL support to my application for the Arabic language.
everything works fine except one case.
if I used android:drawableRight or android:drawableEnd in my TexView as below.
and icon positions are showing perfect if I enable or disable…

Akash Patel
- 3,091
- 3
- 15
- 23
2
votes
0 answers
How to change layout direction of ConstraintLayout at runtime when `android:supportsRtl="false"` is in the manifest?
Background
I was tasked to work on an app that has android:supportsRtl="false" in its manifest. Not sure why it was set as such, but it seems that in some places the user can choose the direction. Also in some cases it's floating (using…

android developer
- 114,585
- 152
- 739
- 1,270
1
vote
1 answer
IconButton's content are not centered in Jetpack Compose
I am trying to build the following component.
Following is my code,
@Composable
fun View(modifier: Modifier = Modifier){
Row(modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
horizontalArrangement =…

Maryam Memarzadeh
- 176
- 2
- 9
1
vote
1 answer
Notification body/title RTL android
I want to show notification in Arabic, its title and body is set but in Arabic I need to set title and body to RTL?
How I can do that? Please help.

sHiTaLsHiNdE
- 11
- 3
1
vote
2 answers
Android12 -> configuration.setLayoutDirection(new Locale("ar")) not working
It works on other android versions but below code doesn't work on android 12 devices. I use "ar" to language parameter.
val configuration: Configuration =…

Tuncer POLAT
- 11
- 2
1
vote
0 answers
constraint layout direction changes when soft keyboard shows
There is an issue with constraint layout and soft keyboard in my application. I changed layout direction for whole app from style by adding - rtl
inside the default app theme. But this affects the direction…

H00man
- 375
- 1
- 7
- 21
1
vote
1 answer
Set view's direction to the opposite direction of its layout
I Have a Relative layout and its direction based on app language (there are two directions: LTR and RTL), and I have one view (CheckBox) inside that layout.
now I want to make the Checbox direction to the opposite direction to its layout.
Any…

Amr Jyniat
- 345
- 5
- 12
1
vote
1 answer
Changing app locale sometimes doesn't change direction of layouts
I'm changing locale of my app programmatically using the following method. It works fine but when I start an already existing singleTask activity using Intent.FLAG_ACTIVITY_CLEAR_TOP flag. Then application loses the layout direction but translation…

Usman Rana
- 2,067
- 1
- 21
- 32
1
vote
2 answers
Android LayoutDirection set to RTL is not always working
I have Android application for which I need to force the entire app's layout to RTL. I'm doing this by the use of the xml attribute android:layoutDirection="rtl".
It's all working fine until in one of my Activities I need to manually finish() the…

2hamed
- 8,719
- 13
- 69
- 112
0
votes
0 answers
SwiftUI: The Tabview whose indexDisplayMode is never cannot be displayed correctly when there are more than 3 subpages
In order to adapt to Arabic, I need the view to be displayed from right to left.
But in this case, when tabViewStyle is PageTabViewStyle(indexDisplayMode: .never), and there are more than 3 subpages, Tabview cannot switch pages normally.
I switch…

GorCat
- 174
- 3
- 11
0
votes
0 answers
SnackBar Direction in Compose
I implement user interface in Jetpack Compose, and want to show SnackBar inside Compose functions.
the issue is that i can't change SnackBar's Layout Direction to Rtl.
What I've implemented to change the…

Mohammad cs
- 191
- 1
- 10
0
votes
2 answers
Changing Localization programatically during runtime no longer working on pre-Oreo sdk 26 after migrating to androidX
I was able to change localization programatically during runtime using the methods explained in this article. I was able to change the language of the app. + layout direction + toolbar language.
Here's My code:
build.gradle
buildTypes {
…

Mena
- 3,019
- 1
- 25
- 54
0
votes
0 answers
how to Right To Left my menu items in android
I want to make an RTL menu.
I have read this page: Right to left menu items Android
and http://developer.android.com/reference/android/util/LayoutDirection.html#LTR
but they didn't help me.
I have added android:supportsRtl="true" to the manifest…

Mohammad
- 87
- 1
- 9
0
votes
2 answers
Xamarin Android: What is the equivalent code from Java to C#: resource.getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
I'm trying to get the layout direction in Xamarin Android from this java code:
resource.getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
I tried to make this code:
Android.Util.LayoutDirection.Rtl ==…

JotaPardo
- 817
- 9
- 27