some style update at breadcrumbs

This commit is contained in:
tibbi 2017-07-01 12:13:47 +02:00
parent fc949c57df
commit 849d124d53

View file

@ -125,17 +125,18 @@ class Breadcrumbs(context: Context, attrs: AttributeSet) : LinearLayout(context,
} }
private fun addBreadcrumb(item: FileDirItem, addPrefix: Boolean) { private fun addBreadcrumb(item: FileDirItem, addPrefix: Boolean) {
val view = mInflater.inflate(R.layout.breadcrumb_item, null, false) mInflater.inflate(R.layout.breadcrumb_item, null, false).apply {
var textToAdd = item.name var textToAdd = item.name
if (addPrefix) if (addPrefix)
textToAdd = " -> " + textToAdd textToAdd = " -> $textToAdd"
view.breadcrumb_text.text = textToAdd breadcrumb_text.text = textToAdd
view.breadcrumb_text.setTextColor(mTextColor) breadcrumb_text.setTextColor(mTextColor)
addView(view) addView(this)
view.setOnClickListener(this) setOnClickListener(this@Breadcrumbs)
view.tag = item tag = item
}
} }
fun removeBreadcrumb() { fun removeBreadcrumb() {