public static GetCurrentLocale ( Android.Content.Context context ) : System.Locale | ||
context | Android.Content.Context | |
return | System.Locale |
public static string GetLongFormatDate(Date date, Context context) { var locale = AppUtil.GetCurrentLocale(context); if (Build.VERSION.SdkInt >= Build.VERSION_CODES.JellyBeanMr2) { var pattern = Android.Text.Format.DateFormat.GetBestDateTimePattern(locale, FORMAT_YYYYMMDDKKMM); return(new SimpleDateFormat(pattern, locale).Format(date)); } else { var sdf = Java.Text.DateFormat.GetDateInstance(Java.Text.DateFormat.Long, locale) as SimpleDateFormat; return(sdf.Format(date) + GetHourMinute(date)); } }
public static string GetMonthDate(Date date, Context context) { return(GetMonthDate(date, AppUtil.GetCurrentLocale(context), context)); }
public static bool ShouldRtl(Context context) { return(TextUtilsCompat.GetLayoutDirectionFromLocale(AppUtil.GetCurrentLocale(context)) == ViewCompat.LayoutDirectionRtl); }