Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version
This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.
| package com.filipkowicz.headeritemdecorator | |
| /* | |
| solution based on - based on Sevastyan answer on StackOverflow | |
| changes: | |
| - take to account views offsets | |
| - transformed to Kotlin | |
| - now works on viewHolders |
| #!/usr/bin/env bash | |
| # I've found that the "Migrate to AndroidX" converter in Android Studio doesn't work very | |
| # well, so I wrote my own script to do the simple job of converting package names. | |
| # | |
| # You can download a CSV of package names here: https://developer.android.com/topic/libraries/support-library/downloads/androidx-class-mapping.csv | |
| # | |
| # It'll run faster on a clean build because then there are fewer files to scan over. | |
| # | |
| # Uses `gsed` because I'm on a Mac. Can easily replace with `sed` if you don't have `gsed`. |
Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version
This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.
| import java.io.IOException; | |
| import okhttp3.HttpUrl; | |
| import okhttp3.Interceptor; | |
| import okhttp3.OkHttpClient; | |
| import okhttp3.Request; | |
| /** An interceptor that allows runtime changes to the URL hostname. */ | |
| public final class HostSelectionInterceptor implements Interceptor { | |
| private volatile String host; |
Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo| //based on http://stephendnicholas.com/archives/974 | |
| package it.my.app; | |
| import android.content.ContentProvider; | |
| import java.io.File; | |
| import java.io.FileNotFoundException; | |
| import android.content.ContentProvider; | |
| import android.content.ContentValues; | |
| import android.content.UriMatcher; |
To remove a submodule you need to:
| git stash show -p stash@{0} > Stash0.patch |
| <?xml version="1.0" encoding="utf-8"?> | |
| <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
| <item> | |
| <shape | |
| android:shape="rectangle"> | |
| <!-- Set the border color of your layout here --> | |
| <stroke android:width="1dp" android:color="#3AFB03" /> | |
| <solid android:color="#3AFB03" /> | |
| </shape> |