I have two languages in my app, English and Urdu. When the language is changed to Urdu home up button changes its direction like this:
Please help me how can I fix this issue. I want arrow direction to be on left side
To support right to left screen layout, you have to android:supportsRtl="true" line in your manifest.xml For example:
<application
android:name=".Application"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
>
After writing this tag, the arrow button will appear on the right and other icons on the left.
For more information, see this post.
There is not issue and supportsRtl.
Because if
android:supportsRtl="true"
then view display from right-hand-side.
If false then it'll display as it is.
Can i have your manifest application tag and style which used there?
Related
Everything is okay on the main screen.
Image
But something goes wrong in the "running apps" screen.
Image
I tried to change both android:icon and android:logo but that didn't work.
Set the icon.
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
If it doesn't work, try to reboot your phone.
Try to add this to your manifest:
android:roundIcon="#mipmap/your_icon_image"
I've disabled and forced my application to not support rtl . Because it made lots of problems of views and layouts , this is my manifest code:
<application
android:name="ir.dizbon.persiandesigners.ParseApplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="false"
android:theme="#style/AppTheme"
tools:replace="android:supportsRtl">
in one layout I add this code :
android:layoutDirection="rtl"
When I remove the manifest code ,the layout change the direction and works fine but I can't remove manifest codes .
I tried to change the direction pragmatically:
pass_l.setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
it doesn't work either .
How can I make my view to support rtl and get rtl ?
You can create different layout in android studio to support rtl.
Right click layout -> New -> Layout Resource File -> then choose Layout Direction Qualifier.
I'm new to android and i want to translate an app. to arabic and force RTL direction.
If anyone can help please.
Thank you
If you want to support Arabic for your app, follow the below steps :
1) Create resource file (res/values-ar/strings.xml) and put your content.
2) Mostly supportsRTl set as true. Check once in Manifest file.
Example:Creating Arabic resource file
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
3) Test it in your device by doing below settings changes :
Select locale(Arabic) in language option
"Force RTL layout direction" in Developer option.
Note : Developer option will be enabled once you select build number 7 times. (inside Settings/ About Phone)
You can find simple example in below link:
https://www.tutorialspoint.com/android/android_localization.htm
My default NumberPicker looks like this:
I want it to look more like this:
I'm not married to the +/- thing, but I want a smaller widget that can fit on a screen along with other stuff. My understanding is that setting the theme in the Manifest to one based on Theme will do the trick, but no joy. Here is my Manifest entry:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/android:Theme.Holo.Light" >
I am using Android 4.3 platform and API 18 on my ADV.
What am I doing wrong?
Thanks.
I hope that makes sense...
Basically when the on screen keyboard appears and then the auto suggestions as well, it pushes my view up the screen - a graphic in an imageView that I would like to persist.
When the auto complete is over and done with, the screen stays where is is despite the auto suggest disappearing.
Is there any way to let my layout reclaim that space and simply go back down again into the empty space ? ie to float back down again ?
Cheers :)
If I got you right, try adding the following line to the <activity> in your manifest:
<application
android:icon="#drawable/icon"
android:label="#string/app_name">
<activity
...
android:windowSoftInputMode="adjustPan"
...>
...
</activity>
...
</application>