public FileListRowViewHolder(TextView timeTextView, TextView textView, ImageView imageView, FloatingActionButton fab)
		{
			TimeTextView = timeTextView;
			TextView = textView;
			ImageView = imageView;
			Fab = fab;
		}
Ejemplo n.º 2
0
 // <summary>
 /// Method Name      : FindFloatingActionButton
 /// Author          : Sanket Prajapati
 /// Creation Date   : 15 Dec 2017
 /// Purpose         : For find floatingActionButton  all control
 /// Revision        :
 /// </summary>
 private void FindFloatingActionButton()
 {
     btnMoveDetails = FindViewById <FloatingActionButton>(Resource.Id.btnMoveDetails);
     btnTerms       = FindViewById <FloatingActionButton>(Resource.Id.btnTerms);
     btnAbout       = FindViewById <FloatingActionButton>(Resource.Id.btnAbout);
     btnFabClose    = FindViewById <FloatingActionButton>(Resource.Id.btnFabClose);
 }
Ejemplo n.º 3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.futureProjects);

            //Get the Toolbar id from the resources. -E157 T4.00
            projectToolbar          = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.projectsToolbar);
            futureEditText          = FindViewById <EditText>(Resource.Id.futureEditText);
            floatingActionButton    = FindViewById <Android.Support.Design.Widget.FloatingActionButton>(Resource.Id.addActionButton);
            projectBottomNavigation = FindViewById <Android.Support.Design.Widget.BottomNavigationView>(Resource.Id.projectbottom_navigation);
            listView = FindViewById <ListView>(Resource.Id.futureListView);

            //Bind the Bottom Navigatoin Menu page with the Project UI
            projectBottomNavigation.InflateMenu(Resource.Menu.projectBottomNavigation);
            //Create clicked event on the toolbar. -E157 T9.00
            projectToolbar.InflateMenu(Resource.Menu.projectsMenu);

            //Create clicked event on the toolbar. -E157 T9.00
            projectToolbar.MenuItemClick += ProjectToolbar_MenuItemClick;
            floatingActionButton.Click   += FloatingActionButton_Click;

            //Taking the database values and displaying that on the screen
            var lstSource = pdb.stringListViewProjects();
            var adapter   = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleListItem1, lstSource);

            listView.SetAdapter(adapter);
        }
Ejemplo n.º 4
0
 public FileListRowViewHolder(TextView timeTextView, TextView textView, ImageView imageView, FloatingActionButton fab)
 {
     TimeTextView = timeTextView;
     TextView     = textView;
     ImageView    = imageView;
     Fab          = fab;
 }
Ejemplo n.º 5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);

            // Set ActionBar
            var actionBar = FindViewById<Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(actionBar);
            SupportActionBar.Title = GetString(Resource.String.app_name);

            // Back button
            /*
            SupportActionBar.SetHomeButtonEnabled(true);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            */

            // Get RecyclerView
            recyMessages = FindViewById<Android.Support.V7.Widget.RecyclerView>(Resource.Id.main_recyMessages);

            // Get Floating Button
            btnFloating = FindViewById<Android.Support.Design.Widget.FloatingActionButton>(Resource.Id.main_btnFloating);
            btnFloating.Click += btnFloating_Click;
        }
Ejemplo n.º 6
0
        // scheduled for next
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: private void setFab(Android.Support.Design.Widget.FloatingActionButton fab, @FabBehaviour int fabBehaviour)
        private void setFab(FloatingActionButton fab, int fabBehaviour)
        {
            ViewGroup.LayoutParams layoutParams = fab.LayoutParameters;
            if (layoutParams != null && layoutParams is CoordinatorLayout.LayoutParams)
            {
                CoordinatorLayout.LayoutParams coLayoutParams           = (CoordinatorLayout.LayoutParams)layoutParams;
                BottomNavBarFabBehaviour       bottomNavBarFabBehaviour = new BottomNavBarFabBehaviour();
                coLayoutParams.Behavior = bottomNavBarFabBehaviour;
            }
        }
Ejemplo n.º 7
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.VoicePlayImage, container, false);

            btnDownload             = view.FindViewById <Android.Support.Design.Widget.FloatingActionButton>(Resource.Id.btnDownload);
            btnPlay                 = view.FindViewById <Android.Support.Design.Widget.FloatingActionButton>(Resource.Id.btnPlay);
            btnPlay.Click          += HandleBtnPlay;
            mediaPlayer.Completion += handleCompletitionEvent;
            return(view);
        }
Ejemplo n.º 8
0
        //    public void setmFabBehaviour(int mFabBehaviour) {
        //        this.mFabBehaviour = mFabBehaviour;
        //    }

        ///////////////////////////////////////////////////////////////////////////
        // Animator Initializer
        ///////////////////////////////////////////////////////////////////////////

        private void ensureOrCancelAnimator(FloatingActionButton fab)
        {
            if (mFabTranslationYAnimator == null)
            {
                mFabTranslationYAnimator = ViewCompat.Animate(fab);
                mFabTranslationYAnimator.SetDuration(400);
                mFabTranslationYAnimator.SetInterpolator(FAST_OUT_SLOW_IN_INTERPOLATOR);
            }
            else
            {
                mFabTranslationYAnimator.Cancel();
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Construtor
        /// </summary>
        public ActionButtonRenderer(Context ctx) : base(ctx)
        {
            float d = Context.Resources.DisplayMetrics.Density;

            MARGIN = (int)(MARGIN_DIPS * d); // margin in pixels

            fab = new Android.Support.Design.Widget.FloatingActionButton(Context);
            fab.Measure(AT_MOST, AT_MOST);
            var lp = new LinearLayout.LayoutParams(LayoutParams.WrapContent, LayoutParams.WrapContent);

            lp.Gravity = GravityFlags.Bottom | GravityFlags.Right;
            lp.SetMargins(MARGIN, MARGIN, MARGIN, MARGIN);
            fab.LayoutParameters = lp;
        }
Ejemplo n.º 10
0
        private View BuildFabActionButton(ViewGroup.LayoutParams param, int padding, int icon)
        {
            var b1 = new FloatingActionButton(Activity)
            {
                LayoutParameters = param,
                Clickable        = true,
                Focusable        = true
            };

            b1.SetImageResource(icon);
            b1.ImageTintList      = ColorStateList.ValueOf(new Color(ResourceExtension.BrushText));
            b1.BackgroundTintList = ColorStateList.ValueOf(new Color(ResourceExtension.AccentColourDark));
            b1.SetPadding(padding, padding, padding, padding);
            b1.Tag    = icon;
            b1.Click += OnFloatingActionButtonOptionClick;
            return(b1);
        }
Ejemplo n.º 11
0
        private View BuildFabActionButton(ViewGroup.LayoutParams param, int icon)
        {
            var b1 = new FloatingActionButton(Activity)
            {
                LayoutParameters = param,
                Clickable        = true,
                Focusable        = true
            };

            b1.Size = FloatingActionButton.SizeMini;
            b1.SetScaleType(ImageView.ScaleType.Center);
            b1.SetImageResource(icon);
            b1.ImageTintList      = ColorStateList.ValueOf(new Color(255, 255, 255));
            b1.BackgroundTintList = ColorStateList.ValueOf(new Color(ResourceExtension.AccentColourContrast));
            b1.Tag    = icon;
            b1.Click += OnFloatingActionButtonOptionClick;
            return(b1);
        }
Ejemplo n.º 12
0
        private float getFabTranslationYForSnackBar(CoordinatorLayout parent, FloatingActionButton fab)
        {
            float minOffset = 0;
            //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
            //ORIGINAL LINE: final java.util.List<Android.View.View> dependencies = parent.getDependencies(fab);
            IList <View> dependencies = parent.GetDependencies(fab);

            for (int i = 0, z = dependencies.Count; i < z; i++)
            {
                //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
                //ORIGINAL LINE: final Android.View.View view = dependencies.get(i);
                View view = dependencies[i];
                if (view is Snackbar.SnackbarLayout && parent.DoViewsOverlap(fab, view))
                {
                    minOffset = Math.Min(minOffset, ViewCompat.GetTranslationY(view) - view.Height);
                }
            }

            return(minOffset);
        }
Ejemplo n.º 13
0
 public ImagesVoiceProcesedAdapterViewHolder(View view)
 {
     imageView1            = view.FindViewById <ImageView>(Resource.Id.imageView1);
     floatingActionButton1 = view.FindViewById <Android.Support.Design.Widget.FloatingActionButton>(Resource.Id.floatingActionButton1);
 }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Crearlistaoffline);
            cliente.Connect(Intent.GetStringExtra("ipadre"), 1024);
            listbox       = FindViewById <ListView>(Resource.Id.listView1);
            textbox       = FindViewById <EditText>(Resource.Id.editText1);
            botonagregar  = FindViewById <Android.Support.Design.Widget.FloatingActionButton>(Resource.Id.imageView2);
            botoneliminar = FindViewById <Android.Support.Design.Widget.FloatingActionButton>(Resource.Id.imageView3);
            botonsalir    = FindViewById <ImageView>(Resource.Id.imageView1);

            //  elementossincortar = clasesettings.gettearvalor("elementosactuales");
            lineall  = FindViewById <LinearLayout>(Resource.Id.linearlayout0);
            lineall2 = FindViewById <LinearLayout>(Resource.Id.linearLayout1);
            var adaptadolo = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleListItem1, new List <string> {
                "No hay elementos para mostrar.."
            });

            RunOnUiThread(() => {
                var parcelable  = listbox.OnSaveInstanceState();
                listbox.Adapter = adaptadolo;
                listbox.OnRestoreInstanceState(parcelable);
            });
            UiHelper.SetBackgroundAndRefresh(this);
            AlertDialog.Builder adx = new AlertDialog.Builder(this);
            adx.SetCancelable(false);
            adx.SetTitle("Cargar elementos en reproduccion");
            adx.SetIcon(Resource.Drawable.alert);
            adx.SetMessage("Desea cargar todos los elementos que estan en reproduccion actualmente?");
            adx.SetNegativeButton("No", nox);
            adx.SetPositiveButton("Si", six);
            adx.Create();
            adx.Show();


            eneliminacion = true;

            /* adapterlistaremoto adaptador = new adapterlistaremoto(this, listanombres,listalinks);
             * listbox.Adapter = adaptador;*/
            lineall2.SetBackgroundColor(Android.Graphics.Color.ParseColor("#2b2e30"));
            // animar2(lineall2);
            botoneliminar.Click += delegate
            {
                // animar(botoneliminar);
                if (!eneliminacion)
                {
                    //botoneliminar.SetBackgroundResource(Resource.Drawable.playlistcheck);
                    adaptadorlista adalter    = new adaptadorlista(this, listanombres, listalinks, textbox.Text, false, true);
                    var            parcelable = listbox.OnSaveInstanceState();

                    listbox.Adapter = adalter;
                    listbox.OnRestoreInstanceState(parcelable);
                    eneliminacion = true;
                }
                else
                {
                    //  botoneliminar.SetBackgroundResource(Resource.Drawable.playlistedit);

                    /*  adaptadorzz = new adapterlistaremoto(this, listanombres,listalinks);
                     * listbox.Adapter = adaptadorzz;
                     * eneliminacion = false;*/
                }
            };
            botonagregar.Click += delegate {
                // animar(botonagregar);
                if (textbox.Text.Length >= 3)
                {
                    var saas = Directory.GetFiles(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/gr3playerplaylist");
                    if (!saas.Contains(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/gr3playerplaylist/" + textbox.Text))
                    {
                        StreamWriter escritor;
                        string       elementosfull = "";
                        escritor = File.CreateText(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/gr3playerplaylist/" + RemoveIllegalPathCharacters(textbox.Text));

                        if (listanombres.Count > 0 && listalinks.Count > 0 && listanombres[0].Trim() != "" && listalinks[0].Trim() != "")
                        {
                            elementosfull = string.Join(";", listanombres) + ";" + "$" + string.Join(";", listalinks) + ";";
                        }
                        else
                        {
                            elementosfull = "  $  ";
                        }
                        escritor.Write(elementosfull);
                        escritor.Close();
                        menulistaoffline.gettearinstancia().llenarlista();
                        cliente.Client.Disconnect(false);
                        Toast.MakeText(this, "Lista guardada satisfactoriamente", ToastLength.Long).Show();
                        Finish();
                        MultiHelper.ExecuteGarbageCollection();
                    }
                    else
                    {
                        AlertDialog.Builder ad = new AlertDialog.Builder(this);
                        ad.SetTitle("Advertencia");
                        ad.SetMessage("El elemento " + textbox.Text + " ya existe desea reemplazarlo??");
                        ad.SetCancelable(false);
                        ad.SetIcon(Resource.Drawable.warningsignonatriangularbackground);
                        ad.SetPositiveButton("Si", ok);
                        ad.SetNegativeButton("No", no);
                        ad.Create();
                        ad.Show();
                    }
                }
                else
                {
                    Toast.MakeText(this, "El nombre de la lista de reproduccion debe tener almenos 3 caracteres", ToastLength.Long).Show();
                }
            };
            botonsalir.Click += delegate
            {
                cliente.Client.Disconnect(false);
                animar(botonsalir);
                Finish();
                MultiHelper.ExecuteGarbageCollection();
            };
        }
Ejemplo n.º 15
0
        ///////////////////////////////////////////////////////////////////////////
        // Animating Fab based on Changes
        ///////////////////////////////////////////////////////////////////////////

        private void updateFabTranslationForBottomNavigationBar(CoordinatorLayout parent, FloatingActionButton fab, View dependency)
        {
            float snackBarTranslation = getFabTranslationYForSnackBar(parent, fab);

            float[] bottomBarParameters  = getFabTranslationYForBottomNavigationBar(parent, fab);
            float   bottomBarTranslation = bottomBarParameters[0];
            float   bottomBarHeight      = bottomBarParameters[1];

            float targetTransY = 0;

            if (snackBarTranslation >= bottomBarTranslation)
            {
                // when snackBar is below BottomBar in translation present.
                targetTransY = bottomBarTranslation;
            }
            else
            {
                targetTransY = snackBarTranslation;
            }

            //        if (mFabBehaviour == BottomNavigationBar.FAB_BEHAVIOUR_DISAPPEAR) {
            //            if (targetTransY == 0) {
            //                fab.hide();
            //            } else {
            //                fab.show();
            //            }
            //        }

            //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
            //ORIGINAL LINE: final float currentTransY = Android.Support.V4.View.ViewCompat.getTranslationY(fab);
            float currentTransY = ViewCompat.GetTranslationY(fab);

            // Make sure that any current animation is cancelled
            ensureOrCancelAnimator(fab);


            if (fab.IsShown && Math.Abs(currentTransY - targetTransY) > (fab.Height * 0.667f))
            {
                // If the FAB will be travelling by more than 2/3 of it's height, let's animate it instead
                mFabTranslationYAnimator.TranslationY(targetTransY).Start();
            }
            else
            {
                // Now update the translation Y
                ViewCompat.SetTranslationY(fab, targetTransY);
            }
        }
Ejemplo n.º 16
0
        ///////////////////////////////////////////////////////////////////////////
        // Fab Translation due to SnackBar and Due to BottomBar
        ///////////////////////////////////////////////////////////////////////////

        private float[] getFabTranslationYForBottomNavigationBar(CoordinatorLayout parent, FloatingActionButton fab)
        {
            float minOffset  = 0;
            float viewHeight = 0;
            //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
            //ORIGINAL LINE: final java.util.List<Android.View.View> dependencies = parent.getDependencies(fab);
            IList <View> dependencies = parent.GetDependencies(fab);

            for (int i = 0, z = dependencies.Count; i < z; i++)
            {
                //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
                //ORIGINAL LINE: final Android.View.View view = dependencies.get(i);
                View view = dependencies[i];
                if (view is BottomNavigationBar)
                {
                    viewHeight = view.Height;
                    minOffset  = Math.Min(minOffset, ViewCompat.GetTranslationY(view) - viewHeight);
                }
            }
            float[] returnValues = new float[] { minOffset, viewHeight };

            return(returnValues);
        }