This file contains hidden or 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 ItemPage : Page() { | |
override fun verify(): Page { | |
Espresso.onView(withId(R.id.productitem_product_name)) | |
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE))) | |
return this | |
} | |
fun withTitle(keyword: String): ItemPage { | |
Espresso.onView(withId(R.id.productitem_product_name)) |
This file contains hidden or 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.SystemClock | |
import androidx.test.espresso.Espresso | |
open class Page { | |
inline fun <reified T : Page> on(): T { | |
// reference: https://blog.kotlin-academy.com/creating-a-random-instance-of-any-class-in-kotlin-b6168655b64a | |
val page = T::class.constructors.first().call() | |
page.verify() | |
return page |
This file contains hidden or 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.bram.demo.test.models.gson | |
import com.google.gson.GsonBuilder | |
import org.junit.Assert | |
import org.junit.Test | |
class GsonKotlinTest { | |
// Data Class + some property has default value = default value doesn't work. | |
data class DataClass1( |
This file contains hidden or 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 com.google.android.youtube.player.YouTubePlayer.OnInitializedListener; | |
public class YouTubeDemoFragment extends android.support.v4.app.Fragment { | |
private YouTubePlayerView mYouTubePlayerView; | |
private Bundle mYouTubePlayerState; | |
private OnInitializedListener mOnYoutubePlayerInitializedListener; | |
@Override | |
public void onCreate(@Nullable Bundle savedInstanceState) { |
This file contains hidden or 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.google.android.youtube.player; | |
public class YouTubePlayerViewUtils { | |
public static YouTubePlayerView createYouTubePlayerView(final Activity activity, | |
final YouTubePlayer.OnInitializedListener initializedListener, | |
final Bundle playerState) { | |
// create YoutubePlayerView by private-package constructor | |
final YouTubePlayerView view = new YouTubePlayerView(context, /*AttributeSet*/ null, /*defStyleAttr*/ 0, | |
new YouTubePlayerView.b() { |
This file contains hidden or 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.google.android.youtube.player; | |
public class YouTubePlayerFragment extends Fragment implements Provider { | |
private final YouTubePlayerFragment.a a = new YouTubePlayerFragment.a((byte)0); | |
private Bundle b; | |
private YouTubePlayerView c; | |
private String d; | |
private OnInitializedListener e; | |
private boolean f; |
This file contains hidden or 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.google.android.youtube.player; | |
public class YouTubeBaseActivity extends Activity { | |
private YouTubeBaseActivity.a a; | |
private YouTubePlayerView b; | |
private Bundle d; | |
public YouTubeBaseActivity() { | |
} |
This file contains hidden or 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.google.android.youtube.player; | |
public final class YouTubePlayerView extends ViewGroup implements Provider { | |
private final YouTubePlayerView.b c; | |
private com.google.android.youtube.player.internal.b d; | |
private View f; | |
private Provider h; | |
private Bundle i; | |
.... |
This file contains hidden or 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
private static class BottomSheetViewPagerListener extends ViewPager.SimpleOnPageChangeListener { | |
private final ViewPager mViewPager; | |
private final ViewPagerBottomSheetBehavior<View> mBehavior; | |
private BottomSheetViewPagerListener(ViewPager viewPager, View bottomSheetParent) { | |
mViewPager = viewPager; | |
mBehavior = ViewPagerBottomSheetBehavior.from(bottomSheetParent); | |
} | |
@Override |
This file contains hidden or 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 android.support.design.widget; | |
import android.support.v4.view.ViewCompat; | |
import android.support.v4.view.ViewPager; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.lang.ref.WeakReference; | |
/** |
NewerOlder