Skip to content

Instantly share code, notes, and snippets.

View AmarpreetSingh18's full-sized avatar

Amarpreet Singh AmarpreetSingh18

View GitHub Profile
@kamikat
kamikat / layout.xml
Last active September 1, 2021 17:40
NestedScrollView + SwipeRefreshLayout + RecyclerView
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/refreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
@chittaranjan-khuntia
chittaranjan-khuntia / CustomScrollView.java
Last active May 17, 2021 06:58
How to disable or enable Scrolling in android ScrollView
import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.widget.ScrollView;
public class LockableScrollView extends ScrollView {
// true if we can scroll (not locked)
@Mariovc
Mariovc / ShareUtils.java
Last active June 9, 2023 17:24
Utility to share text and url on Facebook, Twitter and Whatsapp
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
@andraskindler
andraskindler / ApiManager.java
Created April 12, 2014 23:23
SwipeRefreshLayout example
package com.andraskindler.sandbox.activity;
import retrofit.RestAdapter;
import retrofit.http.GET;
import retrofit.http.Query;
import rx.Observable;
import rx.Subscriber;
import rx.schedulers.Schedulers;
public class ApiManager {