Beispiel #1
0
        protected override Android.Views.View GetCellCore(Cell item, Android.Views.View convertView, ViewGroup parent, Context context)
        {
            noteCell = (NoteCell)item;

            cell = convertView as AndroidNoteCell;
            if (cell == null)
            {
                cell = new AndroidNoteCell(context, noteCell);
            }
            else
            {
                cell.NoteCell.PropertyChanged += OnNoteCellProprtyChanged;
            }
            noteCell.PropertyChanged += OnNoteCellProprtyChanged;

            cell.ContentText.LongClickable = true;
            cell.LongClickable             = true;

            cell.LongClick             += OnCellLongClicked;
            cell.ContentText.LongClick += OnCellLongClicked;

            cell.UpdateCell(noteCell);

            return(cell);
        }
Beispiel #2
0
        // Constructor
        public AndroidNoteCell(Context context, NoteCell cell) : base(context)
        {
            NoteCell = cell;

            var view = (context as Activity).LayoutInflater.Inflate(Resource.Layout.AndroidNoteCell, null);

            ContentText = view.FindViewById <TextView>(Resource.Id.ContentText);
            AddView(view);

            imageGetter = new AsyncHtmlImageGetter(ContentText, this.Context);
        }
Beispiel #3
0
 public void UpdateCell(NoteCell cell)
 {
     ContentText.TextFormatted  = HtmlCompat.FromHtml(cell.Text, HtmlCompat.FromHtmlModeLegacy, imageGetter, null);
     ContentText.MovementMethod = LinkMovementMethod.Instance;
 }