Ejemplo n.º 1
0
        public override Android.Support.V7.Widget.RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.TranslationHistoryListCardView, parent, false);
            TranslationHistoryListViewHolder viewHolder = new TranslationHistoryListViewHolder(itemView, OnClick);

            return(viewHolder);
        }
Ejemplo n.º 2
0
        public override void OnBindViewHolder(Android.Support.V7.Widget.RecyclerView.ViewHolder holder, int position)
        {
            TranslationHistoryListViewHolder viewHolder = holder as TranslationHistoryListViewHolder;

            viewHolder.SourceLanguageTextView.Text  = languageTable.FirstOrDefault(x => x.WorldLanguageID == translationHistory[position].Source).Name;
            viewHolder.TargetLanguageTextView.Text  = languageTable.FirstOrDefault(x => x.WorldLanguageID == translationHistory[position].Target).Name;
            viewHolder.TextToTranslateTextView.Text = translationHistory[position].TextToTranslate;
            viewHolder.TranslatedTextTextView.Text  = translationHistory[position].TranslatedText;
        }