Skip to content

Instantly share code, notes, and snippets.

@tobiasschuerg
tobiasschuerg / FilteredArrayAdapter.java
Created August 31, 2012 15:08
Android Arrayadapter with text filtering for the use with a TextWatcher.
/**
* Arrayadapter (for Android) with text filtering for the use with a TextWatcher.
* Note: the objects in the List need a valid toString() method.
* @author Tobias Schürg
*
*/
public class FilteredArrayAdapter extends ArrayAdapter<ImageObject> {
@guille150
guille150 / gist:9351857
Created March 4, 2014 17:50
Importar script Sqlite Android
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
public class AssetDatabaseOpenHelper {
@imminent
imminent / Api.java
Last active June 13, 2023 02:50
Call retrying with Retrofit 2.0
package com.example.api;
import java.util.Map;
import retrofit.Call;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
public interface Api {
@pallavahooja
pallavahooja / APIHelper.java
Last active November 9, 2020 16:48
Retrofit Retry
package app.goplus.in.v2.network;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
/**
* Created by pallavahooja on 16/05/16.
*/
public class APIHelper {
@XFY9326
XFY9326 / ComposeVerticalScrollBar.kt
Created March 25, 2022 11:59
Jetpack Compose VerticalScrollBar for Android
// Reference: https://stackoverflow.com/questions/66341823/jetpack-compose-scrollbars/68056586#68056586
// Modify: LazyListState -> ScrollState
fun Modifier.verticalScrollbar(
scrollState: ScrollState,
scrollBarWidth: Dp = 4.dp,
minScrollBarHeight: Dp = 5.dp,
scrollBarColor: Color = Color.Blue,
cornerRadius: Dp = 2.dp
): Modifier = composed {