/* Block comment */
import java.util.Date;
/**
* Doc comment here for <code>SomeClass</code>
* @see Math#sin(double)
*/
@Annotation (name=value)
public class SomeClass<T extends Runnable> { // some comment
private T field = null;
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.thuytrinh.cardselectordemo; | |
import android.os.Bundle; | |
import android.support.v4.view.PagerAdapter; | |
import android.support.v4.view.ViewPager; | |
import android.support.v4.view.ViewPager.OnPageChangeListener; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ImageView; | |
import android.app.Activity; |
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.content.Context; | |
import android.support.v4.widget.SwipeRefreshLayout; | |
import android.util.AttributeSet; | |
import se.emilsjolander.stickylistheaders.StickyListHeadersListView; | |
public class CustomSwipeRefreshLayout extends SwipeRefreshLayout { | |
/** | |
* A StickyListHeadersListView whose parent view should be this SwipeRefreshLayout |
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.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.AbsListView; | |
import se.emilsjolander.stickylistheaders.StickyListHeadersListView; | |
public class RequestMoreListView extends StickyListHeadersListView implements AbsListView.OnScrollListener { | |
private OnRequestMoreListener mOnRequestMoreListener; | |
private boolean mIsRequesting; |
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 ParcelableModelTest extends TestCase { | |
public void testShouldParcelProperly() { | |
/* Prepare data */ | |
ParcelableModel expectedModel = new ParcelableModel(); | |
expectedModel.setProperty0(123); | |
expectedModel.setProperty1("LOL"); | |
/* Perform parcelling */ |
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.view.View; | |
import android.widget.AbsListView; | |
public abstract class OnVerticalScrollDirectionListener implements AbsListView.OnScrollListener { | |
/** | |
* TODO: Make it changeable | |
*/ | |
public static final int DEFAULT_SCROLL_OFFSET_THRESHOLD = 6; /* In pixels */ |
- Tại sao nói "On the other hand, black box tests can bring more value than white box tests."? Có những ví dụ cụ thể nào để chứng minh điều này?
- Tại sao mình phải measure test coverage?
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 com.google.android.gms.maps.model.UrlTileProvider; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
public class MapBoxTileProvider extends UrlTileProvider { | |
private String mBaseTileUrl; | |
private String mMapId; | |
private String mAccessToken; |
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.database.Cursor; | |
import java.util.Iterator; | |
public class IterableCursor implements Iterable<Cursor> { | |
private Cursor cursor; | |
public IterableCursor(Cursor cursor) { | |
this.cursor = cursor; | |
this.cursor.moveToPosition(-1); |
Observable.from(Arrays.array(1, 2, 3, 4, 5))
.groupBy(new Func1<Integer, Boolean>() {
@Override
public Boolean call(Integer number) {
return number % 2 == 0;
}
})
.flatMap(new Func1<GroupedObservable<Boolean, Integer>, GroupedObservable<Boolean, Integer>>() {
@Override
OlderNewer