When you take the Crucible, you’ll write real Android code so your potential employers can can see if you can solve real Android problems like this one:
/**
* The recycler view this adapter binds to is not scrolling smoothly.
*
* TODO Rewrite the code to fix the jank
*
*/
@Override
public void onBindViewHolder(ViewHolder viewHolder, int i) {
//...
User user = mUsers.get(i);
ImageView imageView = viewHolder.mImageView;
if (user.hasFriends()) {
imageView.setImageResource(R.drawable.happy_face);
} else {
imageView.setImageResource(R.drawable.sad_face);
}
//...
}Or this one:
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
FetchFriendsAsyncTask fetchFriendsAsyncTask = new FetchFriendsAsyncTask();
/**
* TODO Tell us what problem this code could cause and why
*
*
*
* TODO Rewrite this code to fix the problem
*/
fetchFriendsAsyncTask.fetchFriends(new FriendFetchRequestCompleteCallback() {
@Override
public void success(List<User> friends) {
}
});
}
}