lets make the history items a bit nicer
This commit is contained in:
parent
af7204acd1
commit
7952075862
2 changed files with 6 additions and 4 deletions
|
@ -32,7 +32,7 @@ class HistoryAdapter(val activity: SimpleActivity, val items: List<History>, val
|
|||
fun bindView(item: History): View {
|
||||
itemView.apply {
|
||||
item_formula.text = item.formula
|
||||
item_result.text = "= ${item.result}"
|
||||
item_result.text = item.result
|
||||
item_formula.setTextColor(textColor)
|
||||
item_result.setTextColor(textColor)
|
||||
|
||||
|
@ -40,6 +40,7 @@ class HistoryAdapter(val activity: SimpleActivity, val items: List<History>, val
|
|||
calc.addNumberToFormula(item.result)
|
||||
itemClick()
|
||||
}
|
||||
|
||||
setOnLongClickListener {
|
||||
activity.baseContext.copyToClipboard(item.result)
|
||||
true
|
||||
|
|
|
@ -15,10 +15,11 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/medium_margin"
|
||||
android:alpha="0.8"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="@dimen/small_margin"
|
||||
android:textSize="@dimen/normal_text_size"
|
||||
android:textSize="@dimen/bigger_text_size"
|
||||
tools:text="2 + 2" />
|
||||
|
||||
<TextView
|
||||
|
@ -30,7 +31,7 @@
|
|||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="@dimen/small_margin"
|
||||
android:textSize="@dimen/normal_text_size"
|
||||
tools:text="= 4" />
|
||||
android:textSize="@dimen/big_text_size"
|
||||
tools:text="4" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
Loading…
Reference in a new issue