package net.grandcentix.thirtyinch.sample;

import com.jakewharton.rxbinding.view.RxView;

import net.grandcentrix.thirtyinch.Presenter;
import net.grandcentrix.thirtyinch.android.ThirtyInchActivity;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.widget.Button;
import android.widget.TextView;

import rx.Observable;

public class HelloWorldActivity extends ThirtyInchActivity<HelloWorldView>
        implements HelloWorldView {

    private Button mButton;

    private TextView mOutput;

    private TextView mUptime;

    @Override
    public Observable<Void> onButtonClicked() {
        return RxView.clicks(mButton);
    }

    @Override
    public void showPresenterUpTime(final Long uptime) {
        mUptime.setText(String.format("Presenter alive fore %ss", uptime));
    }

    @Override
    public void showText(final String text) {
        mOutput.setText(text);
    }

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

        mButton = (Button) findViewById(R.id.button);
        mOutput = (TextView) findViewById(R.id.output);
        mUptime = (TextView) findViewById(R.id.uptime);
    }

    @NonNull
    @Override
    protected Presenter<HelloWorldView> providePresenter(
            @NonNull final Bundle activityIntentBundle) {
        return new HelloWorldPresenter();
    }

    @NonNull
    @Override
    protected HelloWorldView provideView() {
        return this;
    }
}

@@ -88,54 +88,8 @@
 w;%0A%0A
-import net.grandcentrix.thirtyinch.Presenter;%0A
 impo
@@ -147,16 +147,16 @@
 tivity;%0A
+
 %0Aimport 
@@ -362,16 +362,37 @@
 ctivity%3C
+HelloWorldPresenter, 
 HelloWor
@@ -627,32 +627,193 @@
 Button);%0A    %7D%0A%0A
+    @NonNull%0A    @Override%0A    public HelloWorldPresenter providePresenter(final Bundle activityIntentBundle) %7B%0A        return new HelloWorldPresenter();%0A    %7D%0A%0A
     @Override%0A  
@@ -1331,24 +1331,24 @@
 id.output);%0A
+
         mUpt
@@ -1402,200 +1402,8 @@
  %7D%0A%0A
-    @NonNull%0A    @Override%0A    protected Presenter%3CHelloWorldView%3E providePresenter(%0A            @NonNull final Bundle activityIntentBundle) %7B%0A        return new HelloWorldPresenter();%0A    %7D%0A%0A
     

Update sample for static presenter typing