This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package is.shortcut; | |
import android.content.Context; | |
import android.content.res.Resources; | |
import android.content.res.XmlResourceParser; | |
import android.util.AttributeSet; | |
import android.util.Xml; | |
import android.view.*; | |
import android.widget.*; | |
public final class CompiledView { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
starts = set() | |
completes = set() | |
with open('logs.txt','r') as logs: | |
for log in logs: | |
log = log.strip() | |
if not log.startswith('com'): | |
continue | |
tokens = log.rsplit(' ', 1) | |
test = tokens[0] | |
status = tokens[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Test Logging | |
tasks.withType(Test) { | |
testLogging { | |
events "started", "passed", "skipped", "failed" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Bundle | |
import androidx.fragment.app.Fragment | |
import androidx.fragment.app.activityViewModels | |
import androidx.fragment.app.viewModels | |
import androidx.lifecycle.AbstractSavedStateViewModelFactory | |
import androidx.lifecycle.SavedStateHandle | |
import androidx.lifecycle.ViewModel | |
import androidx.lifecycle.ViewModelProvider | |
import androidx.savedstate.SavedStateRegistryOwner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DelegatingLayout extends FrameLayout { | |
private boolean mIsDelegating; | |
private ViewGroup mDelegateView; | |
private int[] mOriginalOffset = new int[2]; | |
@Override | |
public boolean dispatchTouchEvent(MotionEvent ev) { | |
// Clear delegating flag on touch start/end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserPushSettingsSyncWorkerTest : DonkeyTestCase() { | |
@get:Rule | |
var rxRule = RxJavaTestSchedulerRule() | |
@Mock | |
lateinit var fetcher: MediumServiceProtos.ObservableMediumService | |
@Mock | |
lateinit var notificationManager: NotificationManager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.junit.rules.TestRule; | |
import org.junit.runner.Description; | |
import org.junit.runners.model.Statement; | |
import io.reactivex.android.plugins.RxAndroidPlugins; | |
import io.reactivex.plugins.RxJavaPlugins; | |
import io.reactivex.schedulers.TestScheduler; | |
/** | |
* Created by davidliu on 6/5/17. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.annotation.Nullable; | |
import io.reactivex.ObservableTransformer; | |
import lombok.AccessLevel; | |
import lombok.AllArgsConstructor; | |
import lombok.Getter; | |
import lombok.ToString; | |
import retrofit2.HttpException; | |
import retrofit2.Response; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LocalProfileAPI implements ProfileAPI { | |
public Profile retrieveProfile() { | |
/*... retrieve from DB or something ...*/ | |
return new Profile(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.design.widget.CoordinatorLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_height="match_parent" | |
android:layout_width="match_parent"> | |
<android.support.design.widget.AppBarLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" |
NewerOlder