标题行的StickyGridHeaders宽度 [英] StickyGridHeaders width of the header line
问题描述
正如你可以从下面的图片中看到:
As you can see from the following picture:
当我滚动的标题绿线填充空间的信(为B字母),但是当不是仅填充字母(以C字母)。
When I scroll to the letter the green line on the header fills the space (as B letter) but when not fills only the letter (as C letter).
我要的C字母也填满了整个空间。
I want the C letter to also fill the whole space.
下面是code我用采取进补Artos提供适合您示例:
Here is the code I used taken Tonic Artos' Example:
<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>
这里是code的链接:
的https://github.com/TonicArtos/StickyGridHeaders/blob/master/Example/res/layout/header.xml
And here is the link of the code: https://github.com/TonicArtos/StickyGridHeaders/blob/master/Example/res/layout/header.xml
推荐答案
也许这个问题有点老了,但我今天同样的问题挣扎,我想分享我做了什么。
Maybe this question is a bit old, but I was struggling with the same problem today and I wanted to share what I did.
这是什么情况是,我用gradle这个来的依赖添加到该图书馆,我知道,如果没有在previous版本gradle这个它在某些时候是工作,所以我删除了依赖,增加这个jar说我有我的文件中,然后将其固定。
What it was happening is that I was using gradle to add the dependency to this library and I knew that without gradle in a previous version it was working at some point, so I deleted the dependency and added this jar that I had among my files and then it was fixed.
这篇关于标题行的StickyGridHeaders宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!