This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.ContentValues; | |
import android.net.Uri; | |
import android.provider.CalendarContract; | |
import net.fortuna.ical4j.data.CalendarBuilder; | |
import net.fortuna.ical4j.data.ParserException; | |
import net.fortuna.ical4j.model.Calendar; | |
import net.fortuna.ical4j.model.Component; | |
import net.fortuna.ical4j.model.Property; | |
import net.fortuna.ical4j.model.component.Daylight; | |
import net.fortuna.ical4j.model.component.Observance; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.ContentValues; | |
import android.provider.CalendarContract; | |
import android.support.test.rule.ActivityTestRule; | |
import android.test.ActivityUnitTestCase; | |
import junit.framework.Assert; | |
import net.fortuna.ical4j.data.ParserException; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Rule; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.telephony.TelephonyManager; | |
public class NetworkUtils { | |
public static NetworkInfo getNetworkInfo(final Context context) { | |
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
public class ObjectUtil { | |
public static boolean isEmpty(String string) { | |
return string == null || string.length() == 0; | |
} | |
public static boolean isNull(Object obj) { | |
return obj == null; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.res.Resources; | |
import android.graphics.drawable.Drawable; | |
import com.task.App; | |
import static android.os.Build.VERSION.SDK_INT; | |
import static android.os.Build.VERSION_CODES.LOLLIPOP; | |
public class ResourcesUtil { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.graphics.Typeface; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* Created by abhinav.sharma on 28/12/16. | |
* Creating Typeface from assets is little expensive when lot of textviews wants custom Fonts from assets | |
* https://nayaneshguptetechstuff.wordpress.com/2014/06/20/slow-activity-transition-using-custom-typeface-font/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.net.ConnectivityManager | |
import android.net.NetworkInfo | |
import android.telephony.TelephonyManager | |
import java.io.IOException | |
import java.net.HttpURLConnection | |
import java.net.NetworkInterface | |
import java.net.SocketException | |
import java.net.URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TimeAgo { | |
private String prefixAgo = null; | |
private String prefixFromNow = null; | |
private String suffixAgo = "ago"; | |
private String suffixFromNow = "from now"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AndroidBug5497Workaround { | |
// For more information, see https://issuetracker.google.com/issues/36911528 | |
// To use this class, simply invoke assistActivity() on an Activity that already has its content view set. | |
public static void assistActivity (Activity activity) { | |
new AndroidBug5497Workaround(activity); | |
} | |
private View mChildOfContent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.content.res.Configuration; | |
import android.content.res.Resources; | |
import android.support.v7.app.AppCompatActivity; | |
import android.util.Log; | |
import android.graphics.Point; | |
import android.graphics.Rect; | |
import android.graphics.drawable.ColorDrawable; | |
import android.util.DisplayMetrics; |
OlderNewer