Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
What goes around, comes around

Sheeraz Ahmed Memon sheerazam

💭
What goes around, comes around
  • Lakson Group
  • Pakistan
View GitHub Profile
@sheerazam
sheerazam / BaseUITest.kt
Last active Mar 25, 2021
End to End Test using MockWebserver
View BaseUITest.kt
import androidx.test.platform.app.InstrumentationRegistry
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.koin.core.context.stopKoin
import org.koin.test.KoinTest
import java.io.BufferedReader
import java.io.Reader
abstract class BaseUITest : KoinTest {
@sheerazam
sheerazam / ScrollAwareFABBehavior.java
Last active Oct 19, 2016
Creating Scroll Aware Fab
View ScrollAwareFABBehavior.java
public class ScrollAwareFABBehavior extends FloatingActionButton.Behavior {
private static final Interpolator INTERPOLATOR = new FastOutSlowInInterpolator();
private boolean mIsAnimatingOut = false;
public ScrollAwareFABBehavior(Context context, AttributeSet attrs) {
super();
}
@Override
public boolean onStartNestedScroll(final CoordinatorLayout coordinatorLayout, final FloatingActionButton child,
@sheerazam
sheerazam / ArcUtils.java
Created Oct 6, 2016
Fresco Circular Progress Drawable
View ArcUtils.java
public final class ArcUtils {
private static final double FULL_CIRCLE_RADIANS = toRadians(360d);
private ArcUtils() { }
/**
* Draws a circular arc on the given {@code Canvas}.
*
* @param canvas The canvas to draw into.
* @param circleCenter The center of the circle on which to draw the arc.
View MyApplication..java
//Crashlytics
Fabric.with(this, new Crashlytics());
@sheerazam
sheerazam / AndroidMenifest.xml
Last active Sep 28, 2016
Active Android Setup
View AndroidMenifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="retaillogics.activeandroidsample">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
@sheerazam
sheerazam / Memory Leaks Webview
Last active Aug 9, 2016
Avoiding Memory Leaks
View Memory Leaks Webview
http://stackoverflow.com/questions/3130654/memory-leak-in-webview
@sheerazam
sheerazam / splash screen.txt
Created Jul 25, 2016
Splash Screen Prerequisites
View splash screen.txt
https://www.bignerdranch.com/blog/splash-screens-the-right-way/
http://szagurskii.com/blog/how-to-load-heavy-libraries-on-splash-screen/?utm_source=Android+Weekly&utm_campaign=644e634e1a-Android_Weekly_215&utm_medium=email&utm_term=0_4eb677ad19-644e634e1a-337989413
@sheerazam
sheerazam / PhonesListRecyclerAdapter.java
Last active May 3, 2016
Recycler View Adapter Sample....
View PhonesListRecyclerAdapter.java
public class PhonesListRecyclerAdapter extends RecyclerView.Adapter<PhonesListRecyclerAdapter.ViewHolder> {
private static final String TAG = PhonesListRecyclerAdapter.class.getSimpleName();
private List<PhoneNumber> mItems;
OnClickListener onClickListener;
public interface OnClickListener{
void onPhoneNumberClick(int position);
}
@sheerazam
sheerazam / cloudmassaging
Created Apr 11, 2016
Google Cloud Massaging
View cloudmassaging
Step1: http://hmkcode.com/android-google-cloud-messaging-tutorial/
Step2: Send Push Message
https://github.com/mattg888/GCM-PHP-Server-Push-Message
Step 3: Install Xmpp
View activity_driver.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- The important thing to note here is the added fitSystemWindows -->
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/my_drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
>