예제 #1
0
 private TextView GetTextView()
 {
     var param = PixelConverter.GetParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent,
                                          10, 0, 10, 20);
     var randIndex =
         (ViewModel.CurrentNumber +
          new Random(unchecked ((int)DateTime.Now.Ticks)).Next(1, ViewModel.Database.Count)) %
         ViewModel.Database.Count;
     var textView = new TextView(this)
     {
         TextSize         = 20,
         LayoutParameters = param,
         Text             = $"{ViewModel.Database[ViewModel.Answer ? ViewModel.CurrentNumber : randIndex].ImageName}",