RecyclerView仅在滚动后显示边框文本视图

时间:2016-09-01 07:21:24

标签: android android-recyclerview android-adapter

我有arrayList本书。它包含书名和书签(如历史,小说,故事等)。我已使用RecyclerView进行列表。它工作正常,但问题是这里的标签在框中显示为文本。

This is row

有时标签在初始加载时不显示。滚动标签显示后。

我不知道代码中发生了什么。我认为问题出在RecyclerView上。我将VISIBLE onBindViewHolder的可见度设置为<LinearLayout android:layout_width="220dp" android:layout_height="wrap_content" android:id="@+id/tag_layout" android:layout_marginTop="2dp" android:layout_alignLeft="@+id/story_name" android:layout_below="@id/story_name"> <TextView android:id="@+id/tag1" android:layout_width="wrap_content" android:layout_height="20dp" android:textSize="12dp" android:paddingLeft="6dp" android:paddingRight="11dp" android:paddingBottom="3.5dp" android:background="@drawable/roundedcorner"/> </LinearLayout> 仍无法获得。

这是我的xml

onBindViewHolder

holder.tag1.setText("tag name "); holder.tag1.setVisibility(View.VISIBLE);

The directory where plugins are installed (the Vagrant home directory)
has a space in it. On Windows, there is a bug in Ruby when compiling
plugins into directories with spaces. Please move your Vagrant home
directory to a path without spaces and try again.

0 个答案:

没有答案
相关问题