title: Two action bars (Bottom and Up) at the same time?
body: <p>I have need to make two action bars , I am using actionBarSherlock by the way . So what I need exactly is to put a "Welcome screen" toggle on the normal action bar up , and add two normal ActionBar Action options . Similar to what I need are Gmail and Maps like here : <a href="http://cdn.androidcommunity.com/wp-content/uploads/2012/03/Screenshot_2012-03-28-12-58-16.png" rel="nofollow noreferrer">http://cdn.androidcommunity.com/wp-content/uploads/2012/03/Screenshot_2012-03-28-12-58-16.png</a> (They didn't allow me to post an image for reputation is low , see the link please)</p>
  
  <p>This Maps app has an upper and bottom action bar , exactly what I need , because once I reach the point where I can add the second actionbar I know where to start ... </p>
  
  <p>I have searched for about a week about this topic and I have found a few similar questions , but however I have understood non of the answers ; the answers were about a custom view which I am not (at all) familiar with and I can't understand a thing , but yes I tried to make a "custom view" from whatever I thought is right and I got crrassshheesss which I didn't find any solution for ... If you may plz show me as an example this Maps app how is it using those two action bars ?? (I don't want to navigate like in maps and gmail , but only the two actionbars)</p>
  
  <p>Here is some of my code :</p>
  
  <pre><code>//Part of my MainActivity.class
  public boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) {
          MenuInflater inf = getSupportMenuInflater();
          inf.inflate(R.menu.upper_navbar, menu);
  
          final String name = "welcome";
          final SharedPreferences pref = getSharedPreferences(name, 0);
          final Editor edit = pref.edit();
          boolean oldState = pref.getBoolean("w", true);
          ToggleButton tog = (ToggleButton) menu.findItem(R.id.welcome_screen).getActionView();
          if(oldState){
              tog.setChecked(true);
  
          }else{
              tog.setChecked(false);
          }
  
          tog.setOnCheckedChangeListener(new OnCheckedChangeListener() {
  
  
  
              @Override
              public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                  if(isChecked){
                      edit.putBoolean("w", true);
                      edit.apply();
                  }else{
                      edit.putBoolean("w", false);
                      edit.apply();
                  }
  
  
              }
          });
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
  
      return super.onOptionsItemSelected(item);
      }
  </code></pre>
  
  <p>My Manifest :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="seaskyways.editpad"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="9"
          android:targetSdkVersion="16" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:name="android.app.Application"
          android:icon="@drawable/ic_launcher"
          android:uiOptions="splitActionBarWhenNarrow"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name="seaskyways.editpad.MainActivity"
              android:label="MainActivity" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity
              android:name="seaskyways.editpad.Splash"
              android:theme="@style/Theme.Sherlock.Dialog.NoActionBar"
  
  
              android:label="Splash" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.SPLASH" /&gt;
  
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>And my menus which I intend to put them in my action bars ...</p>
  
  <p>menu\activity_main.xml</p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
  
      &lt;item android:id="@+id/bottom_copy"  android:title="Copy" android:orderInCategory="3" android:showAsAction="ifRoom|withText" /&gt;
      &lt;item android:id="@+id/bottom_paste" android:title="Paste" android:orderInCategory="2" android:showAsAction="ifRoom|withText" /&gt;
  
  &lt;/menu&gt;
  </code></pre>
  
  <p>menu\upper_navbar.xml (Should have named it upper_actionbar but its just a thinking mistake , its a name afterall , :/ plz proceed )</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;menu xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
       &lt;item
          android:id="@+id/welcome_screen"
          android:orderInCategory="1"
          android:showAsAction="ifRoom|withText"
          android:title="Welcome Screen"
          android:actionLayout="@layout/toggle"
  
          /&gt;
  
  &lt;/menu&gt;
  </code></pre>
  
  <p>If you need anymore info please tell me , I will tell , its for me and everyone else afterall !</p>
  
  <p><strong><em>EDIT !!! :</em></strong> I found a much near example to my question , the wifi settings (<a href="http://omgdroid.com/wp-content/uploads/2012/07/Screenshot_2012-07-06-01-34-29-576x1024.png" rel="nofollow noreferrer">http://omgdroid.com/wp-content/uploads/2012/07/Screenshot_2012-07-06-01-34-29-576x1024.png</a>)   It uses a switch in the normal actionbar and a normal split actionbar down ! Exactly what I need !</p>
  
  <p><strong><em>EDIT 2 !!!!</em></strong> : Here is a screenshot from my Galaxy nexus using a custom ROM based over aosp , This is exactly what I need and mean : </p>
  
  <p>Settings-Wifi: <a href="https://lh4.googleusercontent.com/-aeL_sHjIcQQ/UPVptGQiuqI/AAAAAAAAAGE/UGc-CuLP4Qw/s512/Screenshot_2013-01-15-16-36-32.png" rel="nofollow noreferrer">https://lh4.googleusercontent.com/-aeL_sHjIcQQ/UPVptGQiuqI/AAAAAAAAAGE/UGc-CuLP4Qw/s512/Screenshot_2013-01-15-16-36-32.png</a></p>
  
  <p>Settings-Bluetooth: lh3*googleusercontent.com/-4j6ca1Nm1VI/UPVqAiDn_PI/AAAAAAAAAGM/LLB2ILWVjQY/s512/Screenshot_2013-01-15-16-38-14.png</p>
  
  <p><strong><em>EDIT 3 !!!</em></strong> : Big progress in my investigation in the Bluetooth and Wifi , and as I said and asked , they were true actionbars ! see what I got in Settings-Bluetooth:</p>
  
  <p>BluetoothSettings.class/onCreateOptionsMenu :</p>
  
  <pre><code>@Override
      public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
          if (mLocalAdapter == null) return;
          boolean bluetoothIsEnabled = mLocalAdapter.getBluetoothState() == BluetoothAdapter.STATE_ON;
          boolean isDiscovering = mLocalAdapter.isDiscovering();
          int textId = isDiscovering ? R.string.bluetooth_searching_for_devices :
              R.string.bluetooth_search_for_devices;
          menu.add(Menu.NONE, MENU_ID_SCAN, 0, textId)
                  .setEnabled(bluetoothIsEnabled &amp;&amp; !isDiscovering)
                  .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
          menu.add(Menu.NONE, MENU_ID_RENAME_DEVICE, 0, R.string.bluetooth_rename_device)
                  .setEnabled(bluetoothIsEnabled)
                  .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
          menu.add(Menu.NONE, MENU_ID_VISIBILITY_TIMEOUT, 0, R.string.bluetooth_visibility_timeout)
                  .setEnabled(bluetoothIsEnabled)
                  .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
          menu.add(Menu.NONE, MENU_ID_SHOW_RECEIVED, 0, R.string.bluetooth_show_received_files)
                  .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
          super.onCreateOptionsMenu(menu, inflater);
      }
  </code></pre>
  
  <p>These can be options are clearly shown in the splitActionBarDown with the exact properties up ...</p>
  
  <p>now :</p>
  
  <p>BluetoothSettings.class/addPreferencesForActivity :</p>
  
  <pre><code>@Override
      void addPreferencesForActivity() {
          addPreferencesFromResource(R.xml.bluetooth_settings);
  
          Activity activity = getActivity();
  
          Switch actionBarSwitch = new Switch(activity);
  
          if (activity instanceof PreferenceActivity) {
              PreferenceActivity preferenceActivity = (PreferenceActivity) activity;
              if (preferenceActivity.onIsHidingHeaders() || !preferenceActivity.onIsMultiPane()) {
                  final int padding = activity.getResources().getDimensionPixelSize(
                          R.dimen.action_bar_switch_padding);
                  actionBarSwitch.setPadding(0, 0, padding, 0);
                  activity.getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
                          ActionBar.DISPLAY_SHOW_CUSTOM);
                  activity.getActionBar().setCustomView(actionBarSwitch, new ActionBar.LayoutParams(
                          ActionBar.LayoutParams.WRAP_CONTENT,
                          ActionBar.LayoutParams.WRAP_CONTENT,
                          Gravity.CENTER_VERTICAL | Gravity.END));
              }
          }
  
          mBluetoothEnabler = new BluetoothEnabler(activity, actionBarSwitch);
  
          setHasOptionsMenu(true);
      }
  </code></pre>
  
  <p>Noting that this class isn't extending Activity , it <code>extends DeviceListPreferenceFragment</code> ...</p>
  
  <p>Now that we know <strong>it's possible</strong> to have two actionbars(split and normal) in the same time , we need a way to simplify that , maybe by a class or library ??</p>