/*
 * Copyright 2014 Uwe Trottmann
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.battlelancer.seriesguide.extensions;

import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import com.battlelancer.seriesguide.R;
import com.battlelancer.seriesguide.ui.BaseActivity;

/**
 * Just hosting a {@link com.battlelancer.seriesguide.extensions.ExtensionsConfigurationFragment}.
 */
public class ExtensionsConfigurationActivity extends BaseActivity {

    public static final int LOADER_ACTIONS_ID = 100;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_extensions_configure);

        if (savedInstanceState == null) {
            ExtensionsConfigurationFragment f = new ExtensionsConfigurationFragment();
            FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
            ft.add(R.id.content_frame, f);
            ft.commit();
        }
    }
}

@@ -719,16 +719,104 @@
 action;%0A
+import com.actionbarsherlock.app.ActionBar;%0Aimport com.actionbarsherlock.view.MenuItem;%0A
 import c
@@ -846,16 +846,16 @@
 uide.R;%0A
-
 import c
@@ -1310,16 +1310,43 @@
 gure);%0A%0A
+        setupActionBar();%0A%0A
         
@@ -1615,24 +1615,24 @@
 t.commit();%0A
-
         %7D%0A  
@@ -1634,11 +1634,499 @@
  %7D%0A    %7D
+%0A%0A    private void setupActionBar() %7B%0A        ActionBar actionBar = getSupportActionBar();%0A        actionBar.setTitle(R.string.action_extensions_configure);%0A        actionBar.setDisplayHomeAsUpEnabled(true);%0A    %7D%0A%0A    @Override%0A    public boolean onOptionsItemSelected(MenuItem item) %7B%0A        int itemId = item.getItemId();%0A        if (itemId == android.R.id.home) %7B%0A            onBackPressed();%0A            return true;%0A        %7D%0A        return super.onOptionsItemSelected(item);%0A    %7D
 %0A%7D%0A

Add title, up affordance to extensions config action bar.