1

I can increase the ActionBar's height to its double size (by Default is action_bar_default_height = 48dp standard ActionBarSize), so, 96dp but the Icons of my ActionBarare just as little as with standard height.

In order to acquire a better understanding, I illustrate with a Picture.enter image description here

Can anyone tell me, why I get left Icons properly but the associated Icons to Actions not? How could I solve it?

That's my code

First, I define the proper ActionBarSize Height and set the proper Size through Themes-Styles of my Activity in my styles.xml like this

<style name="Theme.ActionBarSize" parent="android:Theme.Holo.Light">
    <item name="android:actionBarSize">96dp</item>
</style>

Second, I declare that Theme in the proper Activity in my Manifest File

    <activity android:name="com.nutiteq.advancedmap.activity.WmsMapActivity"
        android:theme="@style/Theme.ActionBarSize" >

Third, I create an ActionBar Instance and I initialize it properly in onCreate Method of my Activity

    ...
    ActionBar actionBar  = getActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setHomeButtonEnabled(true);
    actionBar.show();
    ...

Fourth and last one, I inflate the associated Action-Items of ActionBar in onCreateOptions(...) Method like this

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();

    inflater.inflate(R.menu.wms_context_menu, menu);

    return true;        
}

My ActionBar Items are defined in the file wms_menu.xml which looks like as follows

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:id="@+id/videonotes"   
        android:showAsAction="ifRoom"
        android:title="@string/vid_description"
        android:icon="@drawable/ic_action_video_96" >        
    </item>     
    <item android:id="@+id/textnotes"  
        android:showAsAction="ifRoom"
        android:title="@string/txt_description"
        android:icon="@drawable/ic_action_edit_96" >        
    </item>
    <item android:id="@+id/picnotes"  
        android:showAsAction="ifRoom"
        android:title="@string/pic_description"
        android:icon="@drawable/ic_action_camera_96" >        
    </item> 
    <item android:id="@+id/audionotes"  
        android:title="@string/aud_description" 
        android:showAsAction="ifRoom"
        android:icon="@drawable/ic_action_pic_96">        
    </item>           
    <item android:id="@+id/right_drawer"  
        android:title="@string/right_slide_description" 
        android:showAsAction="ifRoom"
        android:icon="@drawable/ic_drawer_96" >       
    </item>                

</menu>
Gödel77
  • 839
  • 3
  • 15
  • 27

0 Answers0