Android Open Source - sqlite-provider Find Three Fireworks Activity

From Project

Back to project page sqlite-provider.


The source code is released under:

Apache License

If you think the Android project sqlite-provider listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.novoda.sqliteprovider.demo.ui;
//from ww w. j ava2 s. c om
import android.content.Intent;
import android.os.Bundle;

import com.novoda.sqliteprovider.demo.domain.Firework;
import com.novoda.sqliteprovider.demo.domain.Shop;
import com.novoda.sqliteprovider.demo.domain.UseCaseFactory;
import com.novoda.sqliteprovider.demo.ui.base.NovodaActivity;

import java.util.List;

public class FindThreeFireworksActivity extends NovodaActivity {

    private static final int LIMIT = 3;

    protected void onCreate(Bundle savedInstanceState) {

        List<Firework> fireworks = getApp().getFireworkReader().getLimitedNumberOfFireworks(LIMIT);

        Shop shop = new Shop("3 Fireworks", "List below is limited to first 3 results", fireworks);


    private void view(Shop shop) {
        Intent intent = new Intent(this, ViewShopActivity.class);
        intent.putExtra(ViewShopActivity.EXTRA_SHOP, shop);
        intent.putExtra(ViewShopActivity.EXTRA_INFO, UseCaseFactory.UseCase.LIMIT);

Java Source Code List