All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.tidalwave.bluebill.mobile.android.taxonomy.factsheet.video.TaxonVideoFactSheetActivity Maven / Gradle / Ivy

/***********************************************************************************************************************
 *
 * blueBill Mobile - open source birdwatching
 * ==========================================
 *
 * Copyright (C) 2009, 2010 by Tidalwave s.a.s. (http://www.tidalwave.it)
 * http://bluebill.tidalwave.it/mobile/
 *
 ***********************************************************************************************************************
 *
 * 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.
 *
 ***********************************************************************************************************************
 *
 * $Id: TaxonVideoFactSheetActivity.java,v bb0b1d9aa693 2010/08/07 23:14:23 fabrizio $
 *
 **********************************************************************************************************************/
package it.tidalwave.bluebill.mobile.android.taxonomy.factsheet.video;

import javax.annotation.Nonnull;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import it.tidalwave.bluebill.mobile.android.R;
import it.tidalwave.bluebill.mobile.android.taxonomy.factsheet.TaxonFactSheetAbstractActivity;
import it.tidalwave.bluebill.mobile.taxonomy.factsheet.TaxonFactSheetUI;
import it.tidalwave.bluebill.mobile.taxonomy.factsheet.VideoNode;
import it.tidalwave.semantic.GenericEntity;
import it.tidalwave.util.DefaultIdentifiable;

/***********************************************************************************************************************
 *
 * @author  Fabrizio Giudici
 * @version $Id: $
 *
 **********************************************************************************************************************/
public class TaxonVideoFactSheetActivity extends TaxonFactSheetAbstractActivity implements TaxonFactSheetUI
  {
    public TaxonVideoFactSheetActivity()
      {
        super(R.layout.taxon_empty_fact_sheet);
//        super(R.layout.taxon_video_fact_sheet);
      }

    /*******************************************************************************************************************
     *
     *
     ******************************************************************************************************************/
    @Override
    public void onCreate (final @Nonnull Bundle savedInstanceState)
      {
        super.onCreate(savedInstanceState);

        if (list != null) // FIXME: temporary until there are mock fact sheets
          {
            list.setOnItemClickListener(new AdapterView.OnItemClickListener() // TODO: pull up
              {
                public void onItemClick (final @Nonnull AdapterView av,
                                         final @Nonnull View view,
                                         final int index,
                                         final long id)
                  {
                    final VideoNode node = (VideoNode)controller.getNode(index);
                    final GenericEntity temp = new GenericEntity(new DefaultIdentifiable(node.getMovie().getId()));
                    controller.goToPage(temp);
    //                final Media media = controller.getMedia(index);
    //                controller.getDefaultAction(media).run(controller, media);
                  }
              });
          }
      }

    /*******************************************************************************************************************
     *
     *
     ******************************************************************************************************************/
    @Override
    protected TaxonVideoFactSheetAndroidController createController()
      {
        return new TaxonVideoFactSheetAndroidController(this, taxon, factSheetProvider);
      }
  }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy