Android Open Source - NerdRoll Main View






From Project

Back to project page NerdRoll.

License

The source code is released under:

Apache License

If you think the Android project NerdRoll 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.bignerdranch.android.nerdroll.view;
//from  www .j a va2 s .  co  m
import android.content.Context;
import android.util.AttributeSet;
import android.widget.FrameLayout;

import com.bignerdranch.android.nerdroll.R;
import com.bignerdranch.android.nerdroll.screen.MainScreen;
import com.bignerdranch.android.nerdroll.util.CanShowScreen;
import com.bignerdranch.android.nerdroll.util.ScreenConductor;

import javax.inject.Inject;

import flow.Flow;
import mortar.Blueprint;
import mortar.Mortar;

public class MainView extends FrameLayout implements CanShowScreen<Blueprint> {

    @Inject MainScreen.Presenter presenter;
    private final ScreenConductor<Blueprint> screenMaestro;

    public MainView(Context context, AttributeSet attrs) {
        super(context, attrs);
        Mortar.inject(context, this);
        screenMaestro = new ScreenConductor<Blueprint>(context, this);
    }

    @Override
    protected void onFinishInflate() {
        super.onFinishInflate();
        presenter.setTitle(getContext().getString(R.string.app_name));
        presenter.takeView(this);
    }

    public Flow getFlow() {
        return presenter.getFlow();
    }

    @Override
    public void showScreen(Blueprint screen, Flow.Direction direction) {
        screenMaestro.showScreen(screen, direction);
    }

}




Java Source Code List

com.bignerdranch.android.nerdroll.ApplicationTest.java
com.bignerdranch.android.nerdroll.ApplicationTest.java
com.bignerdranch.android.nerdroll.MainActivity.java
com.bignerdranch.android.nerdroll.MainActivity.java
com.bignerdranch.android.nerdroll.MainApplicationModule.java
com.bignerdranch.android.nerdroll.MainApplicationModule.java
com.bignerdranch.android.nerdroll.MainApplication.java
com.bignerdranch.android.nerdroll.MainApplication.java
com.bignerdranch.android.nerdroll.android.ActionBarModule.java
com.bignerdranch.android.nerdroll.android.ActionBarOwner.java
com.bignerdranch.android.nerdroll.controller.DieFragment.java
com.bignerdranch.android.nerdroll.controller.DieListFragment.java
com.bignerdranch.android.nerdroll.model.DieList.java
com.bignerdranch.android.nerdroll.model.DieList.java
com.bignerdranch.android.nerdroll.model.Die.java
com.bignerdranch.android.nerdroll.model.Die.java
com.bignerdranch.android.nerdroll.screen.DieListScreen.java
com.bignerdranch.android.nerdroll.screen.DieScreen.java
com.bignerdranch.android.nerdroll.screen.MainScreen.java
com.bignerdranch.android.nerdroll.util.CanShowScreen.java
com.bignerdranch.android.nerdroll.util.FlowOwner.java
com.bignerdranch.android.nerdroll.util.GsonParcer.java
com.bignerdranch.android.nerdroll.util.MainScope.java
com.bignerdranch.android.nerdroll.util.ScreenConductor.java
com.bignerdranch.android.nerdroll.view.DieListView.java
com.bignerdranch.android.nerdroll.view.DieView.java
com.bignerdranch.android.nerdroll.view.MainView.java