List of usage examples for android.media.tv TvContentRating unflattenFromString
public static TvContentRating unflattenFromString(String ratingString)
From source file:Main.java
public static TvContentRating[] stringToContentRatings(String commaSeparatedRatings) { if (TextUtils.isEmpty(commaSeparatedRatings)) { return null; }/*from www . j av a 2s . c om*/ String[] ratings = commaSeparatedRatings.split("\\s*,\\s*"); TvContentRating[] contentRatings = new TvContentRating[ratings.length]; for (int i = 0; i < contentRatings.length; ++i) { contentRatings[i] = TvContentRating.unflattenFromString(ratings[i]); } return contentRatings; }