从下面的图片中可以看到:

当我滚动到字母时,标题上的绿色行填充空格(如B字母),但当不填充时只填充字母(如C字母)。
我希望C字母也能填满整个空间。
下面是我使用的以Tonic Artos为例的代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/itemGridHeader"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="left"
android:paddingBottom="4dp"
android:paddingLeft="4dp"
android:paddingTop="4dp"
android:textColor="@color/myColor"
android:textSize="16.5sp"
android:textStyle="bold"
android:textAllCaps="true"
>
</TextView>
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/myColor" >
</FrameLayout>
下面是代码的链接:https://github.com/TonicArtos/StickyGridHeaders/blob/master/Example/res/layout/header.xml
发布于 2014-10-16 21:47:57
也许这个问题有点老了,但我今天正为同样的问题而挣扎,我想和大家分享我所做的事情。

正在发生的事情是,我使用gradle将依赖项添加到这个库中,并且我知道在以前的版本中没有gradle,它在某个时候起作用,所以我删除了这个依赖项,并添加了我在我的文件中的这个jar,然后它被修复了。
https://stackoverflow.com/questions/23991204
复制相似问题