Add a DSL to the PHP Finite package, borrowed from the Ruby StateMachine gem.
In your Stateful Class, add the stateMachineConfig() method and call initStateMachine() method at initialization (__contruct() method).
Example
Add a DSL to the PHP Finite package, borrowed from the Ruby StateMachine gem.
In your Stateful Class, add the stateMachineConfig() method and call initStateMachine() method at initialization (__contruct() method).
Example
| private ArrayAdapter<String> getEmailAddressAdapter(Context context) { | |
| Account[] accounts = AccountManager.get(context).getAccountsByType("com.google"); | |
| String[] addresses = new String[accounts.length]; | |
| for (int i = 0; i < accounts.length; i++) { | |
| addresses[i] = accounts[i].name; | |
| } | |
| return new ArrayAdapter<String>(context, android.R.layout.simple_dropdown_item_1line, addresses); | |
| } |