Fore-Blessing: Bread/Cakes of Rice Flour and Mezonot Flour

In a bread containing rice flour, if at least 20\% of the flour is from one of the Five Grains, say the fore-blessing of ha'motzi (after-blessing: birkat ha'mazon).
In a cake containing mostly rice flour, if at least 20\% of the flour is from one of the Five Grains, say a fore-blessing of borei minei mezonot (after-blessing: al ha'michya).