Esempio n. 1
0
 private static void TotpViewBind(AuthHolder holder, Authenticator auth)
 {
     holder.RefreshButton.Visibility = ViewStates.Gone;
     holder.ProgressBar.Visibility   = ViewStates.Visible;
     holder.Counter.Visibility       = ViewStates.Invisible;
     holder.ProgressBar.Progress     = GetTotpRemainingProgress(auth);
 }
Esempio n. 2
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            var layout   = IsCompact ? Resource.Layout.authListItemCompact : Resource.Layout.authListItem;
            var itemView = LayoutInflater.From(parent.Context).Inflate(layout, parent, false);

            var holder = new AuthHolder(itemView, OnItemClick, OnItemOptionsClick, OnRefreshClick);

            return(holder);
        }
Esempio n. 3
0
        private static void HotpViewBind(AuthHolder holder, Authenticator auth)
        {
            holder.RefreshButton.Visibility = auth.TimeRenew < DateTime.Now
                ? ViewStates.Visible
                : ViewStates.Gone;

            holder.ProgressBar.Visibility = ViewStates.Invisible;
            holder.Counter.Visibility     = ViewStates.Visible;
            holder.Counter.Text           = auth.Counter.ToString();
        }