Skip to content

Instantly share code, notes, and snippets.

View imranhsn's full-sized avatar
🏠
Working from home

Imran imranhsn

🏠
Working from home
  • Sporty Group
  • Dhaka, Bangladesh
  • 22:35 (UTC +06:00)
View GitHub Profile
package test;
import android.arch.lifecycle.LiveData;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
@imranhsn
imranhsn / LinearGradientDrawable.java
Created October 29, 2017 08:43 — forked from n1lesh/LinearGradientDrawable.java
Android Gradient Toolbar and Statusbar
RelativeLayout layout = (RelativeLayout) findViewById(R.id.rel);
GradientDrawable drawable = new GradientDrawable();
drawable.setColors(new int[] {
Color.parseColor("#FFF6B7"),
Color.parseColor("#F6416C")
});
drawable.setGradientType(GradientDrawable.LINEAR_GRADIENT);
drawable.setOrientation(GradientDrawable.Orientation.LEFT_RIGHT);