Skip to content

Instantly share code, notes, and snippets.

@aubryll
aubryll / ListAdapterWithHeader.java
Created November 24, 2019 21:02
This is the Java version of NickHolcombe's ListAdapterWithHeader which was originally wrote in Kotlin, after spending countless hours online looking for a way to add a header to my PagedListAdapter I finally found a solution https://gist.github.com/NickHolcombe/0e1c27892d6b73271f10e12268f40187 except it was in Kotlin, I managed to rewrite it in …
import androidx.recyclerview.widget.AsyncDifferConfig;
import androidx.recyclerview.widget.AsyncListDiffer;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.ListUpdateCallback;
import androidx.recyclerview.widget.RecyclerView;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
@aubryll
aubryll / Private route usage
Created August 2, 2020 08:45
Keycloak react private route that accepts a route with params, possible answer to this question https://github.com/the-glue/react-router-keycloak/issues/7
<PrivateRoute exact path="/props-through-render" render={(props) => <PropsPage {...props} title={`Props through render`} />} />