(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
| import android.app.Activity; | |
| import android.app.Fragment; | |
| import android.app.FragmentManager; | |
| #parse("File Header.java") | |
| public class ${NAME} extends Fragment { | |
| private static final String FRAG_TAG = ${NAME}.class.getCanonicalName(); |
| package util; | |
| import org.apache.commons.lang3.StringUtils; | |
| public class IdNumberValidator { | |
| // Invalid Result is used as a return value when the test fails | |
| private static final IdNumberValidatorResult invalid = new IdNumberValidatorResult(); | |
| public static IdNumberValidatorResult validate(String value) { |
| /* | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2014 Matthieu Harlé | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
| import java.util.concurrent.TimeUnit; | |
| import rx.Observable; | |
| import rx.Subscriber; | |
| public class RetryWhenTests { | |
| public static void main(String[] args) { | |
| Observable.create((Subscriber<? super String> s) -> { |
| public class AccountAuthenticator extends AbstractAccountAuthenticator { | |
| private final Context context; | |
| @Inject @ClientId String clientId; | |
| @Inject @ClientSecret String clientSecret; | |
| @Inject ApiService apiService; | |
| public AccountAuthenticator(Context context) { | |
| super(context); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Время выполнения задания - 4-6 часов.
Необходимо показать умение владением стека технологий: sqlite (sql/contentresolver), json (xml), API (rest), offline mode, git.
| /* | |
| * Copyright 2014 Julian Shen | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| <!-- ... --> | |
| <uses-permission android:name="android.permission.GET_ACCOUNTS" /> | |
| <uses-permission android:name="android.permission.INTERNET" /> | |
| <uses-permission android:name="android.permission.USE_CREDENTIALS" /> | |
| <!-- ... --> |