Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import com.groupon.grox.Store;
import com.groupon.grox.commands.rxjava1.Command;
import com.groupon.grox.sample.rx.R;
import rx.subscriptions.CompositeSubscription;
public class LoginActivity extends AppCompatActivity {
private LoginStateModel initialState = LoginStateModel.builder()
private Store<LoginStateModel> store = new Store<>(initialState);
private CompositeSubscription subscription = new CompositeSubscription();
private LoginApiClient loginApiClient;
protected void onCreate(Bundle savedInstanceState) {
final View loginButton = findViewById(;
final EditText username = (TextView) findViewById(;
final EditText password = (TextView) findViewById(;
loginButton.setOnClickListener(v -> {
subscription.add(new LoginCommand(username.getText(), password.getText(), loginApiClient)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.