2

I'm using android toolbar for my application actionbar. It has an action button which has 2 MenuItems like this:

enter image description here

Now I'm trying to change the style of the MenuItems to represent something like the following:

enter image description here

But I can only change the textColor and font by using this style as my toolbar's theme android:theme="@style/AppTheme.ActionBar":

<style name="AppTheme.ActionBar" parent="AppTheme">

    <item name="android:fontFamily">@font/my_font</item>
    <item name="android:textColor">@color/White</item>

</style>

How can I change the gravity of the text to stick to the end of the line ?

I tried these on my style and no success:

<item name="android:gravity">end</item>
<item name="android:layout_gravity">end</item>
<item name="android:gravity">right</item>
<item name="android:layout_gravity">right</item>

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.