fix section divider width

This commit is contained in:
tibbi 2017-02-05 11:36:39 +01:00
parent 13e871b5ef
commit d059f58114
5 changed files with 17 additions and 4 deletions

View File

@ -51,7 +51,7 @@ class EventListAdapter(val activity: SimpleActivity, val mItems: List<ListItem>,
init {
textColor = activity.config.textColor
topDivider = activity.resources.getDrawable(R.drawable.divider)
topDivider = activity.resources.getDrawable(R.drawable.divider_width)
primaryColor = activity.config.primaryColor
val mTodayCode = Formatter.getDayCodeFromTS(mNow)
todayDate = Formatter.getDayTitle(activity, mTodayCode)
@ -101,6 +101,7 @@ class EventListAdapter(val activity: SimpleActivity, val mItems: List<ListItem>,
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): RecyclerView.ViewHolder {
val layoutId = if (viewType == ITEM_EVENT) R.layout.event_list_item else R.layout.event_list_section
val view = LayoutInflater.from(parent?.context).inflate(layoutId, parent, false)
return if (viewType == ITEM_EVENT)
EventListAdapter.ViewHolder(activity, view, itemClick)
else

View File

@ -24,7 +24,7 @@ class EventListWidgetAdapterOld(val context: Context, val mEvents: List<ListItem
private var mTextColor = 0
init {
mTopDivider = context.resources.getDrawable(R.drawable.divider)
mTopDivider = context.resources.getDrawable(R.drawable.divider_width)
}
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size
android:width="5000dp"
android:height="1dp"/>
<solid android:color="@color/divider_grey"/>
</shape>

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="1dp"
android:drawableTop="@drawable/divider"
android:drawableTop="@drawable/divider_width"
android:paddingTop="@dimen/small_margin"
android:textSize="@dimen/normal_text_size"
android:textStyle="bold"/>

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="1dp"
android:drawableTop="@drawable/divider"
android:drawableTop="@drawable/divider_width"
android:paddingTop="@dimen/small_margin"
android:textSize="@dimen/normal_text_size"
android:textStyle="bold"/>