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 androidx.annotation.IntDef; | |
| import androidx.annotation.NonNull; | |
| import java.lang.annotation.Retention; | |
| import java.lang.annotation.RetentionPolicy; | |
| public final class CompatUtils { | |
| @Retention(RetentionPolicy.SOURCE) |
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
| package com.cobocn.hdms.app.ui.widget; | |
| /** | |
| * Created by benny on 14-9-19. | |
| */ | |
| import android.content.Context; | |
| import android.view.GestureDetector; | |
| import android.view.MotionEvent; | |
| import android.view.View; |
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.animation.ObjectAnimator; | |
| import android.graphics.Rect; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.view.ViewTreeObserver; | |
| /** | |
| * An OnGlobalLayoutListener interface that will adjust and resize a fullscreen scene's view when the soft keyboard is shown | |
| * or hidden. | |
| * |
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 com.google.inject.Singleton; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| @Singleton | |
| public class YouTubeHelper { | |
| final String youTubeUrlRegEx = "^(https?)?(://)?(www.)?(m.)?((youtube.com)|(youtu.be))/"; | |
| final String[] videoIdRegex = { "\\?vi?=([^&]*)","watch\\?.*v=([^&]*)", "(?:embed|vi?)/([^/?]*)", "^([A-Za-z0-9\\-]*)"}; |
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
| package com.emil.android.util; | |
| import android.content.Context; | |
| import android.net.ConnectivityManager; | |
| import android.net.NetworkInfo; | |
| import android.telephony.TelephonyManager; | |
| /** | |
| * Check device's network connectivity and speed | |
| * @author emil http://stackoverflow.com/users/220710/emil |