Build "Sources for Android 28" so you can comfortably browse the Android API source in Android Studio.
- Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base
Build "Sources for Android 28" so you can comfortably browse the Android API source in Android Studio.
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base
cat less ~/.android/avd/Nexus_5X_API_24.avd/config.ini | |
cat: less: No such file or directory | |
AvdId=Nexus_5X_API_24 | |
PlayStore.enabled=false | |
abi.type=armeabi-v7a | |
avd.ini.displayname=Nexus 5X API 24 | |
avd.ini.encoding=UTF-8 | |
disk.dataPartition.size=800M | |
fastboot.chosenSnapshotFile= | |
fastboot.forceChosenSnapshotBoot=no |
Observable<DownloadState> observable = | |
Observable.interval(PROGRESS_INTERVAL_MILLIS, TimeUnit.MILLISECONDS) | |
.flatMap(new Function<Long, ObservableSource<DownloadState>>() { | |
@Override | |
public ObservableSource<DownloadState> apply(Long aLong) throws Exception { | |
DownloadManager.Query query = new DownloadManager.Query(); | |
query.setFilterById(downloadId); | |
Cursor cursor = getDownloadManager().query(query); | |
if (!cursor.moveToFirst()) { | |
cursor.close(); |
@Implements(com.devbrackets.android.exomedia.EMVideoView.class) | |
public class ShadowEMVideoView extends ShadowRelativeLayout { | |
public static final int STOP = 0; | |
public static final int START = 1; | |
public static final int SUSPEND = 2; | |
public static final int PAUSE = 3; | |
private int currentState = -1; | |
private int prevState; |
def toCamelCase(String string) { | |
String result = "" | |
string.findAll("[^\\W]+") { String word -> | |
result += word.capitalize() | |
} | |
return result | |
} | |
afterEvaluate { project -> | |
Configuration runtimeConfiguration = project.configurations.getByName('compile') |
public void scrollToPosition(ListView lv, int position, boolean clipToPadding) { | |
scrollToPositionFromTop(lv, position, 0, clipToPadding); | |
} | |
public void scrollToPositionFromTop(ListView lv, int item, int y, boolean clipToPadding) { | |
//Had to apply this offset if clipToPadding="false" | |
if (!clipToPadding) { | |
item -= lv.getPaddingTop(); | |
} | |
this.setSelectionFromTop(position, y); |