Navigation drawer change to rtl programmatically - android

I want to change language and layout/text orientation in my app programmatically.
But navigation drawer doesn't change it's items.
Is it possible?

1)First You have to define android:supportsRtl="true" this line in your application tag in manifest.
and check this link - https://www.androidhive.info/2014/07/android-building-multi-language-supported-app/

Related

how to align pop up menu items to the right and make it rtl?

im new in android development and im working on material design.
i've made a pop up menu in toolbar but i want the item aligned in right because im using a rtl language. How should i do it.
here is s screenshot.screenshot of my app
Have you added the line android:supportsRtl="true" to your AndroidManifest file inside the tag application?
For some reason right-to-left only works for me if I set it to false.
If I set true the right-to-left-language texts are shown right-to-left, but the items in the Menu are left-to-right.

Define different title in menu bar and Homescreen for Activity

In my Android app I'm setting the title for an Activity using android:label in the AndroidManifest.xml. But now I want to display different titles in the Menu Bar (when the app is opened) and for the caption under my icon on the Homescreen. Is there any way to achieve this using xml? Or do I have to set the title for the Startscreen icon in the xml and have to set the title displayed in the ActionBar using Activity.setTitle() ?
The text under the icon on home screen is defined by android:label in <application> element in your manifest xml.
The same android:label exists for each activity in <activity> element. This will set the text in the action bar/title bar for each activity separately.
<application
android:label="#string/home_screen_app_name"
<activity
android:name=".main"
android:label="#string/main_activity_title">
</activity>
</application>
I found a question that does answer mine: How to set different label for launcher rather than activity title? Short, the answer is to set the label attribute in the intent

Android action bar and tabs

I have implemented ActionBar in my app and I have 3 tabs (Fragments) inside the actionbar.
I want to show options (light blue colored bar in screenshot) with some buttons at the bottom of the screen.
Can someone guide me about how to implement this?
Thanks
to display the actionbar menu items at the bottom add to the activity element in the manifest file this attribute
android:uiOptions="splitActionBarWhenNarrow"
example:
<activity
android:name=".HomeScreen"
...
...
android:uiOptions="splitActionBarWhenNarrow">
Ok. I got your question. You can try a tab host for upper tabs and relative layout for the below bar where you can put your stuff.

How place ActionBarSherlock at the bottom?

I'm using ActionBarSherlock and I need to place it at the bottom.
Is there any way to do this?
Can I just set android:gravity="bottom" in style.xml?
Firstly, you cannot change the position of the ActionBarSherlock. It will always be displayed on the top. However, you can easily put your tabs and other contents you add in the ActionBar to be displayed at the bottom.
I also had a similar problem. I solved it by putting android:uiOptions="splitActionBarWhenNarrow" within the <activity> tag.
For example, this worked:
<activity android:name=".my.Activity"
android:uiOptions="splitActionBarWhenNarrow"/>
However, only in portrait mode it will actually show at the bottom of the screen. So, you will have to define your application orientation in the manifest as portrait, otherwise it will again go to the top.

Can I set the item on the top right corner of the ActionBar in the ICS

Can I set the item on the top right of the ActionBar? While Android mustn't allow me to do
what I want to do like the title.However,in my project,the need of it ask me to must do it like that.
Following is my details:
actionbar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS),
"and manifest.xml " android:uiOptions="splitActionBarWhenNarrow"
top PNG is what we discussed about the title issue.
This should be Android IOS's features. When screen is narrow the actionbar will take the bottom of the screen if you set android:uiOptions="splitActionBarWhenNarrow" in manifest file.

Categories

Resources