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
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" |
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 com.test.scrollviewrecyclerview | |
import android.os.Bundle | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.recyclerview.widget.LinearLayoutManager | |
import androidx.recyclerview.widget.RecyclerView | |
import kotlinx.android.synthetic.main.activity_main.* | |
import kotlin.random.Random |
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 MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
val intent = Intent(Intent.ACTION_OPEN_DOCUMENT) | |
intent.type = "*/*" | |
intent.addCategory(Intent.CATEGORY_OPENABLE) | |
startActivityForResult(intent, 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
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
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
class UserPushSettingsSyncWorkerTest : DonkeyTestCase() { | |
@get:Rule | |
var rxRule = RxJavaTestSchedulerRule() | |
@Mock | |
lateinit var fetcher: MediumServiceProtos.ObservableMediumService | |
@Mock | |
lateinit var notificationManager: NotificationManager |
OlderNewer