/* * * * Copyright (C) 2012 Ignacio Gonzalez Sainz * * * * Holy Week Guide: An android application with the itineraries, images and all information of the brotherhoods Spain's holy week * * * * 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. * * * * Ignacio Gonzalez Sainz * * Cádiz (Spain) * * ignacio.glez.s@gmail.com * * * */ package com.ignaciogs.semanasanta; import android.os.Bundle; import android.widget.TextView; import com.actionbarsherlock.app.SherlockActivity; import com.actionbarsherlock.view.MenuItem; public class ReleasesActivity extends SherlockActivity { public static final String KEY_OBJECT = "KEY_OBJECT"; private Cofradia currentCofradia; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.releases_activity); Bundle extras = getIntent().getExtras(); if (extras != null && extras.containsKey(KEY_OBJECT) && extras.get(KEY_OBJECT) instanceof Cofradia) { currentCofradia = (Cofradia) extras.get(KEY_OBJECT); ((TextView) findViewById(R.id.releases_tv_text)).setText(currentCofradia.getMoreData()); } getSupportActionBar().setTitle(currentCofradia.getNombre_corto()); getSupportActionBar().setDisplayHomeAsUpEnabled(true); } @Override public boolean onMenuItemSelected(int featureId, MenuItem item) { boolean result = false; switch (item.getItemId()) { case android.R.id.home: finish(); break; } return result; } }