public static boolean isValidMobile(@NonNull String mobile){
  if (!TextUtils.isEmpty(mobile) && mobile.length() == 10) {
    if (mobile.startsWith("9") || mobile.startsWith("8") || mobile.startsWith("7")) {
      return true;
    }
  }
  return false;
}

public static boolean isValidMobile ( @ NonNull String mobile ) { if ( ! TextUtils . isEmpty ( mobile ) && mobile . length ( ) == 10 ) { if ( mobile . startsWith ( "9" ) || mobile . startsWith ( "8" ) || mobile . startsWith ( "7" ) ) { return true ; } } return false ; }
method to check valid malaysia mobile number
