Exemplo n.º 1
0
        private void AddBaseViews()
        {
            CreateBaseConstraints();
            CreateProgressBar();

            BaseMainConstraintLayout.AddView(BaseScrollView);
            BaseScrollView.AddView(BaseElementsConstraintLayout);
            BaseMainConstraintLayout.AddView(BasePreLoaderConstraintLayout);
            BasePreLoaderConstraintLayout.AddView(BaseProgressBar);

            CreateBasePreLoaderConstraintSet();
            CreateMainConstraintSet();
        }
 public void OnUPIAppsFetched(IList <IDictionary <string, string> > list)
 {
     if (list.Count == 0)
     {
         progressBar.Visibility = ViewStates.Gone;
         FindViewById <TextView>(Resource.Id.no_upi_apps).Visibility = ViewStates.Visible;
         return;
     }
     if (flow != null && parentLayout != null)
     {
         int i = 0;
         List <LinearLayout> imageList = new List <LinearLayout>();
         List <int>          refIds    = new List <int>();
         foreach (IDictionary <string, string> dict in list)
         {
             refIds.Add(i);
             imageList.Add(SetImage(dict["displayName"], dict["id"], dict["icon"], i));
             i++;
         }
         RunOnUiThread(() =>
         {
             progressBar.Visibility = ViewStates.Gone;
             foreach (LinearLayout view in imageList)
             {
                 ConstraintLayout.LayoutParams layoutParams = new ConstraintLayout.LayoutParams(ConstraintLayout.LayoutParams.WrapContent,
                                                                                                ConstraintLayout.LayoutParams.WrapContent);
                 parentLayout.AddView(view, layoutParams);
             }
             flow.SetReferencedIds(refIds.ToArray());
         });
     }
 }
Exemplo n.º 3
0
 private void SetCameraPreview()
 {
     _cameraRoot.AddView(new CameraPreview(this, _camera));
 }